Python app + nextjs frontend writing to the same database

I have a python app (discord bot) that keeps track of settings/stats in a postgres database. I want to build a dashboard with the t3 stack where you can view and change those settings, but I'm worried about schema clashing with prisma. I currently use asyncpg and no ORM in my python app and plan to use prisma on my frontend. I'm early enough in development where it wouldn't be an issue to switch to prisma in my python app, but that might create more issues like schema sharing. Also, is possible to create a monorepo with a nextjs app and a python app? I couldn't find anything answers online.
9 Replies
Samathingamajig
yeah you can make a monorepo with a nextjs app and a python app, you'd need to use something like concurrently to run both at the same time since im not aware of any tooling specifically for this
Samathingamajig
looks like https://pypi.org/project/prisma/ should work for getting prisma on the python side and keeping a single schema file between the languages
PyPI
prisma
Prisma Client Python is an auto-generated and fully type-safe database client
ott
ottOP2y ago
concurrently would be for development right?
Samathingamajig
npm
concurrently
Run commands concurrently. Latest version: 7.6.0, last published: 2 months ago. Start using concurrently in your project by running npm i concurrently. There are 1357 other projects in the npm registry using concurrently.
Samathingamajig
but you probably want the t3 app to be serverless
ott
ottOP2y ago
i would prob deploy the frontend to vercel
Samathingamajig
exactly
ott
ottOP2y ago
thanks!
Samathingamajig
then in this case, you would only use concurrently for development or two different terminals/tabs
Want results from more Discord servers?
Add your server