How rajat1606-dev/spandana2 works
SPANDANA is a research-oriented LVH screening workspace: users load a 12-lead ECG, inspect waveform and voltage-rule results, request backend Perceptron/CNN screening, then compare models and review research metrics. The browser decodes uploads and calculates Sokolow–Lyon/Cornell locally; AI inference is backend-only. A separate PTB-XL training and evaluation workflow produces the models and comparison metrics. Connections to unsampled views and training stages are included only where the README or source index supports them.
Main entry points: page.tsx Workspace shell · routes.py FastAPI routes · analyses.ts Analysis state · metrics.json Evaluation metrics
Components 22
Screening workspace
- Workspace shell
src/app/page.tsx - ECG upload
src/components/views/UploadView.tsx - Signal visualization
src/components/views/VisualizationView.tsx - Criteria analysis
src/components/views/CriteriaView.tsx - AI screening
src/components/views/ScreeningView.tsx - Model comparison
src/components/views/ComparisonView.tsx - Analysis reports
src/components/views/ReportsView.tsx - Research information
src/components/views/ResearchView.tsx
ECG processing
- ECG file decoders
src/lib/ecg/parsers.ts - Voltage criteria
src/lib/ecg/criteria.ts - Analysis state
src/store/analyses.ts
Screening API
- FastAPI routes
backend/app/api/routes.py - Backend ECG decoder
backend/app/services/ecg_io.py - Prediction service
backend/app/services/screening.py - Model status
backend/app/services/model_status.py
Model research
- Inference pipeline
training/predict_ecg.py - CNN architecture
training/cnn_model.py - CNN training
training/train_cnn.py - PTB-XL pipeline
training - Model evaluation
training/evaluate_all.py - Evaluation metrics
backend/models/metrics.json
Other components
- Research user
Connections 25
- Research user → Workspace shell: uses
- Workspace shell → ECG upload: routes to
src/app/page.tsx - Workspace shell → Signal visualization: routes to
src/app/page.tsx - Workspace shell → Criteria analysis: routes to
src/app/page.tsx - Workspace shell → AI screening: routes to
src/app/page.tsx - Workspace shell → Model comparison: routes to
src/app/page.tsx - Workspace shell → Analysis reports: routes to
src/app/page.tsx - Workspace shell → Research information: routes to
src/app/page.tsx - ECG upload → ECG file decoders: decodes files
- ECG file decoders → Analysis state: parsed ECG
- Analysis state → Voltage criteria: computes criteria
src/store/analyses.ts - Criteria analysis → Voltage criteria: shows results
- AI screening → FastAPI routes: requests screening
- FastAPI routes → Backend ECG decoder: decodes uploads
backend/app/api/routes.py - FastAPI routes → Prediction service: runs screening
backend/app/api/routes.py - FastAPI routes → Model status: checks artifacts
backend/app/api/routes.py - Prediction service → Inference pipeline: gets predictions
- Inference pipeline → CNN architecture: uses model
training/predict_ecg.py - CNN training → CNN architecture: trains model
training/train_cnn.py - PTB-XL pipeline → CNN training: prepares training
training/train_cnn.py - PTB-XL pipeline → Model evaluation: evaluates methods
training/evaluate_all.py - Model evaluation → Evaluation metrics: writes metrics
- Model comparison → Evaluation metrics: presents metrics
- Analysis reports → Analysis state: reports analyses
- Research information → Evaluation metrics: shows evidence