Integrations
Database and Data Model
What Bunship database includes out of the box and what you should customize first.
Bunship uses PostgreSQL + Drizzle. If you bought the template, this module is your source of truth for auth, billing, wallet, affiliate, AI, and CMS data.
What You Get Out of the Box
- Domain schemas already split in
packages/db/src/drizzle/schema/* - Versioned migrations in
packages/db/drizzle/migrations - Seed scripts for product, affiliate, and AI model configs
- Shared typed DB access used by both
apps/shipandapps/ship-api
Where to Customize First
- Plan/product definitions and Stripe price references in seed data.
- Admin/business enums and status flows before any production migration.
- Indexes based on your actual query hotspots (orders, wallet, AI tasks).
Code Map
- Schema:
packages/db/src/drizzle/schema - Drizzle config:
packages/db/drizzle.config.ts - Seed runner:
packages/db/src/drizzle/seed/run.ts - DB package scripts:
packages/db/package.json
Daily Commands
cd packages/db
bun run drizzle:generate
bun run drizzle:migrate
bun run seedUse these selective seeds when needed:
bun run seed:product
bun run seed:ai-modelsLaunch Checklist
DATABASE_URLpoints to your production PostgreSQL.- Migrations are applied before app rollout.
- Seeded products/AI models match your real pricing strategy.
- Staging verification includes: signup -> pay -> credit grant -> admin audit.