Skip to content

Latest commit

Β 

History

History
41 lines (34 loc) Β· 2.05 KB

CLAUDE.md

File metadata and controls

41 lines (34 loc) Β· 2.05 KB

FilesDrop

Fullstack monorepo β€” Bun workspaces + Turborepo.

Structure

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)

Commands

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

Conventions

  • Bun is the package manager; versions are pinned exactly (bunfig.toml). Never npm 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 β€” through PrismaService (src/database/). The web app talks to the API over HTTP, never to the database.
  • Schema changes go through prisma migrate dev with 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 with class-validator decorators. helmet and 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.ts next to the code (api). A bug fix comes with the test that would have caught it.