This template uses a modern, type-safe stack optimized for designer-led development with ACA assistance.
- Version: 14+
- Why: Server components, excellent TypeScript support, built-in optimizations
- Key Files:
app/directory
- Mode: Strict
- Why: Type safety helps ACAs understand code better
- Config:
tsconfig.json
- Version: 3.x
- Why: Utility-first CSS, excellent ACA support
- Config:
tailwind.config.ts
- Why: Accessible, customizable components
- Location:
components/ui/ - Installation: Included in repo (not via npm)
- Why: Type-safe form handling with validation
- Usage: See
components/examples/form-with-validation.tsx
- Why: Real-time database with built-in backend functions
- Schema:
convex/schema.ts - Queries/Mutations:
convex/*.tsfiles - Client: Used via hooks in
features/*/hooks/
UI Components → Domain Hooks → Convex Queries/Mutations → Database
Important: UI components should NEVER call Convex directly. Always use domain hooks.
- Version: v5
- Why: Industry-standard authentication
- Route:
app/api/auth/[...nextauth]/route.ts - Helper:
core/auth/getCurrentUser.ts
features/<domain>/
├─ components/ # React components
├─ hooks/ # Domain hooks (wrap Convex)
├─ index.ts # Barrel exports
└─ README.md # Domain documentation
convex/
├─ schema.ts # Database schema
├─ <domain>.ts # Domain queries/mutations
└─ system.ts # System functions (protected)
components/
├─ ui/ # shadcn/ui components
├─ layout/ # Layout components
├─ charts/ # Chart components
└─ examples/ # Pattern examples
- Convex:
convex/projects.ts - Hooks:
features/projects/hooks/ - Components:
features/projects/components/ - Types:
lib/types.ts(Project type)
- Convex:
convex/users.ts(user profile) - Hooks:
features/settings/hooks/ - Components:
features/settings/components/
- Convex:
convex/ai-assistant.ts - Hooks:
features/ai-assistant/hooks/ - Components:
features/ai-assistant/components/
- User Action → Component event handler
- Component → Calls domain hook
- Hook → Calls Convex query/mutation
- Convex → Updates database
- Convex → Pushes update to client
- Hook → Returns updated data
- Component → Re-renders with new data
- All Convex functions are fully typed
- Use
Id<"table">for Convex IDs - Import types from
@/convex/_generated/dataModel - Use Zod schemas for validation
- Managed via Vercel dashboard
- Validated in
core/config/env.ts(protected) - See
.env.examplefor required variables
- Platform: Vercel
- Database: Convex (hosted)
- CI/CD: GitHub Actions (
.github/workflows/ci.yml)