Getting Started with FS Garage Score Card (FE)
Prerequisites
- Node.js 20+
- npm / yarn / pnpm / bun
- Access to
TeamFleetStudio/base-fs-garage-fe - Local or remote PocketBase URL from
fs-garage-base(typicallyhttp://127.0.0.1:8091)
Installation
Step 1: Clone
- HTTPS
- SSH
git clone https://github.com/TeamFleetStudio/base-fs-garage-fe.git
cd base-fs-garage-fe
git clone git@github.com:TeamFleetStudio/base-fs-garage-fe.git
cd base-fs-garage-fe
Step 2: Install dependencies
npm install
Step 3: Configure environment
Create .env.local pointing at your PocketBase instance (see repo env samples for exact keys):
NEXT_PUBLIC_POCKETBASE_URL=http://127.0.0.1:8091
Step 4: Run
npm run dev
# next dev --turbopack
Sign in through Garage auth, open a project, and go to its Score tab (/project/[id]/score).
Useful scripts
| Script | Purpose |
|---|---|
npm run dev | Local Next.js (Turbopack) |
npm run build / npm start | Production build/serve |
npm test | Vitest (includes components/scorecard/*.test.jsx and every lib/scorecard/*.test.js formula test) |
npm run test:e2e | Playwright |
Verification
- Opening a project's Score tab shows the empty state if no metrics exist yet, or category/metric rows if data exists
- Manage Data lets you create a category and metric, then add an entry via
EntriesModal(or the auto-saving Quick Entry fields) - the write requires an owner/ceo/c-suite/project-leadaccount, see FS Garage Score Card (BE) Getting Started npm test -- lib/scorecardruns just the calculation-library unit tests (rollup,delta,targetPolicy,healthStatus,overlap,cadence,snapshot, ...) if you only touched formulas
Write access required for Manage Data
Creating/editing categories, metrics, or entries needs a PocketBase user that's the project owner or has ceo/c-suite/project-lead role - a plain member can view the Score Card but write attempts will 403. See FS Garage Score Card (BE) API Reference.
Troubleshooting
Issue: Score tab shows empty state even though you expect data
- Solution: Confirm the
metric_categories/metrics/metric_entriescollections exist on the PocketBase instance you're pointed at, and that the roll-up isn't returningnullbecause no entry is fully contained in (or straddles) the selected window - see the containment rule
Issue: Manage Data write fails with a 403
- Solution: The signed-in account needs to be the project owner or hold
ceo/c-suite/project-lead- see the write-access callout above