Standalone REST backend for authentication and account/session operations.
- Fastify
- Zod validation
- JWT auth tokens
- Prisma ORM + Prisma Migrate
- PostgreSQL
- TypeScript
GET /healthPOST /auth/signupPOST /auth/loginPOST /auth/refreshGET /auth/me(Bearer token)DELETE /auth/logout
Copy .env.example to .env and set secure secrets.
Prisma 7 datasource URLs are configured via prisma.config.ts (not in schema.prisma).
SHADOW_DATABASE_URL is used by Prisma during prisma migrate dev to safely diff schemas without mutating your main development database.
pnpm prisma:generate
pnpm prisma:migrate:devFor production deploys:
pnpm prisma:migrate:deploypnpm install
pnpm prisma:generate
pnpm prisma:migrate:dev
pnpm devRuns on http://localhost:4000 by default.