Getting Started with FS Garage Utilisation (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 with PocketBase and timesheet settings (exact keys are in repo docs/ / env samples):
# Example shape - confirm names in the FE repo
NEXT_PUBLIC_POCKETBASE_URL=http://127.0.0.1:8091
# Timesheet base URL used by lib/timesheet helpers
Step 4: Run
npm run dev
# next dev --turbopack
Open the app (default Next.js port) and sign in through Garage auth. Utilisation is under the header icon after Timesheet (/utilization).
Useful scripts
| Script | Purpose |
|---|---|
npm run dev | Local Next.js (Turbopack) |
npm run build / npm start | Production build/serve |
npm test | Vitest |
npm run test:e2e | Playwright |
npm run preview / npm run deploy | OpenNext Cloudflare |
Verification
- Login works via PocketBase users
- Header shows Utilisation icon
/utilizationloads scorecard shell without FE calc errors
Backend required
Scorecard data comes from fs-garage-base hooks. Start PocketBase locally before testing Run Now / scorecard.
Troubleshooting
Issue: Auth redirect loop
- Solution: Check
middleware.jsand PocketBase URL in.env.local
Issue: Empty scorecard
- Solution: Confirm BE
/api/utilisation/scorecardand published allocations exist