Skip to content

feat(admin-dashboard): scaffold Vite + React app for fleet administra…#2

Merged
maaref-insat merged 1 commit into
mainfrom
feature/admin-dashboard
Jul 17, 2026
Merged

feat(admin-dashboard): scaffold Vite + React app for fleet administra…#2
maaref-insat merged 1 commit into
mainfrom
feature/admin-dashboard

Conversation

@omarmaaref

Copy link
Copy Markdown
Owner

…tion

Second frontend audience-focused on fleet administration rather than operator use. Runs on port 5174 and shares the same backend.

Capabilities (kept intentionally simple — no WebSocket):

  • Add vehicle form (POST /vehicles with a name)
  • Table of vehicles with per-row Set online/offline button hitting PATCH /vehicles/:id/connectivity — surfaces the CANNOT_OFFLINE_ASSIGNED_VEHICLE rejection as a toast so admins see why a toggle failed
  • Per-row Delete button with confirm dialog
  • Assignment column names the operator holding the vehicle (fetched once at mount) or falls back to the id suffix
  • 5-second HTTP polling for freshness

Structure mirrors operator-dashboard: strict TS, dark theme reused from the same CSS variables, Toast + useToasts pattern reused verbatim. Kept as a separate Vite app rather than a shared route so the two dashboards can evolve independently — different audiences, different eventual auth scope, different deploy artefacts.

Root package.json now fans out to three apps:

  • install:all installs deps in root + all three apps
  • dev boots Mongo (docker compose up -d --wait), backend, operator dashboard, and admin dashboard in parallel via concurrently with colored prefixes
  • new admin:dev / admin:build pass-throughs
  • frontend:* renamed to operator:* for consistency

Commitlint scope allowlist gains 'admin-dashboard'. README expanded to document both dashboards and add a comprehensive architecture, concurrency, testing, and evolution notes section.

Summary

Changes

  • Backend:
  • Frontend:
  • Infra / CI:
  • Docs:

Testing

  • npm test in apps/backend passes
  • npx tsc --noEmit passes in both apps
  • Manually verified via the operator dashboard
  • Manually verified via the Swagger UI at /docs

Notes for reviewers

…tion

Second frontend audience-focused on fleet administration rather than
operator use. Runs on port 5174 and shares the same backend.

Capabilities (kept intentionally simple — no WebSocket):
- Add vehicle form (POST /vehicles with a name)
- Table of vehicles with per-row Set online/offline button hitting
  PATCH /vehicles/:id/connectivity — surfaces the
  CANNOT_OFFLINE_ASSIGNED_VEHICLE rejection as a toast so admins see
  why a toggle failed
- Per-row Delete button with confirm dialog
- Assignment column names the operator holding the vehicle (fetched
  once at mount) or falls back to the id suffix
- 5-second HTTP polling for freshness

Structure mirrors operator-dashboard: strict TS, dark theme reused
from the same CSS variables, Toast + useToasts pattern reused verbatim.
Kept as a separate Vite app rather than a shared route so the two
dashboards can evolve independently — different audiences, different
eventual auth scope, different deploy artefacts.

Root package.json now fans out to three apps:
- install:all installs deps in root + all three apps
- dev boots Mongo (docker compose up -d --wait), backend, operator
  dashboard, and admin dashboard in parallel via concurrently with
  colored prefixes
- new admin:dev / admin:build pass-throughs
- frontend:* renamed to operator:* for consistency

Commitlint scope allowlist gains 'admin-dashboard'. README expanded to
document both dashboards and add a comprehensive architecture,
concurrency, testing, and evolution notes section.
@maaref-insat
maaref-insat merged commit f49ea36 into main Jul 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants