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
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 thislooks like https://pypi.org/project/prisma/ should work for getting prisma on the python side and keeping a single schema file between the languages
concurrently
would be for development right?you can use it in prod
https://www.npmjs.com/package/concurrently
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.but you probably want the t3 app to be serverless
i would prob deploy the frontend to vercel
exactly
thanks!
then in this case, you would only use concurrently for development
or two different terminals/tabs