TurboJet
Database

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.

For day-to-day development, start with Local (Docker). Use Neon, Supabase, or Railway when you need a hosted database.

Package scripts

CommandPurpose
pnpm docker:upStart Postgres (+ Mailpit)
pnpm prisma:migratedb:migrate (uses DIRECT_URL)
pnpm --filter @repo/database db:generateRegenerate Prisma Client
pnpm --filter @repo/database db:pushPush schema without a migration file
pnpm --filter @repo/database db:studioOpen Prisma Studio
pnpm --filter @repo/database db:seedSeed users
pnpm --filter @repo/database db:migrate:deployApply 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.

On this page