How phanindra798/loadmitra works
LoadMitra is a two-sided freight marketplace: shippers search routes and truck types, compare full/shared/return-load estimates, and book or track loads; captains receive requests, accept loads, progress trips with OTP-gated pickup/delivery, and review earnings. Both portals use one shared API. The graph reflects the documented product scope and sampled source; unsampled route and feature wiring is represented only where the README or tree supports it. Matching and tracking sockets and payments are not implemented in this version.
Main entry points: index.ts API route dispatch · src/routes Shipper workflows · src/routes Captain workflows · app.ts HTTP application
Components 19
Shipper portal
- Shipper workflows
shipper/frontend/src/routes - Booking state
shipper/frontend/src/features/shipper/booking-context.tsx - Shipper API client
shipper/frontend/src/lib/api.ts - Estimate display
shipper/frontend/src/features/shipper/pricing.ts
Captain portal
- Captain workflows
captain/frontend/src/routes - Captain state
captain/frontend/src/features/captain/captain-context.tsx - Captain API client
captain/frontend/src/lib/api.ts
Shared API
- HTTP application
server/src/app.ts - API route dispatch
server/src/routes/index.ts - OTP and profile
server/src/controllers/auth.controller.ts - Trip lifecycle
server/src/controllers/trips.controller.ts
Marketplace services
- Pricing service
server/src/services/pricing.service.ts - Earnings service
server/src/services/earnings.service.ts - Truck catalogue
server/src/controllers/trucks.controller.ts
Persistence
- Booking data
server/src/models/booking.model.ts - User data
server/src/models/user.model.ts
Other components
- Shipper
- Captain
- MongoDB
Connections 20
- Shipper → Shipper workflows: searches and books
- Shipper workflows → Booking state: updates draft
- Shipper workflows → Estimate display: shows estimates
- Shipper workflows → Shipper API client: requests marketplace data
- Shipper API client → HTTP application: calls shared API
- Captain → Captain workflows: manages loads
- Captain workflows → Captain state: uses captain state
- Captain workflows → Captain API client: requests load and trip data
- Captain API client → HTTP application: calls shared API
- HTTP application → API route dispatch: dispatches requests
- API route dispatch → OTP and profile: dispatches auth
- API route dispatch → Trip lifecycle: dispatches trip actions
- API route dispatch → Pricing service: dispatches estimates
- API route dispatch → Earnings service: dispatches earnings
- API route dispatch → Truck catalogue: dispatches catalogue
- OTP and profile → User data: reads and updates
- Trip lifecycle → Booking data: reads and updates
- Pricing service → Truck catalogue: uses truck rates
- Booking data → MongoDB: persists
- User data → MongoDB: persists