How shrivishalcr-wq/sop works
VendiConnect connects residents with nearby mobile vendors: vendors share locations, residents discover nearby vendors and receive proximity alerts, while residents and vendors can rate and manage their profiles. Vendors also onboard and manage consent through WhatsApp; administrators oversee operations through a web console. The graph follows the documented route and client wiring, but README evidence is absent and several controller, map, and notification implementations were not sampled, so uncertain runtime links are omitted.
Main entry points: vendorRoutes.js Vendor endpoints · app.js Express API · adminController.js Admin operations · vendorSessionService.js Consent sessions
Components 29
Resident app
- Resident app
Frontend/Resident/App.js - Resident authentication
Frontend/Resident/src/context/AuthContext.js - Vendor discovery map
Frontend/Resident/src/screens/main/MapScreen.js - Resident API client
Frontend/Resident/src/api/client.js
Vendor services
- Consent sessions
Backend/src/services/vendorSessionService.js - WhatsApp webhook client
Backend/src/whatsapp-client.js - WhatsApp message router
Backend/src/services/whatsappMessageRouter.js - WhatsApp onboarding
Backend/src/services/whatsappOnboardingService.js
Admin console
- Admin console
Frontend/Admin/src/App.jsx - Admin navigation
Frontend/Admin/src/routes/router.jsx - Admin API client
Frontend/Admin/src/api/client.js
Backend API
- Express API
Backend/src/app.js - Admin endpoints
Backend/src/routes/adminRoutes.js - Vendor endpoints
Backend/src/routes/vendorRoutes.js - Resident account controller
Backend/src/controllers/residentAuthController.js - Location updates
Backend/src/controllers/locationController.js - Nearby vendor search
Backend/src/controllers/proximityController.js - Vendor analytics
Backend/src/controllers/analyticsController.js - Vendor activity feed
Backend/src/controllers/activityLogController.js - Admin operations
Backend/src/controllers/adminController.js - Database connection
Backend/src/config/db.js
Domain data
- Admin accounts
Backend/src/models/AdminUser.js - Resident profiles
Backend/src/models/Resident.js - Vendor profiles
Backend/src/models/Vendor.js - Vendor sessions
Backend/src/models/VendorSession.js
Other components
- Resident
- Administrator
- Firebase Auth
Connections 32
- Resident → Resident app: uses
- Resident app → Resident authentication: provides auth
Frontend/Resident/App.js - Resident authentication → Firebase Auth: authenticates with
Frontend/Resident/src/context/AuthContext.js - Resident authentication → Resident API client: syncs profile through
Frontend/Resident/src/context/AuthContext.js - Resident app → Vendor discovery map: navigates to
- Vendor discovery map → Resident API client: requests vendor data
- Administrator → Admin console: uses
- Admin console → Admin navigation: loads routes
Frontend/Admin/src/App.jsx - Admin navigation → Admin API client: pages request data
- Admin API client → Express API: calls API
- Resident API client → Express API: calls API
- Express API → Database connection: connects database
Backend/src/app.js - Express API → Admin endpoints: mounts
Backend/src/app.js - Express API → Vendor endpoints: mounts
Backend/src/app.js - Express API → Resident account controller: mounts resident routes
Backend/src/app.js - Admin endpoints → Admin operations: routes requests to
Backend/src/routes/adminRoutes.js - Admin endpoints → Admin accounts: registers admin operations
- Admin operations → Admin accounts: reads and writes
Backend/src/controllers/adminController.js - Admin operations → Vendor profiles: reads dashboard counts
Backend/src/controllers/adminController.js - Admin operations → Resident profiles: reads dashboard counts
Backend/src/controllers/adminController.js - Vendor endpoints → Location updates: routes location updates
Backend/src/routes/vendorRoutes.js - Vendor endpoints → Nearby vendor search: routes nearby search
Backend/src/routes/vendorRoutes.js - Vendor endpoints → Vendor analytics: routes analytics
Backend/src/routes/vendorRoutes.js - Vendor endpoints → Consent sessions: routes consent endpoints
- Vendor endpoints → Vendor activity feed: routes activity feed
Backend/src/routes/vendorRoutes.js - Resident account controller → Resident profiles: syncs and updates
Backend/src/controllers/residentAuthController.js - WhatsApp → WhatsApp webhook client: sends messages
- WhatsApp webhook client → WhatsApp message router: dispatches messages
Backend/src/whatsapp-client.js - WhatsApp message router → WhatsApp onboarding: delegates onboarding
Backend/src/services/whatsappMessageRouter.js - WhatsApp message router → Consent sessions: manages sessions
Backend/src/services/whatsappMessageRouter.js - WhatsApp onboarding → Consent sessions: manages consent
Backend/src/services/whatsappOnboardingService.js - Consent sessions → Vendor sessions: reads and writes
Backend/src/services/vendorSessionService.js