How akshay-kesavarapu/raktsetu works
VITALS is a blood-inventory tracking PWA: bank staff report stock through the web or SMS, the public search nearby banks by location and inventory, and NGOs monitor reporting coverage. The backend exposes these workflows through FastAPI routers and services backed by PostgreSQL; the frontend also includes offline storage and synchronization. The graph preserves the documented emergency and silent-alert capabilities, though their exact call paths are not shown in the sampled source. Unsampled frontend and backend modules are represented only where their paths and product roles are supported by the tree and README.
Main entry points: api.ts API client · main.py FastAPI app · database.py Database session · search.py Search routes
Components 32
Public Search
- Search page
frontend/app/(light)/search/page.tsx - Search filters
frontend/components/search/SearchFilters.tsx - Bank results
frontend/components/search/BloodBankResults.tsx - Search map
frontend/components/search/SearchMap.tsx
Bank Reporting
- Stock report
frontend/app/(light)/report/page.tsx - Report form
frontend/components/report/StockReportForm.tsx - Offline sync
frontend/lib/sync.ts - Offline store
frontend/lib/offline-db.ts - SMS reporting
frontend/components/report/SMSPipelineSimulator.tsx - Bank portal
frontend/app/(light)/bank/portal/page.tsx
Coverage Monitoring
- Dashboard
frontend/app/dashboard/page.tsx - Coverage map
frontend/components/dashboard/CoverageMap.tsx
API and Data
- API client
frontend/lib/api.ts - FastAPI app
backend/app/main.py - Search routes
backend/app/routers/search.py - Stock routes
backend/app/routers/stock.py - SMS routes
backend/app/routers/sms.py - Bank routes
backend/app/routers/bank.py - Dashboard routes
backend/app/routers/dashboard.py - Bank directory
backend/app/routers/blood_banks.py - Search service
backend/app/services/search_service.py - Stock service
backend/app/services/stock_service.py - SMS processing
backend/app/services/sms_service.py - Coverage metrics
backend/app/services/coverage_service.py - Alert services
backend/app/services/emergency_alert_service.py - Silent alerts
backend/app/services/silent_alert_service.py - Database session
backend/app/database.py
Other components
- Public user
- Bank staff
- NGO operator
- PostgreSQL
- SMS gateway
Connections 42
- Public user → Search page: searches
- Search page → Search filters: sets criteria
- Search filters → API client: requests search
- API client → Search routes: calls API
- Search routes → Search service: invokes
- Search service → Database session: queries
- Database session → PostgreSQL: reads data
- Search routes → API client: returns matches
- API client → Bank results: supplies results
- API client → Search map: supplies results
- Bank staff → Stock report: reports stock
- Stock report → Report form: presents form
- Report form → API client: submits update
- API client → Stock routes: calls API
- Stock routes → Stock service: invokes
- Stock service → Database session: writes stock
- Report form → Offline store: stores offline
- Offline sync → Offline store: reads queued reports
- Offline sync → API client: syncs reports
- Bank staff → SMS reporting: sends SMS update
- SMS reporting → API client: submits payload
- API client → SMS routes: calls webhook
- SMS routes → SMS processing: dispatches
- SMS processing → Stock service: updates inventory
- SMS processing → SMS gateway: sends confirmation
- Bank staff → Bank portal: uses portal
- Bank portal → API client: requests bank actions
- API client → Bank routes: calls API
- NGO operator → Dashboard: monitors coverage
- Dashboard → API client: requests metrics
- API client → Dashboard routes: calls API
- Dashboard routes → Coverage metrics: invokes
- Coverage metrics → Database session: queries activity
- Dashboard → Coverage map: displays coverage
- FastAPI app → Search routes: registers
- FastAPI app → Stock routes: registers
- FastAPI app → SMS routes: registers
- FastAPI app → Bank routes: registers
- FastAPI app → Dashboard routes: registers
- FastAPI app → Bank directory: registers
- Alert services → Database session: accesses data
- Silent alerts → Database session: accesses data