Skip to main content

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​

CollectionPurposeNotes
metric_categoriesGroups of metrics per projectRead/write from store/index.js
metricsIndividual metric definitions within a categoryRead/write from store/index.js
metric_entriesTime-series values for a metricRead/write from store/index.js
projectsExisting collection, reused for project context-
frequency ↔ default_granularity

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.

Next Steps​