How muthuvelr100-jpg/bloodlink works
BloodLink is a role-based blood donation and request-management application. A patient submits a blood request, finds and invites matching donors, and tracks responses; an accepting donor reveals contact details, and a blood bank can record the donation to complete the request. Donors also manage availability and history, while banks and admins handle inventory, verification, complaints, emergency requests, rewards, and certificates. The graph follows the documented workflow and indexed frontend/backend modules; unsampled implementation details are represented at subsystem level.
Main entry points: supabase.js Supabase database and auth · index.js Express API · donor.js Donor endpoints · bloodbank.js Bank endpoints
Components 27
Web application
- Role-based app
src/App.jsx - Session and profile
src/context/AuthContext.jsx - Request workflow
src/pages/patient/RequestStatus.jsx - Request submission
src/components/patient/BloodRequestForm.jsx - Donor matching
src/pages/donor/MatchingRequests.jsx - Donor profile
src/pages/donor/DonorProfile.jsx - Bank and admin tools
src/pages/admin/RecordDonation.jsx - Authenticated API client
src/lib/api.js - Request service
src/services/requestService.js - Donor service
src/services/donorService.js - Bank service
src/services/bloodBankService.js
API and access
- Express API
server/src/index.js - Identity and role checks
server/src/middleware/auth.js - Patient endpoints
server/src/routes/patient.js - Donor endpoints
server/src/routes/donor.js - Bank endpoints
server/src/routes/bloodbank.js - Admin endpoints
server/src/routes/admin.js - Common endpoints
server/src/routes/common.js
Donation operations
- Request coordination
server/src/services/requests.js - Notifications
server/src/services/notify.js - Rewards and certificates
server/src/services/rewards.js
Data and integrations
- Supabase database and auth
server/src/config/supabase.js - Resend email
Other components
- Patient
- Donor
- Blood bank staff
- Administrator
Connections 47
- Patient → Role-based app: uses
src/App.jsx - Donor → Role-based app: uses
src/App.jsx - Blood bank staff → Role-based app: uses
src/App.jsx - Administrator → Role-based app: uses
src/App.jsx - Role-based app → Session and profile: provides session
src/main.jsx - Session and profile → Authenticated API client: loads profile
src/context/AuthContext.jsx - Session and profile → Supabase database and auth: checks session
src/context/AuthContext.jsx - Patient → Request submission: submits request
README.md - Request submission → Request service: calls
src/components/patient/BloodRequestForm.jsx - Request workflow → Request service: loads status
src/pages/patient/RequestStatus.jsx - Donor matching → Donor service: loads matches
src/pages/donor/MatchingRequests.jsx - Donor → Donor matching: responds
README.md - Donor profile → Donor service: updates profile
src/pages/donor/DonorProfile.jsx - Bank and admin tools → Bank service: records donation
src/pages/admin/RecordDonation.jsx - Request service → Authenticated API client: calls
src/services/requestService.js - Donor service → Authenticated API client: calls
src/services/donorService.js - Bank service → Authenticated API client: calls
src/services/bloodBankService.js - Authenticated API client → Express API: sends HTTP
src/lib/api.js - Express API → Patient endpoints: routes
server/src/index.js - Express API → Donor endpoints: routes
server/src/index.js - Express API → Bank endpoints: routes
server/src/index.js - Express API → Admin endpoints: routes
server/src/index.js - Express API → Common endpoints: routes
server/src/index.js - Patient endpoints → Identity and role checks: checks access
server/src/routes/patient.js - Donor endpoints → Identity and role checks: checks access
server/src/routes/donor.js - Bank endpoints → Identity and role checks: checks access
server/src/routes/bloodbank.js - Admin endpoints → Identity and role checks: checks access
server/src/routes/admin.js - Common endpoints → Identity and role checks: checks access
server/src/routes/common.js - Identity and role checks → Supabase database and auth: verifies token
server/src/middleware/auth.js - Patient endpoints → Supabase database and auth: reads and writes
server/src/routes/patient.js - Donor endpoints → Supabase database and auth: reads and writes
server/src/routes/donor.js - Bank endpoints → Supabase database and auth: reads and writes
server/src/routes/bloodbank.js - Admin endpoints → Supabase database and auth: reads and writes
server/src/routes/admin.js - Common endpoints → Supabase database and auth: reads and writes
server/src/routes/common.js - Patient endpoints → Request coordination: delegates
server/src/routes/patient.js - Donor endpoints → Request coordination: delegates
server/src/routes/donor.js - Bank endpoints → Request coordination: delegates
server/src/routes/bloodbank.js - Patient endpoints → Notifications: notifies
server/src/routes/patient.js - Donor endpoints → Notifications: notifies
server/src/routes/donor.js - Bank endpoints → Notifications: notifies
server/src/routes/bloodbank.js - Admin endpoints → Notifications: notifies
server/src/routes/admin.js - Donor endpoints → Rewards and certificates: uses rewards
server/src/routes/donor.js - Bank endpoints → Rewards and certificates: issues rewards
server/src/routes/bloodbank.js - Notifications → Supabase database and auth: stores alerts
server/src/services/notify.js - Notifications → Resend email: sends optional email
server/src/services/notify.js - Blood bank staff → Bank and admin tools: records donation
README.md - Administrator → Bank and admin tools: manages operations
README.md