How mallanagowdapatil-commits/donar-sync works
DonorSync is a blood-donation coordination platform for donors, receivers, hospitals, blood banks, and administrators. Users can register and sign in, search for available blood, manage donor availability, submit and track emergency requests, and handle inventory. The backend matches requests with nearby donors and dispatches notifications; dashboards also support analytics, administration, and system health. The graph follows the sampled server wiring and matching code; several frontend-to-API connections and unsampled subsystem internals are not shown.
Main entry points: App.jsx Web app and routing · server.js API server · supabase.js Supabase database · requestController.js Request lifecycle
Components 26
Web application
- Web app and routing
client/src/App.jsx - Sign-in and registration
client/src/pages/AuthPages.jsx - Blood search
client/src/pages/BloodSearch.jsx - Donor registration
client/src/pages/DonorRegistration.jsx - Role dashboards
client/src/pages - Notification center
client/src/components/NotificationCenter.jsx - Chat assistant UI
client/src/components/Chatbot.jsx
Donor coordination
- Account and sessions
server/controllers/authController.js - Donor routes
server/routes/donorRoutes.js - Donor operations
server/controllers/donorController.js - Public donor matching
server/routes/matchingRoutes.js - Blood request routes
server/routes/requestRoutes.js - Request lifecycle
server/controllers/requestController.js - Compatibility matching
server/services/matchingService.js
Clinical operations
- Inventory routes
server/routes/inventoryRoutes.js - Stock and expiry management
server/controllers/inventoryController.js - Admin, organization, analytics, health
server/routes - Clinical assistant endpoint
server/controllers/chatbotController.js
Platform services
- API server
server/server.js - Authentication routes
server/routes/authRoutes.js - Notification dispatch
server/services/notificationService.js - Email delivery
server/services/emailService.js - Supabase database
server/database/supabase.js - Demo state store
server/database/inMemoryStore.js
Other components
- Platform users
- SMTP service
Connections 35
- Platform users → Web app and routing: use
- Web app and routing → Sign-in and registration: routes to
- Web app and routing → Blood search: routes to
- Web app and routing → Donor registration: routes to
- Web app and routing → Role dashboards: routes to
- Web app and routing → Notification center: renders
- Web app and routing → Chat assistant UI: renders
- Web app and routing → API server: calls
- API server → Authentication routes: mounts
- API server → Donor routes: mounts
- API server → Public donor matching: mounts
- API server → Blood request routes: mounts
- API server → Inventory routes: mounts
- API server → Admin, organization, analytics, health: mounts
- API server → Clinical assistant endpoint: dispatches
- Authentication routes → Account and sessions: dispatches
- Account and sessions → Supabase database: reads/writes
- Account and sessions → Demo state store: fallback reads/writes
- Donor routes → Donor operations: dispatches
- Donor operations → Supabase database: reads/writes
- Donor operations → Demo state store: fallback reads/writes
- Public donor matching → Compatibility matching: calls
- Public donor matching → Supabase database: reads donors
- Public donor matching → Demo state store: fallback reads
- Blood request routes → Request lifecycle: dispatches
- Request lifecycle → Compatibility matching: calls
- Request lifecycle → Supabase database: reads/writes
- Request lifecycle → Demo state store: fallback reads/writes
- Request lifecycle → Notification dispatch: alerts matches
- Inventory routes → Stock and expiry management: dispatches
- Stock and expiry management → Supabase database: reads/writes
- Clinical assistant endpoint → Supabase database: reads live data
- Clinical assistant endpoint → Demo state store: reads fallback data
- Notification dispatch → Email delivery: sends email
- Email delivery → SMTP service: delivers via