Prisma and Database
Prisma setup
Section titled “Prisma setup”- Prisma schema:
backend/prisma/schema.prisma. - Prisma client wrapper:
backend/src/Infrastructure/Repositories/Prisma/PrismaClient.ts. - DB provider: PostgreSQL via
@prisma/adapter-pg.
Data model highlights
Section titled “Data model highlights”- Users, wallets, categories, transactions, budgets.
- Join tables for wallet membership and budget membership.
- Allocation model links budgets, members, and transactions.
Repository implementations
Section titled “Repository implementations”backend/src/Infrastructure/Repositories/Prisma/UserRepositoryImpl.tsbackend/src/Infrastructure/Repositories/Prisma/WalletRepositoryImpl.tsbackend/src/Infrastructure/Repositories/Prisma/CategoryRepositoryImpl.tsbackend/src/Infrastructure/Repositories/Prisma/TransactionRepositoryImpl.tsbackend/src/Infrastructure/Repositories/Prisma/BudgetRepositoryImpl.tsbackend/src/Infrastructure/Repositories/Prisma/BudgetAllocationRepositoryImpl.ts
Migration and startup commands
Section titled “Migration and startup commands”pnpm prisma migrate deploypnpm devProduction startup includes migrations before serving (pnpm start).