Fullstack monorepo β Bun workspaces + Turborepo.
apps/
api/ β NestJS 11 API, Prisma 7 (PostgreSQL, pg driver adapter) :7347
web/ β Next.js 16 (App Router, Turbopack), React 19, Tailwind 4 :4747
packages/
shared/ β @filesdrop/shared β code shared by api and web
docker/ β docker-compose: PostgreSQL 16 :6543
scripts/ β db-start-docker.sh (up β migrate β seed)
| Command | What it does |
|---|---|
bun install |
install all workspaces |
bun run db:setup |
start PostgreSQL, apply migrations, seed |
bun run start:dev |
api + web in watch mode |
bun run build |
build everything (turbo, cached) |
bun run lint / bun run test |
lint (Biome) / tests (Jest in api) |
bun run check |
Biome lint + format + import order, no writes |
bun run db:migrate |
prisma migrate dev β create and apply a migration |
bun run db:generate |
regenerate the Prisma client |
bun run db:studio |
Prisma Studio |
- Bun is the package manager; versions are pinned exactly (
bunfig.toml). Nevernpm install/yarn. - Biome is the only linter and formatter β single quotes, trailing commas, 2 spaces. No ESLint / Prettier.
- Prisma is imported only by
apps/apiβ throughPrismaService(src/database/). The web app talks to the API over HTTP, never to the database. - Schema changes go through
prisma migrate devwith a descriptive name; never edit an applied migration. - Shared types and pure helpers go in
packages/shared; it must stay framework-free. - API: global
ValidationPipe(whitelist,forbidNonWhitelisted) β every input is a DTO withclass-validatordecorators.helmetand CORS (WEB_URL) are on. - Environment:
apps/*/.env(git-ignored), documented in.env.example. Add a variable to the example in the same change that reads it. - TypeScript strict everywhere; no
any. - Tests:
*.spec.tsnext to the code (api). A bug fix comes with the test that would have caught it.