Skip to content

Latest commit

 

History

History
42 lines (35 loc) · 2.6 KB

File metadata and controls

42 lines (35 loc) · 2.6 KB

Repository Guidelines

Project Structure & Module Organization

  • app/ – Next.js App Router (pages, layouts, and app/api/* route handlers).
  • components/ – Reusable React components styled with Tailwind.
  • lib/ – Domain logic and services (e.g., lib/supabase/services/* including MentorFit and clinical hours).
  • scripts/ – Local/CI utilities (lint, security, validation).
  • tests/unit/ (Vitest), integration/ and e2e/ (Playwright). Test setup in tests/setup.ts.
  • Config: next.config.ts, tailwind.config.ts, playwright.config.ts, vitest.config.ts.

Build, Test, and Development Commands

  • npm run dev – Start the Next.js dev server.
  • npm run build – Production build; verify before PRs.
  • npm start – Serve the production build locally.
  • npm run lint – ESLint + semantic token check.
  • npm run type-check – TypeScript without emitting.
  • Tests: npm run test:unit, test:integration, test:e2e, test:all.
  • Gate: npm run validate – lint + type-check + file length check.

Coding Style & Naming Conventions

  • TypeScript + React 19 + Next.js App Router.
  • ESLint: extends next/core-web-vitals and next/typescript; warns on unused vars (_-prefixed allowed) and any.
  • Components: PascalCase files in components/. Utility modules in lib/ use camelCase exports. Route folders in app/ use kebab-case.
  • Tailwind: prefer semantic color tokens; keep class lists readable.

Testing Guidelines

  • Unit (Vitest): place under tests/unit, name *.test.ts.
  • Integration/E2E (Playwright): tests/integration and tests/e2e, use test.describe suites.
  • Run npm run test:all (or targeted suites) before PRs. For service changes in lib/, add/extend unit tests; use vitest run --coverage when touching business logic.

Commit & Pull Request Guidelines

  • Use Conventional Commits: feat|fix|perf|docs|refactor(scope): summary (see git log).
  • PRs: focused scope, clear description, linked issues, repro steps; add screenshots for UI changes and note env flags.
  • CI expectations: npm run validate, npm run build, and relevant tests must pass.

Security & Configuration Tips

  • Never commit secrets. Use .env.local; mirror keys from .env.example.
  • Helpful checks: npm run security:scan, npm run security:test, npm run audit:auth, npm run verify:supabase.
  • Sentry/Clerk/Stripe/Supabase/Netlify require proper env vars; update docs when changing integrations.

Agent Playbooks (Optional)

  • Sub‑agents live in .codex/agents/*.md. For multi‑domain work, orchestration rules are in .cursorrules (trigger: “high level task: …”).