The Vue app implements M01 A01 staff email/password sign-in, a reset-email action, and a server-side staff authorization check. The A02 intake view lists up to 50 recent driver applications. Submitted applications open A03 person and A04 vehicle review panels with audited private evidence previews and separate approval decisions. Drafts remain visible but cannot enter review.
- Copy
.env.exampleto.env.localand set the Firebase Web app configuration supplied for the development project. TheseVITE_values are public browser configuration, not secrets. - Use
VITE_USE_FIREBASE_EMULATORS=truewhen running the local Auth and Functions emulators fromCode/firebase.json. - Run
npm installandnpm run dev. Runnpm run buildfor type checking and a production bundle.
Set VITE_GOOGLE_MAPS_API_KEY in .env.local and restart the Vite dev server to enable the map in Service towns → Add town/Edit. The Google Cloud project must have billing, Maps JavaScript API and Places API (New) enabled. Use a browser API key restricted to the staff portal's HTTP referrers and to those APIs; add localhost only to a development key. The VITE_ key is visible in the browser, so it is not a server secret. Google map loads and place searches can incur charges; set project quotas and monitor usage. If the key is absent or Google Maps cannot load, the editor exposes the manual coordinate fallback.
Search for a town, select the matching result, and click Draw boundary to add points on the map. Finish boundary enables drag handles for refinement; Add points, Undo last point and Clear boundary are available. The place search centers the map; it does not supply an official city or service polygon. Staff must draw and review the actual service area. The selected place fills the town name, which remains editable. The existing server contract still saves 3–60 latitude/longitude vertices and separately enabled e-rickshaw/carpool flags. Editing an existing town loads its saved polygon; clearing it permits a new place search. No Google map tile or place result is stored as a town boundary.
The staff email/password provider must be enabled. Each authorized staff user also needs a client-provisioned accounts/{uid} record with accessStatus=active and a staffAccounts/{uid} record with enabled=true, role=admin; a successful Firebase Auth login alone never grants access. Staff provisioning is not exposed from this portal.
The first screen follows the current A01 design and uses shared AppButton, FormField and StatusNotice components. Missing Firebase configuration shows a safe unavailable state. The intake and review functions check staff access on every request and write access or decision audit entries. Firestore remains closed to direct browser reads. Correction and rejection actions await the applicant resubmission flow.
Draft applications remain visible in the queue but cannot enter review until submitted. For a submitted application, open Person review or Vehicle review and select a document in Evidence & revisions. The browser receives its bytes only through the audited getEvidencePreview callable; direct Storage reads stay denied. Image and PDF previews use short-lived browser blob URLs, with an Open in new tab fallback.
If evidence labels appear but a preview reports that private Storage is unavailable, the Firestore evidence records exist but the corresponding object cannot currently be fetched from the configured Storage bucket or emulator. Check the Storage emulator/bucket and retry; if the object is truly missing, request a replacement upload from the applicant. A Firestore evidence record alone does not contain the document bytes.