- Dev server:
bun run dev(auto-refresh enabled) - Build:
bun run build - Lint:
bun run lint - Dependencies: Add with
bun add [package-name] - UI components: Add via
bunx --bun shadcn@latest add [component-name] - Testing: No standard/unit test runner detected; project may be E2E/manual test only
- Imports: Use absolute imports as per Next.js conventions; group external before relative.
- Formatting: Prettier+ESLint conventions, follow project config.
- Types:
- Prefer
interfacefor objects; usetypefor unions/intersections - Strict typing; no
any, useunknownif necessary - Co-locate types with usage; use
types/dir for shared - React prop interfaces prefixed with
Props
- Prefer
- Naming:
- Types/Interfaces: PascalCase
- Vars/functions: camelCase
- Constants: UPPER_CASE
- Folders: kebab-case (e.g.,
policy-card)
- Project Structure:
- Page-specific:
app/ - Shared components:
components/(shadcn/ui incomponents/ui/) - Utilities:
lib/ - CSS in
globals.css
- Page-specific:
- Components:
- Use Server Components by default;
"use client"opt-in - Shadcn/ui or Tailwind style for all UI—avoid custom CSS where possible
- Accessibility matters—use semantic HTML and Radix UI features
- Use Server Components by default;
- Error Handling:
- Server: Custom error types; use try/catch with typed errors
- Client: Show meaningful messages, implement error boundaries
- Other:
- Minimize client state & use SSR/RSC when possible
- Use Zod for form validation if authoring forms
- Favor utility-first (Tailwind) for styling, keep classes organized
This file empowers agentic tools to build, lint, and format code, and keeps contributions aligned with repository standards.