How moneshram/neurorisk-ai works
NeuroRisk AI is a full-stack, tabular stroke-risk assessment application with user and administrator experiences. Users register or sign in, submit clinical and demographic inputs, receive a risk estimate, and review dashboards, history, and reports. Administrators also have batch CSV analysis and reporting capabilities. The backend combines Flask API routes, JWT role checks, persisted user and prediction records, and an ML pipeline. Edges reflect sampled imports/calls or README statements; unsampled implementation details are not inferred.
Main entry points: App.tsx Routes and app shell · app.py Flask API routes · api.ts API client · Register.tsx Registration
Components 21
Frontend experience
- Routes and app shell
frontend/src/App.tsx - API client
frontend/src/lib/api.ts
Identity and accounts
- Registration
frontend/src/pages/Register.tsx - Login and account flows
frontend/src/pages - JWT role guard
backend/auth.py
Risk assessment
- Clinical assessment form
frontend/src/pages/Assessment.tsx - Dashboard and history
frontend/src/pages - Prediction results
frontend/src/pages/Results.tsx
Admin and batch
- Batch analysis screens
frontend/src/pages - Batch API client
frontend/src/lib/batchApi.ts - Batch prediction
backend/batch.py - Batch reports
backend/batch_report.py
API and model
- Flask API routes
backend/app.py - User and prediction records
backend/models.py - Prediction pipeline
backend/ml/pipeline.py - PDF reports
backend/report.py - Model training
backend/train_stroke_model.py
Other components
- User
- Administrator
- SMTP email service
- Google sign-in
Connections 22
- User → Routes and app shell: uses
frontend/src/App.tsx - Administrator → Routes and app shell: uses
frontend/src/App.tsx - Routes and app shell → Registration: routes to
frontend/src/App.tsx - Routes and app shell → Login and account flows: routes to
frontend/src/App.tsx - Routes and app shell → Clinical assessment form: routes to
frontend/src/App.tsx - Routes and app shell → Dashboard and history: routes to
frontend/src/App.tsx - Routes and app shell → Prediction results: routes to
frontend/src/App.tsx - Routes and app shell → Batch analysis screens: routes to
frontend/src/App.tsx - Registration → API client: submits registration
frontend/src/pages/Register.tsx - Clinical assessment form → API client: requests prediction
frontend/src/pages/Assessment.tsx - API client → Flask API routes: sends API requests
frontend/src/lib/api.ts - Flask API routes → JWT role guard: checks roles
backend/app.py - Flask API routes → User and prediction records: reads and writes
backend/app.py - Flask API routes → Prediction pipeline: loads prediction pipeline
backend/app.py - Flask API routes → Batch prediction: invokes batch analysis
backend/app.py - Flask API routes → PDF reports: uses report generation
backend/app.py - Batch analysis screens → Batch API client: uses batch API
frontend/src/pages/batch/ResultsTable.tsx - Batch API client → Flask API routes: sends batch requests
frontend/src/lib/batchApi.ts - Batch prediction → Batch reports: generates batch report
- Model training → Prediction pipeline: saves trained pipeline
README.md - Flask API routes → SMTP email service: sends reset email
README.md - Login and account flows → Google sign-in: offers sign-in
README.md