Front-end for the contract builder project — a React + TypeScript SPA scaffolded for a future Canva-inspired design experience.
- React 19 + TypeScript + Vite
- Tailwind CSS v4 (
@tailwindcss/vite, CSS-first@themetokens) - TanStack Router (file-based routes)
- TanStack Query (server state)
- Axios (HTTP — data layer only)
src/
app/ # Bootstrap, providers, router
routes/ # TanStack routes (thin wiring)
domain/ # Entities, ports, use cases
data/ # Axios, DTOs, mappers, repository impls
presentation/ # Atomic components, hooks, pages
shared/ # Env, types, utilities
Dependency flow: Routes → Pages → Hooks → Use Cases → Repository Ports ← Repository Impl → Axios
Demonstrates the full flow from GET /health to UI:
- Domain:
src/domain/entities/app-status.ts,use-cases/get-app-status.ts - Data:
src/data/repositories/app-status.repository.ts - Presentation:
src/presentation/hooks/use-app-status.ts,HomePage.tsx
npm install
cp .env.example .env.local # optional; defaults to http://localhost:3000/api
npm run devOpen http://localhost:5173.
| Command | Description |
|---|---|
npm run dev |
Start dev server |
npm run build |
Typecheck + production build |
npm run preview |
Preview production build |
npm run lint |
Run ESLint |
| Variable | Description | Default |
|---|---|---|
VITE_API_URL |
API base URL for Axios | http://localhost:3000/api |
- Add entity + repository interface + use case in
domain/ - Add DTO, mapper, and repository implementation in
data/ - Add a presentation hook (one concern per hook)
- Compose organisms/molecules/atoms; assemble in a page
- Mount the page from a route file in
routes/
See AGENTS.md and .cursor/skills/ for detailed conventions.
Project Cursor skills live in .cursor/skills/:
frontend-clean-architectureatomic-design-uipresentation-hookscanva-inspired-ux
These skills enforce layer boundaries, atomic design tiers, hook patterns, and Canva-inspired UX direction.