How kidneybeanhealth/beanhealth works
BeanHealth is a patient–doctor healthcare management platform with an enterprise-care branch. The main user journey is signing in, reviewing or updating patient health information, and coordinating care through records, messaging, alerts, and prescriptions. CKD rule evaluation and snapshots provide a clinical-monitoring layer. The README documents product capabilities not fully represented in the sampled excerpts; those branches are included at the subsystem level, while uncertain internal wiring is omitted.
Main entry points: App.tsx Application shell · PatientDashboard.tsx Patient dashboard · supabase.ts Supabase · DoctorDashboardMain.tsx Doctor dashboard
Components 25
Access and navigation
- Application shell
src/App.tsx - Routes and guards
src/routes/index.tsx - Authentication state
src/contexts/AuthContext.tsx - Authentication service
src/services/authService.ts
Patient health
- Patient dashboard
src/components/PatientDashboard.tsx - Medical records
src/services/medicalRecordsService.ts - Lab results
src/services/labResultsService.ts - Medication management
src/services/medicationService.ts - Progress and vitals
src/components/CKDDashboard.tsx
Care coordination
- Doctor dashboard
src/components/DoctorDashboardMain.tsx - Secure messaging
src/services/chatService.ts - Realtime updates
src/hooks/useRealTimeChatV2.ts - Alerts and notifications
src/services/alertService.ts - Prescriptions
src/services/prescriptionService.ts - Enterprise workflows
src/components/enterprise/EnterpriseDashboardHome.tsx
Clinical platform
- CKD rule engine
src/services/ruleEngineService.ts - Rule evaluation
src/services/ruleEvaluator.ts - Rule administration
src/components/RuleEngineAdmin.tsx - File storage service
src/services/storageService.ts - Gemini analysis
src/services/geminiService.ts - Supabase
src/lib/supabase.ts
Other components
- Patient
- Doctor
- Enterprise staff
- Google Gemini API
Connections 32
- Patient → Application shell: uses
- Doctor → Application shell: uses
- Enterprise staff → Application shell: uses
- Application shell → Routes and guards: renders
- Application shell → Authentication state: provides state
- Application shell → Patient dashboard: hosts
- Application shell → Doctor dashboard: hosts
- Authentication state → Authentication service: authenticates
- Authentication service → Supabase: uses auth
- Patient dashboard → Medical records: shows records
- Patient dashboard → Lab results: shows labs
- Patient dashboard → Medication management: shows medications
- Patient dashboard → Progress and vitals: shows progress
- Doctor dashboard → Secure messaging: communicates via
- Patient dashboard → Secure messaging: communicates via
- Secure messaging → Realtime updates: updates through
- Secure messaging → Supabase: persists messages
- Medical records → File storage service: stores documents
- File storage service → Supabase: uploads files
- Medical records → Gemini analysis: requests analysis
- Gemini analysis → Google Gemini API: analyzes documents
- Doctor dashboard → Prescriptions: creates prescriptions
- Prescriptions → Secure messaging: delivers prescription
- Doctor dashboard → Alerts and notifications: reviews alerts
- Alerts and notifications → Supabase: reads and writes
- Enterprise workflows → Doctor dashboard: supports care
- Enterprise workflows → Prescriptions: manages prescriptions
- Rule administration → Supabase: manages rule versions
- CKD rule engine → Lab results: loads lab context
- CKD rule engine → Rule evaluation: evaluates rules
- CKD rule engine → Supabase: loads rules and saves snapshots
- CKD rule engine → Alerts and notifications: produces monitoring results