How raunit962/kirana-connect works
KiranaConnect is a decentralized PUDO logistics network. Customers receive a parcel pass, riders deliver parcels to matched kirana hubs with drop proof, and merchants release parcels using OTP or QR validation while earning commission. Admins onboard stores and inspect matching. The sampled backend confirms Express routing, Haversine matching, security validation, and in-memory state; frontend portal capabilities are represented from the tree and README, but their API wiring was not sampled.
Components 24
Role Portals
- App Shell
frontend/src/App.tsx - Customer Portal
frontend/src/views/CustomerPortal.tsx - Agent Portal
frontend/src/views/AgentPortal.tsx - Merchant Portal
frontend/src/views/MerchantPortal.tsx - Admin Portal
frontend/src/views/AdminPortal.tsx
Operational UI
- Role Auth
frontend/src/components/AuthModal.tsx - QR Scanner
frontend/src/components/QRScannerModal.tsx - Status Timeline
frontend/src/components/StatusTimeline.tsx - Interactive Map
frontend/src/components/InteractiveMap.tsx - Shelf Visualizer
frontend/src/components/ShelfRackVisualizer.tsx - UPI Soundbox
frontend/src/components/UPISoundbox.tsx
Backend API
- API Server
backend/src/server.ts - Parcel Routes
backend/src/routes/parcels.routes.ts - Parcel Controller
backend/src/controllers/parcelController.ts - Store Controller
backend/src/controllers/storeController.ts - Matching Controller
backend/src/controllers/matchingController.ts
Domain Services
- Mock Database
backend/src/data/mockDatabase.ts - Hub Matching
backend/src/services/matchingEngine.ts - Pickup Security
backend/src/services/securityService.ts - Domain Types
backend/src/models/types.ts
Other components
- Customer
- Delivery Rider
- Kirana Merchant
- Logistics Admin
Connections 25
- Customer → Customer Portal: uses
- Delivery Rider → Agent Portal: uses
- Kirana Merchant → Merchant Portal: uses
- Logistics Admin → Admin Portal: uses
- App Shell → Customer Portal: renders
- App Shell → Agent Portal: renders
- App Shell → Merchant Portal: renders
- App Shell → Admin Portal: renders
- App Shell → Role Auth: opens
- App Shell → Status Timeline: renders
- App Shell → Interactive Map: renders
- API Server → Parcel Routes: mounts
- API Server → Store Controller: routes
- API Server → Matching Controller: routes
- Parcel Routes → Parcel Controller: dispatches
- Parcel Controller → Mock Database: reads/writes
- Parcel Controller → Hub Matching: selects hub
- Parcel Controller → Pickup Security: validates pickup
- Store Controller → Mock Database: reads/writes
- Matching Controller → Mock Database: reads stores
- Matching Controller → Hub Matching: ranks hubs
- Parcel Controller → Domain Types: uses types
- Store Controller → Domain Types: uses types
- Hub Matching → Domain Types: uses types
- Pickup Security → Domain Types: validates parcel