FS Garage Utilisation (FE) API Reference
The FE consumes PocketBase collections and custom BE hook routes from fs-garage-base.
Authentication
PocketBase user session (cookie/token via SDK). Routes under app/(auth)/ require login via middleware.js.
Base URL
PocketBase: http://127.0.0.1:8091
Endpoints used by Utilisation
| Method | Path | Purpose |
|---|---|---|
| POST | /api/utilisation/run | Pull timesheet + compute + upsert snapshot |
| GET | /api/utilisation/scorecard | Return snapshot + sparklines |
| POST | /api/allocations/copy-forward | Draft next week from last published |
| POST | /api/allocations/publish | Publish allocation rows for a week |
Exact request/response shapes: see BE docs/DESIGN.md and docs/UX.md.
Error Responses
FE must display BE error JSON shapes from docs/UX.md / BE UX.md (error, code, details).
Next Steps
- Architecture
- Getting Started
- Backend docs: fs-garage-base