Delivery rider frontend for the MedRush platform. This app is built on the existing portable Preact template and is wired to the current backend contract documented in server/FRONTEND_API_CONTRACT.md.
cd portable
npm install
npm run devBuild for production:
cd portable
npm run buildSet these before running npm run dev or npm run build:
API_BASE_URL: Backend base URL. Default:http://localhost:8000API_TIMEOUT_MS: Request timeout in milliseconds. Default:10000API_AUTH_HEADER: Auth header key expected by the backend. Default:tokenENABLE_MOCK_DATA: Set totrueor1to allow small mock delivery fallbacks when backend data is unavailable
//login/register/dashboard/deliveries/deliveries/:id/active/profile
- Agent login, registration, logout, and local session persistence
- Pending delivery dashboard backed by
GET /api/v1/agent/orders/pending - Accept delivery action backed by
POST /api/v1/agent/orders/:order_id/accept - Delivery detail pages using live list data plus local cache fallback because a single-delivery endpoint is missing
- Active deliveries view based on accepted delivery cache
- Profile update flow backed by
PATCH /api/v1/agent/account - Centralized API client, shared interfaces, loading states, empty states, and error states
- No backend profile-read or
meendpoint, so profile screens start from cached auth payloads - No assigned-deliveries endpoint after accept, so active runs are stored locally
- No delivery lifecycle endpoints beyond accept, so pickup, in-transit, and delivered actions remain TODO states in the UI
- Pickup pharmacy details are shown only when available in the existing order payload
- Browser requests can fail if backend CORS is not enabled for the frontend origin
POST /api/v1/auth/signupPOST /api/v1/auth/signinPOST|PATCH|PUT /api/v1/agent/accountGET /api/v1/agent/orders/pendingPOST /api/v1/agent/orders/:order_id/accept