How ishaq-5012/retinavision works
RetinaVision (branded CardioVisionAI in the backend) is a retinal cardiovascular-risk screening application with patient, doctor, and researcher experiences. Users authenticate, submit retinal scans and clinical factors, and view screening results; the backend exposes upload, prediction, and result endpoints. The source index supports the backend pipeline’s internal stages and Groq integration, but the sampled frontend excerpts do not establish how the browser reaches those endpoints. Research, care-team, analytics, and model-training capabilities are shown as distinct branches where supported by the tree and index.
Main entry points: App.tsx Route application · prediction/predict.py Risk prediction pipeline · api/predict.py Prediction route · main.py FastAPI endpoints
Components 25
Web application
- Route application
src/App.tsx - Scan upload
src/pages/UploadPage.tsx - Prediction results
src/pages/PredictionResultPage.tsx - AI explanation
src/pages/ExplainableAIPage.tsx - Patient dashboard
src/pages/PatientDashboard.tsx - Doctor dashboard
src/pages/DoctorDashboard.tsx - Care team
src/pages/CareTeamPage.tsx - Scan history
src/pages/ScanHistoryPage.tsx - Analytics dashboard
src/pages/AnalyticsDashboard.tsx
Identity and data
- Auth provider
src/hooks/useAuth.tsx - Supabase platform
src/lib/supabase.ts
Screening backend
- FastAPI endpoints
backend/main.py - Upload / result routes
backend/api/upload.py - Prediction route
backend/api/predict.py - Risk prediction pipeline
backend/ai_engine/prediction/predict.py - Image preprocessing
backend/ai_engine/preprocessing/preprocess.py - Vessel biomarkers
backend/ai_engine/biomarkers/extraction.py - Clinical risk model
backend/ai_engine/clinical_model.py - Risk fusion
backend/ai_engine/fusion_model.py - Saliency explanation
backend/ai_engine/explainability/gradcam.py - Groq vision interpretation
backend/services/groq_vision_service.py
Research and training
- Research hub
src/pages/ResearchHubPage.tsx - Research data access
src/lib/research.ts - Model training
backend/ai_engine/training/train.py
Other components
- Patient / clinician
Connections 23
- Patient / clinician → Route application: uses
src/App.tsx - Route application → Auth provider: provides auth
src/App.tsx - Route application → Scan upload: routes to
src/App.tsx - Route application → Prediction results: routes to
src/App.tsx - Route application → AI explanation: routes to
src/App.tsx - Route application → Patient dashboard: routes to
src/App.tsx - Route application → Doctor dashboard: routes to
src/App.tsx - Route application → Care team: routes to
src/App.tsx - Route application → Scan history: routes to
src/App.tsx - Route application → Analytics dashboard: routes to
src/App.tsx - Route application → Research hub: routes to
src/App.tsx - Auth provider → Supabase platform: auth and profile access
src/hooks/useAuth.tsx - Research hub → Research data access: loads research data
src/pages/ResearchHubPage.tsx - FastAPI endpoints → Upload / result routes: registers routes
backend/main.py - FastAPI endpoints → Prediction route: registers routes
backend/main.py - Prediction route → Risk prediction pipeline: runs prediction
backend/api/predict.py - Prediction route → Groq vision interpretation: requests interpretation
backend/api/predict.py - Risk prediction pipeline → Image preprocessing: preprocesses image
backend/ai_engine/prediction/predict.py - Risk prediction pipeline → Vessel biomarkers: extracts biomarkers
backend/ai_engine/prediction/predict.py - Risk prediction pipeline → Clinical risk model: encodes clinical factors
backend/ai_engine/prediction/predict.py - Risk prediction pipeline → Risk fusion: combines risk inputs
backend/ai_engine/prediction/predict.py - Risk prediction pipeline → Saliency explanation: generates saliency
backend/ai_engine/prediction/predict.py - Model training → Supabase platform: exports artifacts