How prxnesh/glucox works
GlucoX is a diabetes-risk intelligence platform. A user signs in, submits clinical measurements or a lab report, and receives a prediction or extracted biomarkers; saved health records then support dashboard history, insights, and personalized chat. The frontend communicates with FastAPI routes, which delegate to services and use ML, OCR, Prisma, and external integrations. The graph follows documented flows and indexed imports; some report, prediction, OCR, and frontend implementation details were not excerpted, so their links rely on the README rather than inspected call sites.
Main entry points: database.py Database access · prediction_service.py Prediction service · report_service.py Report service · chat_service.py Chat service
Components 26
Health experience
- Auth UI
frontend/features/auth/auth-form.tsx - Risk assessment
frontend/features/predict/risk-assessment-form.tsx - Report upload
frontend/features/reports/report-uploader.tsx - Dashboard and history
frontend/features/dashboard/dashboard-view.tsx - Health assistant
frontend/features/assistant/health-assistant-view.tsx - Lifestyle profile
frontend/features/advanced/advanced-view.tsx
API routes
- Auth routes
backend/app/api/routes/auth.py - Prediction route
backend/app/api/routes/predict.py - Reports route
backend/app/api/routes/reports.py - Records route
backend/app/api/routes/records.py - Chat route
backend/app/api/routes/chat.py
Domain services
- Auth service
backend/app/services/auth_service.py - Prediction service
backend/app/services/prediction_service.py - Report service
backend/app/services/report_service.py - History service
backend/app/services/history_service.py - Chat service
backend/app/services/chat_service.py - Insights and explanations
backend/app/services/insight_service.py
Analysis engines
- ML training and inference
backend/app/ml/training.py - OCR extraction
backend/app/ocr/extractor.py
Persistence and context
- Database access
backend/app/utils/database.py - Prisma client
backend/app/prisma_client/client.py - Query builder
backend/app/prisma_client/_builder.py - Query engine
backend/app/prisma_client/engine/_query.py
Other components
- User
- Ollama model
- PostgreSQL
Connections 30
- User → Auth UI: uses
README.md - User → Risk assessment: submits vitals
README.md - User → Report upload: uploads report
README.md - User → Dashboard and history: views health
README.md - User → Health assistant: asks questions
README.md - User → Lifestyle profile: sets profile
README.md - Auth UI → Auth routes: sends credentials
README.md - Risk assessment → Prediction route: posts vitals
README.md - Report upload → Reports route: uploads file
README.md - Dashboard and history → Records route: requests dashboard
README.md - Health assistant → Chat route: sends chat
README.md - Lifestyle profile → Health assistant: provides profile facts
README.md - Auth routes → Auth service: delegates
backend/app/api/routes/auth.py - Prediction route → Prediction service: delegates
backend/app/api/routes/predict.py - Reports route → Report service: analyzes report
README.md - Records route → History service: aggregates records
backend/app/api/routes/records.py - Chat route → Chat service: delegates
backend/app/api/routes/chat.py - Prediction service → ML training and inference: runs inference
README.md - Prediction service → Insights and explanations: creates insights
README.md - Report service → OCR extraction: extracts biomarkers
README.md - Chat service → Ollama model: requests reply
README.md - Auth service → Database access: reads and writes users
backend/app/services/auth_service.py - Chat service → Database access: loads health context
README.md - Prediction service → Database access: stores health record
README.md - Report service → Database access: stores extraction
README.md - History service → Database access: reads dashboard data
README.md - Database access → Prisma client: uses client
backend/app/utils/database.py - Prisma client → Query builder: builds queries
backend/app/prisma_client/client.py - Prisma client → Query engine: dispatches queries
backend/app/prisma_client/engine/_query.py - Query engine → PostgreSQL: queries database
README.md