How shhhivamm/lens_lab works
LabLens lets users upload a report for file validation, and separately enter or review structured lab values before submitting them for range-based educational analysis. The analysis results and safety notice return to the frontend. Report upload currently stops at validation and receipt: the README describes OCR and storage as planned, not implemented. The graph reflects the sampled implementation; the health-check endpoint is part of the backend API, while Swagger UI is FastAPI-provided.
Main entry points: reportApi.js API client · LabValueReview.jsx Value review · App.jsx App shell · main.py Analyze endpoint
Components 15
Frontend
- React entry
frontend/src/main.jsx - App shell
frontend/src/App.jsx - Navigation
frontend/src/components/Header.jsx
Report Upload
- Report selection
frontend/src/components/UploadReportCard.jsx - API client
frontend/src/services/reportApi.js
Lab Values
- Value review
frontend/src/components/LabValueReview.jsx
Backend
- Upload endpoint
backend/app/main.py - File checks
backend/app/main.py - Verify endpoint
backend/app/main.py - Analyze endpoint
backend/app/main.py - Value validation
backend/app/schemas.py - Range analysis
backend/app/services/lab_analysis.py - Range classification
backend/app/services/lab_analysis.py - Explanation text
backend/app/services/lab_analysis.py
Other components
- User
Connections 20
- React entry → App shell: renders
- App shell → Navigation: renders
- App shell → Report selection: renders
- App shell → Value review: renders
- User → Report selection: selects report
- Report selection → API client: uploads file
- API client → Upload endpoint: posts file
- Upload endpoint → File checks: validates file
- File checks → Upload endpoint: returns size
- User → Value review: enters values
- Value review → API client: submits values
- API client → Verify endpoint: posts values
- Verify endpoint → Value validation: validates payload
- API client → Analyze endpoint: requests analysis
- Analyze endpoint → Value validation: validates payload
- Analyze endpoint → Range analysis: analyzes values
- Range analysis → Range classification: classifies range
- Range analysis → Explanation text: builds explanation
- Analyze endpoint → Value review: returns results
- Verify endpoint → Value review: returns values