- apps/web: Next.js app (primary product). Uses Prisma, TRPC, Tailwind.
- apps/marketing: Public marketing site (Next.js, static export).
- apps/docs: Mintlify docs content.
- apps/smtp-server: SMTP proxy/server (TypeScript → tsup build).
- packages/*: Shared libraries (email-editor, ui, eslint-config, tailwind-config, typescript-config, sdk).
- docker/: Dev/compose files; .env* at repo root define configuration.
pnpm i: Install workspace deps (Node >= 20).pnpm dev: Turbo dev for all relevant apps (loads.env).pnpm start:web:local: Run onlyapps/weblocally on port 3000.pnpm build: Turbo build across the monorepo.pnpm dx/pnpm dx:up/pnpm dx:down: Spin up/down local infra via Docker Compose, then run migrations.- Database (apps/web filter):
pnpm db:generate|db:migrate-dev|db:push|db:studio. - Never run migrations unless users explicitly asked
- Files: React components PascalCase (e.g.,
AppSideBar.tsx); folders kebab/lowercase. - Paths (web): use alias
~/for src imports (e.g.,import { x } from "~/utils/x"). - NEVER USE DYNAMIC IMPORTS. ALWAYS IMPORT ON THE TOP
- Prefer to use trpc alway unless asked otherwise
- Web testing is configured with Vitest in
apps/web; add tests when changes impact logic, APIs, or behavior. - Prefer targeted suites first:
pnpm test:web:unit,pnpm test:web:trpc,pnpm test:web:api; usepnpm test:webfor default non-integration coverage. - Test file conventions:
*.unit.test.ts,*.trpc.test.ts,*.api.test.ts,*.integration.test.ts. - Integration tests require infra and env (
RUN_INTEGRATION=truewith Postgres/Redis available). Root commandspnpm test:web:allandpnpm test:web:integration:fullauto-manage infra lifecycle. - Use
pnpm test:infra:up/pnpm test:infra:downwhen running targeted integration commands manually. pnpm test:web:integration:fullandtest:integration:preparerun Prisma migrations (prisma migrate deploy); never run these unless the user explicitly asks.- Test defaults are cloud mode (
NEXT_PUBLIC_IS_CLOUD=true); keep new tests compatible with cloud behavior unless the task says otherwise.
- Prefer Conventional Commits (
feat:,fix:,chore:,docs:). Git history shows frequent feat/fix usage. - PRs must include: clear description, linked issues, screenshots for UI changes, migration notes, and verification steps.
- never run build,migration commands unless asked for