app/: Next.js App Router entry points;page.tsxfor the homepage,layout.tsxfor shared shells,api/for server routes (email, etc.), andglobals.cssfor base styles.components/: Reusable UI built as PascalCase.tsxcomponents; shared animations/styles live alongside in files likeHyperspeed.css.data/andutils/: Centralized static content and small helpers; prefer adding new constants/helpers here instead of scattering literals.lib/: Cross-cutting logic (e.g., config, integrations) that should stay framework-agnostic.public/: Static assets (images, fonts) served as-is.
npm run dev: Start the local dev server athttp://localhost:3000.npm run build: Production build; use before release or significant refactors to catch compile errors.npm run start: Serve the production build locally.npm run lint: Run ESLint with the shared config ineslint.config.mjs; ensure clean output before opening a PR.
- Language: TypeScript + React (RSC-aware). Prefer functional components and hooks over classes.
- Formatting: Follow ESLint defaults (2-space indent). Keep imports ordered and remove unused symbols.
- Naming: Components and files in
components/use PascalCase; hooks/utilities use camelCase. Keep route segments inapp/lowercase and hyphenated. - Styling: Global tweaks in
app/globals.css; component-level styles colocated. Reuse Chakra/Tailwind utility patterns already present instead of mixing new systems.
- No automated test suite is configured yet. For new features, add lightweight component/utility tests (e.g., React Testing Library or Vitest) alongside the code or in a
__tests__/folder. - Name tests after the unit under test (e.g.,
Navbar.test.tsx) and keep assertions focused on rendered behavior and accessibility. - Run lint and a production build when tests are absent to catch common regressions.
- Commit messages in this repo are short and present-tense (e.g.,
change in routes for sending email). Follow that style: imperative subject under 72 chars. - For each PR, include: what changed, why, and how to verify (commands or URLs). Link related issues and add screenshots/recordings for UI changes.
- Ensure
npm run lintand, when applicable, new tests pass before requesting review. Note any breaking changes or migration steps in the PR description.
- Keep secrets (API keys, SMTP credentials) in
.env.local; never commit them. Document required env vars in the PR when introducing new ones. - Validate all server-side inputs in
app/api/handlers and avoid logging sensitive payloads.