How alaazaitoon/modern-regression-project works
Smart Regression is a guided regression-analysis dashboard backed by a FastAPI service; the README says statistical calculations remain on the backend and data/models are held in process memory. The user uploads or enters data, configures and trains a model, explores diagnostics and inference, then generates a report. The graph preserves these stages plus health, recommendations, and PDF export. Backend calls are supported by excerpts and the source index; frontend-to-API and UI workflow links rely on README documentation because most frontend wiring was not excerpted.
Main entry points: models.py Model endpoints · api.ts Typed API client · main.py FastAPI application · datasets.py Dataset endpoints
Components 21
Dashboard workflow
- Workflow dashboard
frontend/app/page.tsx - Dataset entry
frontend/components/steps/step-upload.tsx - Model setup
frontend/components/steps/step-configure.tsx - Diagnostic charts
frontend/components/steps/step-visualize.tsx - Statistical results
frontend/components/steps/step-results.tsx - Recommendations
frontend/components/recommendations/recommendations-panel.tsx - Report view
frontend/app/report/report-client.tsx - Typed API client
frontend/lib/api.ts
API surface
- FastAPI application
backend/main.py - Health endpoint
backend/routers/health.py - Dataset endpoints
backend/routers/datasets.py - Model endpoints
backend/routers/models.py
Analytics services
- CSV profiling
backend/services/data_service.py - OLS inference
backend/services/regression_service.py - PDF generation
backend/services/report_service.py
Runtime state and contracts
- Dataset registry
backend/state.py - Model registry
backend/state.py - Dataset contract
backend/schemas/dataset.py - Model contract
backend/schemas/model.py - Error handling
backend/utils/errors.py
Other components
- Analyst
Connections 23
- Analyst → Workflow dashboard: uses
README.md - Workflow dashboard → Dataset entry: starts workflow
README.md - Dataset entry → Typed API client: submits data
README.md - Model setup → Typed API client: trains model
README.md - Typed API client → FastAPI application: HTTP requests
README.md - FastAPI application → Health endpoint: mounts route
backend/main.py - FastAPI application → Dataset endpoints: mounts route
backend/main.py - FastAPI application → Model endpoints: mounts route
backend/main.py - Dataset endpoints → CSV profiling: parses and profiles
backend/routers/datasets.py - Dataset endpoints → Dataset registry: stores and reads
backend/routers/datasets.py - CSV profiling → Dataset contract: builds profile
backend/services/data_service.py - Model endpoints → OLS inference: trains and predicts
backend/routers/models.py - Model endpoints → Dataset registry: reads dataset
backend/routers/models.py - Model endpoints → Model registry: stores model
backend/routers/models.py - OLS inference → Model contract: creates results
backend/services/regression_service.py - Model endpoints → PDF generation: builds PDF
backend/routers/models.py - Model endpoints → Error handling: raises domain errors
backend/routers/models.py - Dataset endpoints → Error handling: raises domain errors
backend/routers/datasets.py - Typed API client → Diagnostic charts: returns model data
README.md - Typed API client → Statistical results: returns inference
README.md - Statistical results → Recommendations: requests suggestions
README.md - Analyst → Report view: opens report
README.md - Report view → Typed API client: loads report data
README.md