How moamenelsayedabdelmoamen-hue/el-batal-express-dashboard works
This is an administrative operations dashboard for a delivery/merchant platform, backed by Firebase and callable Cloud Functions. Admins authenticate, enter protected operations screens, and manage merchants, captains, orders, subscriptions, shifts, payments, and live dispatch-related information. The graph groups the major operational domains while retaining the frontend service layer and backend callable services. Source excerpts confirm routing, Firebase setup, and selected data access; many page implementations and backend registrations were not sampled, so uncertain links are omitted or marked unverified.
Main entry points: App.tsx Application routes · index.ts Callable function entry · orderService.ts Order data service · AuthContext.tsx Admin authentication
Components 24
Dashboard app
- Application routes
src/App.tsx - Admin authentication
src/contexts/AuthContext.tsx - Protected routes
src/routes/ProtectedRoute.tsx - Admin notifications
src/contexts/NotificationContext.tsx
Delivery operations
- Operations dashboard
src/pages/Dashboard.tsx - Merchant management
src/pages/Restaurants.tsx - Captain management
src/pages/Captains.tsx - Captain approvals
src/pages/CaptainRegistrations.tsx - Order management
src/pages/Orders.tsx - Live map and dispatch
src/pages/LiveMap.tsx - Captain schedules
src/pages/CaptainShifts.tsx - Order data service
src/services/orderService.ts
Subscriptions and billing
- Subscription management
src/pages/Subscriptions.tsx - Subscription requests
src/pages/SubscriptionRequests.tsx - Payments and plans
src/pages/Payments.tsx - Subscription data service
src/services/subscriptionService.ts
Firebase platform
- Firebase client setup
src/firebase/config.ts - Firestore records
Callable backend
- Callable function entry
functions/src/index.ts - Order workflows
functions/src/ordersService.ts - Manual subscription workflows
functions/src/manualSubscriptionsService.ts - Captain approval workflows
functions/src/captainApprovalService.ts - Shift rules
functions/src/shifts.ts
Other components
- Administrator
Connections 23
- Administrator → Application routes: uses
src/App.tsx - Application routes → Protected routes: routes through
src/App.tsx - Application routes → Admin authentication: provides auth
src/App.tsx - Application routes → Operations dashboard: routes to
src/App.tsx - Application routes → Merchant management: routes to
src/App.tsx - Application routes → Captain management: routes to
src/App.tsx - Application routes → Captain approvals: routes to
src/App.tsx - Application routes → Order management: routes to
src/App.tsx - Application routes → Live map and dispatch: routes to
src/App.tsx - Application routes → Captain schedules: routes to
src/App.tsx - Application routes → Subscription management: routes to
src/App.tsx - Application routes → Subscription requests: routes to
src/App.tsx - Application routes → Payments and plans: routes to
src/App.tsx - Admin authentication → Firebase client setup: uses services
src/contexts/AuthContext.tsx - Firebase client setup → Firestore records: initializes
src/firebase/config.ts - Order data service → Firestore records: reads and writes
src/services/orderService.ts - Order data service → Callable function entry: calls callable
- Subscription data service → Firestore records: uses records
src/services/subscriptionService.ts - Admin notifications → Firestore records: subscribes to updates
src/contexts/NotificationContext.tsx - Callable function entry → Order workflows: dispatches to
functions/src/index.ts - Callable function entry → Manual subscription workflows: dispatches to
functions/src/index.ts - Callable function entry → Captain approval workflows: dispatches to
functions/src/index.ts - Callable function entry → Shift rules: dispatches to
functions/src/index.ts