How sabbir2268/zap-shift works
ZapShift is a courier platform spanning a React client and an Express/MongoDB API. Customers authenticate, submit parcels, track and update them, then pay; riders apply to deliver, and admins review riders and manage platform records. Public pages provide service information and branch coverage. The client router guards customer and admin areas, while shared API access attaches Firebase tokens. The server verifies authentication and enforces roles before accessing MongoDB or payment and upload integrations. Server routing and persistence are in one file; unsampled details are represented only where documented.
Main entry points: Router.jsx Client router · axiosClient.js Authenticated API client · index.js API and access control · AuthProvider.jsx Session and role
Components 23
Public experience
- Public pages
client/src/pages/home/Home.jsx - Branch coverage
client/src/pages/coverage/Coverage.jsx
Customer workflow
- Parcel booking and tracking
client/src/pages/dashboard/sendParcel/SendParcel.jsx - Parcel data access
client/src/api/parcels.js - Checkout and history
client/src/pages/dashboard/payment/Payment.jsx - Payment data access
client/src/api/payments.js - Rider application
client/src/pages/beARider/BeARider.jsx
Operations
- Admin dashboard
client/src/pages/admin/AdminHome.jsx - Admin management
client/src/pages/admin/manageParcels/ManageParcels.jsx
Shared platform
- Sign in and registration
client/src/pages/auth/LogIn.jsx - Client router
client/src/routes/Router.jsx - Route guards
client/src/routes/PrivateRoutes.jsx - Session and role
client/src/context/AuthContext/AuthProvider.jsx - Authenticated API client
client/src/context/AxiosContext/axiosClient.js - API and access control
server/index.js - MongoDB records
server/index.js
Other components
- Visitor
- Customer
- Rider applicant
- Administrator
- Firebase Auth
- Stripe
- imgBB uploads
Connections 24
- Visitor → Client router: opens
- Customer → Client router: opens
- Rider applicant → Client router: opens
- Administrator → Client router: opens
- Client router → Public pages: routes
- Client router → Branch coverage: routes
- Client router → Sign in and registration: routes
- Client router → Route guards: guards
- Route guards → Session and role: checks session
- Sign in and registration → Session and role: signs in
- Session and role → Firebase Auth: authenticates
- Session and role → API and access control: loads role
- Parcel booking and tracking → Parcel data access: requests parcel data
- Checkout and history → Payment data access: requests payment data
- Rider application → Authenticated API client: submits application
- Parcel data access → Authenticated API client: sends API requests
- Payment data access → Authenticated API client: sends API requests
- Admin dashboard → Authenticated API client: sends API requests
- Authenticated API client → API and access control: calls API
- API and access control → MongoDB records: reads and writes
- Checkout and history → Stripe: checkout
- API and access control → Stripe: creates payment intents
- API and access control → imgBB uploads: proxies uploads
- Admin management → Authenticated API client: manages records