Strips the .replit/.replitignore files, replit.md (renamed to README.md), the @replit/* vite plugins from cra-app and mockup-sandbox, the @replit catalog/exclusion entries from pnpm-workspace.yaml, the linux-x64-only platform overrides (Replit-specific optimization), and inline @replit comment markers. Also regenerates pnpm-lock.yaml so the project can be installed and built on any platform. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.9 KiB
2.9 KiB
CRA Manager - Compte Rendu d'Activité
Overview
A French timesheet management application (CRA - Compte Rendu d'Activité) built as a pnpm workspace monorepo. Consultants use it to track and report hours worked across multiple projects each month.
Stack
- Monorepo tool: pnpm workspaces
- Node.js version: 24
- Package manager: pnpm
- TypeScript version: 5.9
- Frontend: React + Vite + Tailwind CSS + shadcn/ui
- API framework: Express 5
- Database: PostgreSQL + Drizzle ORM
- Validation: Zod (
zod/v4),drizzle-zod - API codegen: Orval (from OpenAPI spec)
- Build: esbuild (CJS bundle)
- Charts: Recharts
- Routing: Wouter
Features
- Dashboard: Overview with monthly hours chart, project breakdown, active project count, timesheet status
- Timesheet Management: Create, view, edit monthly timesheets (CRA)
- CRA Grid: Interactive calendar grid where rows = projects, columns = days of month. Click cells to open popover with hour options [0, 0.5, 1, 2, 3, 4, 5, 6, 7, 8]. Includes optional description per cell (amber dot indicator). Auto-save with debounce. Weekend distinction, row/column totals
- Project Management: CRUD for projects with code, name, client, category
- Timesheet Workflow: Draft → Submitted → Validated status flow
- Inline Administration: Sidebar Admin dialog to lock/unlock time entry editing and export/import project, CRA, line, and time-entry data as JSON
Database Schema
projects— Project definitions (code, name, client, category)timesheets— Monthly timesheet headers (year, month, status, collaborator)timesheet_lines— Project assignments within a timesheettime_entries— Daily hour entries per line (date, hours, description)
Key Commands
pnpm run typecheck— full typecheck across all packagespnpm run build— typecheck + build all packagespnpm --filter @workspace/api-spec run codegen— regenerate API hooks and Zod schemas from OpenAPI specpnpm --filter @workspace/db run push— push DB schema changes (dev only)pnpm --filter @workspace/api-server run dev— run API server locally
API Endpoints
GET/POST /api/projects— List/create projectsGET/PATCH/DELETE /api/projects/:id— Project CRUDGET/POST /api/timesheets— List/create timesheets (filter by year/month)GET/PATCH/DELETE /api/timesheets/:id— Timesheet CRUD (GET returns full detail with lines and entries)GET/POST /api/timesheets/:id/lines— Timesheet linesDELETE /api/timesheets/:id/lines/:lineId— Remove a linePUT /api/timesheets/:id/entries— Batch upsert time entriesGET /api/dashboard/summary— Dashboard statsGET /api/dashboard/monthly-hours— Monthly hours breakdownGET /api/dashboard/project-hours— Hours per project
See the pnpm-workspace skill for workspace structure, TypeScript setup, and package details.