AllesCoolAllesBestens
AllesCoolAllesBestens
TTCTheo's Typesafe Cult
Created by AllesCoolAllesBestens on 11/17/2023 in #questions
Using Prisma or tRPC API from T3 Stack in different project
Hi, I've created a small app using the t3 stack including tRPC and Prisma. To update some of the tables in the database created by prisma, I need to create a little project outside of the scope of nextjs (or so I believe) to connect to a kafka topic and consume data that gets transformed and upserted/deleted in my prisma db. What's the best way to organize this and kickstart the second project so that I can reuse the things I created in my next app? Would it be better to directly use prisma to do this, or should I create separate tRPC API Endpoints to accomplish this task? My gut instinct tells me that I would prefer the latter, but I am unsure if this is even possible or advisable. It is my understanding that the monorepo pattern is something that I would need to look into, but I am having trouble in understanding how this would actually work in my context. Do I need to convert my nextjs/t3 project to something different, and again, how would I organize this? I hope I verbalized my question clearly and would love if someone could answer it or pinpoint me in the right direction using articles or whatever. Thanks in advance.
12 replies