21 set up the backend and prisma #36
Merged
+2,328
−73
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Sets up the backend as its own package with Prisma and PostgreSQL. The database models come in the next issue.
Changes
backend/is now an npm workspace, sonpm cifrom the root installs both frontend and backendbackend/.env.exampleshows how to writeDATABASE_URL. Your ownbackend/.envis not committeddb:generate,db:migrate,db:deployanddb:studiodocs/AI_USAGE.mdHow to test
copuser and database, as described in "Database (local setup)" in the READMEbackend/.env.exampletobackend/.envand fill in your passwordnpm cifrom the rootnpx prisma migrate statusinbackend/. If the output showsDatasource "db": PostgreSQL database "cop" ... at "localhost:5432", the connection works. "No migration found" and "not managed by Prisma Migrate" are expected on a fresh setup, because there are no tables or migrations until the next issue.Good to know
backend/src/schema.graphql, but it is not changed in this PR. The file already failed the Prettier check before this branch, and this PR was not meant to touch the schema. We should decide when to format it: in its own small PR, or together with the next issue that changes the schema.Closes #21
🤖 Generated with Claude Code