Skip to content

AGENTS.md

  • Use pnpm for all installs, builds, and scripts – not npm or yarn.
  • Always run pnpm lint before commits; some lint rules are stricter than defaults.
  • Database schema changes require running pnpm db:generate and pnpm db:migrate.
  • Environment requires .env values for NEXTAUTH, DATABASE_URL, and Google Cloud Storage.
  • Next.js src/app uses App Router; no legacy pages/ folder.
  • API layer built on tRPC; never create ad-hoc REST endpoints.
  • Auth handled by NextAuth in /app/api/auth/[...nextauth]/route.ts.
  • Use src/server/api/routers for all domain logic; register new routers in root.ts.
  • DB queries must go through Drizzle ORM via @/server/db.
  • Tailwind uses custom config in tailwind.config.ts; match design tokens when styling.
  • Shared types should be colocated in src/types and re-used across front + back ends.
  • tsconfig.json has path aliases (e.g. @/server/*); use them instead of relative imports.
  • Avoid direct access to window APIs without guards – App Router code may run server-side.
  • Default deployment is serverless-friendly; avoid Node-only APIs (fs, net).
  • Large file uploads must use GCS; backend must stream – never buffer in memory.
  • Review postcss.config.js before adding plugins; pipeline already optimized.
  • Drizzle migrations are auto-generated; do not hand-edit migration SQL.
  • Client components must be explicitly marked with "use client".
  • Keep this file under 25 lines – only critical, enforced rules belong here.