No description
Diesel Depot
Diesel depot & fleet management web/mobile app — Lumelela Depot + Fanie se plot Depot.
Stack: Next.js 14 (PWA) · PocketBase backend · Tailwind · TypeScript Dev port: 4002 (avoiding 3000/4001 used by sibling projects)
Quick start
# 1. Install
npm install
# 2. Configure
cp .env.local.example .env.local
# → set NEXT_PUBLIC_POCKETBASE_URL
# → set PB_ADMIN_TOKEN (a superuser auth token from your PB admin)
# 3. Create collections (idempotent — safe to re-run)
npm run pb:create
# 4. Seed initial data (Lumelela, Fanie se plot, owner user, starter truck)
npm run pb:seed
# 5. Run
npm run dev
# → open http://localhost:4002
Default owner login: owner@dieseldepot.local / changeme — change this on first login.
Collections (all prefixed dd_ to avoid clashing with other apps on the same PB)
| Collection | Type | Notes |
|---|---|---|
dd_depots |
base | Lumelela, Fanie se plot, etc. |
dd_trucks |
base | Capacity + current balance + current km |
dd_clients |
base | Customer master + default_lat/lng for anomaly flag |
dd_users |
auth | Drivers, pump attendants, admins, owners |
dd_delivery_notes |
base | Meter readings, photo, signature, status, etc. |
v1 scope
Foundation + delivery note capture. Defer to v2:
- Internal transfers (depot ↔ truck load/empty log)
- Sage invoice bridge (number/amount capture + status)
- Evaporation/loss report
- Location anomaly detection
- Weekly km prompt
- Offline PWA sync queue
PWA
Installable on Android/iOS home screen. Service worker is a stub — no offline cache yet. Pairs well with the camera APIs in the delivery-note form.
Self-host (Coolify)
Static export: NEXT_EXPORT=true npm run build → upload out/ to Coolify's
static-site target, or run a Node service against the regular build.