feat(frontend): scaffold — Tailwind v4, routing, API layer, UserContext
- tailwindcss + @tailwindcss/vite, react-router-dom, date-fns, zod installed - vite.config.ts: Tailwind v4 Vite plugin wired in - index.css: single @import "tailwindcss" (zero-config v4) - main.tsx: wrapped in <BrowserRouter>; imports index.css - App.tsx: layout shell with <TopBar/> + <Routes> (/, /weekly, /monthly, /projects) - lib/api.ts: Zod schemas for all API types + typed fetch wrapper; all responses validated before field access (per CLAUDE.md rule) - lib/format.ts: minutesToHmm, hmmToMinutes, centsToEur, ISO week helpers, year-month helpers, formatDate - lib/types.ts: z.infer<> re-exports from api.ts - state/UserContext.tsx: selected user persisted in localStorage; auto- selects first user on load Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -13,12 +13,15 @@
|
||||
"format": "biome format --write src"
|
||||
},
|
||||
"dependencies": {
|
||||
"date-fns": "^4.1.0",
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0",
|
||||
"react-router-dom": "^7.15.1",
|
||||
"zod": "^3.23.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^1.9.4",
|
||||
"@tailwindcss/vite": "^4.3.0",
|
||||
"@testing-library/jest-dom": "^6.6.3",
|
||||
"@testing-library/react": "^16.1.0",
|
||||
"@testing-library/user-event": "^14.5.2",
|
||||
@@ -26,6 +29,7 @@
|
||||
"@types/react-dom": "^19.0.2",
|
||||
"@vitejs/plugin-react": "^4.3.4",
|
||||
"jsdom": "^25.0.1",
|
||||
"tailwindcss": "^4.3.0",
|
||||
"typescript": "~5.7.2",
|
||||
"vite": "^6.0.5",
|
||||
"vitest": "^2.1.8"
|
||||
|
||||
Reference in New Issue
Block a user