Overview
Prisma and PostgreSQL — local Docker, Neon, Supabase, or Railway.
TurboJet includes a pre-configured database layer with Prisma and PostgreSQL. Schema and client live in packages/database.
This kit does not ship Drizzle, MySQL, or SQLite. Use PostgreSQL locally or via a managed provider.
Update schema
Edit schema.prisma, migrate, push, and generate.
Use database client
Query and mutate with db from @repo/database.
Use database studio
Browse and edit data in Prisma Studio.
Local (Docker)
Recommended local Postgres via docker-compose.
Neon Postgres
Serverless Postgres with pooling and branching.
Supabase Postgres
Managed Postgres with Supavisor pooling.
Railway Postgres
Simple managed Postgres.
For day-to-day development, start with Local (Docker). Use Neon, Supabase, or Railway when you need a hosted database.
Package scripts
| Command | Purpose |
|---|---|
pnpm docker:up | Start Postgres (+ Mailpit) |
pnpm prisma:migrate | db:migrate (uses DIRECT_URL) |
pnpm --filter @repo/database db:generate | Regenerate Prisma Client |
pnpm --filter @repo/database db:push | Push schema without a migration file |
pnpm --filter @repo/database db:studio | Open Prisma Studio |
pnpm --filter @repo/database db:seed | Seed users |
pnpm --filter @repo/database db:migrate:deploy | Apply migrations (CI / prod) |
DATABASE_URL vs DIRECT_URL
Local Docker can use the same string for both. Pooled hosts (Neon, Supabase)
use the pooler as DATABASE_URL and the direct endpoint as DIRECT_URL —
migrate scripts temporarily set DATABASE_URL to DIRECT_URL.
Frequently asked questions
Which database should I use?
PostgreSQL is the only supported database. Prefer Local (Docker) for development; pick Neon, Supabase, or Railway for hosted environments.
Does TurboJet support Drizzle or MySQL?
No. The database package is Prisma + PostgreSQL only.
Where should I put queries?
Call db from server-side code — typically services under packages/api/src/modules/*/service.ts. Do not import @repo/database in client components.