# 1. Install dependencies
pnpm install
# 2. Start the database
cd packages/db
cp .env.example .env # uses default credentials, fine for local dev
docker compose up -d
# 3. Apply migrations and seed
pnpm db:migrate:deploy
pnpm db:seed # optional
# 4. Run the apps (each in its own terminal, from the repo root)
cd ../..
pnpm api:dev # API → http://localhost:2137
pnpm app:dev # UI → http://localhost:3000| Path | Description |
|---|---|
apps/api |
Fastify API server |
apps/app |
Next.js 16 UI |
packages/sdk |
npm SDK (@pluma-flags/sdk) |
packages/db |
Prisma schema + migrations |
packages/types |
Shared TypeScript types |
pnpm lint # ESLint across the monorepo
pnpm -r build # type-check + build all packages
pnpm -r test # Vitest suites (requires the DB to be running)All three must pass. PRs that fail CI will not be merged.
- Keep shared contracts in
@pluma-flags/types; bump the package when types change. - Commit Prisma migration files (
packages/db/prisma/migrations/) when the schema changes; never usedb:pushfor changes meant for production. - Write or update tests for every behaviour change.
- Keep functions under ~60 lines; validate all external inputs with Zod.