FS Garage Score Card (FE) API Reference
This module talks directly to PocketBase collections in fs-garage-base via the PocketBase JS SDK - there are no dedicated custom hook routes for Score Card yet (unlike Utilisation, which uses pb_hooks).
Authentication
PocketBase user session (cookie/token via SDK), same auth gate as the rest of FS Garage (middleware.js on app/(auth)/ routes).
Base URL
PocketBase: http://127.0.0.1:8091
Collections used by Score Card
| Collection | Purpose | Notes |
|---|---|---|
metric_categories | Groups of metrics per project | Read/write from store/index.js |
metrics | Individual metric definitions within a category | Read/write from store/index.js |
metric_entries | Time-series values for a metric | Read/write from store/index.js |
projects | Existing collection, reused for project context | - |
The PocketBase field is metrics.frequency. store/index.js translates it to default_granularity when reading a metric (and back to frequency when writing) so the rest of the FE codebase - cadence.js, useQuickEntry.js, MetricForm.jsx - only ever deals with one name. If you're adding a new read/write path for metrics, go through the store rather than the raw PocketBase field name.
Full field-by-field reference (including target_daily/weekly/monthly/quarterly/annually, target_custom + its date range, is_headline_kpi, momentum cache, and access rules): see FS Garage Score Card (BE) API Reference.