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>
60 lines
2.9 KiB
Markdown
60 lines
2.9 KiB
Markdown
# 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 timesheet
|
|
- `time_entries` — Daily hour entries per line (date, hours, description)
|
|
|
|
## Key Commands
|
|
|
|
- `pnpm run typecheck` — full typecheck across all packages
|
|
- `pnpm run build` — typecheck + build all packages
|
|
- `pnpm --filter @workspace/api-spec run codegen` — regenerate API hooks and Zod schemas from OpenAPI spec
|
|
- `pnpm --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 projects
|
|
- `GET/PATCH/DELETE /api/projects/:id` — Project CRUD
|
|
- `GET/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 lines
|
|
- `DELETE /api/timesheets/:id/lines/:lineId` — Remove a line
|
|
- `PUT /api/timesheets/:id/entries` — Batch upsert time entries
|
|
- `GET /api/dashboard/summary` — Dashboard stats
|
|
- `GET /api/dashboard/monthly-hours` — Monthly hours breakdown
|
|
- `GET /api/dashboard/project-hours` — Hours per project
|
|
|
|
See the `pnpm-workspace` skill for workspace structure, TypeScript setup, and package details.
|