# move7/lifeai-multiple-disease-prediction-ml-ai-software architecture

> Architecture diagram of the GitHub repository move7/lifeai-multiple-disease-prediction-ml-ai-software, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/move7/lifeai-multiple-disease-prediction-ml-ai-software
- Repository: https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software

## Overview

1. **Repository shape**
   - This is a **monorepo of multiple disease-prediction projects**, not a single cleanly layered product.
   - The top level contains the **main LifeAI Django app** plus many **standalone research/training notebooks and sub-apps** for specific diseases.

2. **Main product boundary**
   - The root Django project appears to be the primary runtime: `manage.py`, `core/`, `predictor/`, `templates/`, `static/`, `db.sqlite3`, `requirements.txt`, `runtime.txt`, and `tools/`.
   - That root app is the umbrella UI for the multi-disease predictor described in the README.

3. **Root request flow**
   - The serving path is typical Django: browser request → URL routing in `core/urls.py` and `predictor/urls.py` → view functions in `predictor/views.py` → form handling in `predictor/forms.py` → prediction result rendered through Django templates.
   - The output is a disease-specific prediction page rather than an API-first service.

4. **Model-serving assets**
   - Trained artifacts are stored on disk, not in a database: `tools/model_joblib`, `tools/scaler_joblib`, and `model_pkl`.
   - The presence of scaler artifacts means some models require the input to be normalized before inference.
   - Static CSVs under `static/` such as `Breast_train.csv`, `Diabetes_XTrain.csv`, `Diabetes_YTrain.csv`, and `Heart_train.csv` suggest training/support data is bundled with the repo as reference material or for local experimentation.

5. **UI layer**
   - Presentation is handled by Django templates in `templates/`, including disease-specific pages like `breast.html`, `diabetes.html`, `heart.html`, `lhome.html`, `alhome.html`, and shared layout fragments like `base.html` and `navbar.html`.
   - Static assets in `static/css` and `static/js` provide the client-side styling and interaction for the prediction forms.

6. **Root persistence**
   - `db.sqlite3` at the root indicates a lightweight Django persistence layer, likely for app state or admin scaffolding rather than prediction storage.
   - `media/` suggests uploaded files or generated outputs are persisted separately from trained models.

7. **Training / experimentation boundary**
   - Most of the `.ipynb` files are **offline model-development artifacts**, not runtime components.
   - They cover breast cancer, heart disease, diabetes, lung cancer, Parkinson’s, and Alzheimer’s experiments using ML, deep learning, and bio-inspired optimization.
   - In architecture terms, these notebooks feed the serialized model files consumed by the Django serving layer.

8. **Alzheimer’s subsystem**
   - `alz/` is a Django app with `forms.py`, `views.py`, `urls.py`, and `media/`, indicating a separate upload-driven or form-driven workflow.
   - The `alzheimers/` directory contains the training pipelines and preprocessing scripts, including CNN-based work and data augmentation/preprocessing notebooks.
   - This looks like a distinct subdomain with image/deep-learning processing rather than tabular prediction.

9. **Parkinson’s subsystem**
   - `Parkinsons/parkinsons-predictor-django/.../web-app` is a **self-contained Django application** with its own `manage.py`, `settings.py`, `urls.py`, templates, static files, SQLite DB, and deployed model/scaler artifacts.
   - This is effectively a separate deployable service inside the repo, likely built for voice-feature-based Parkinson’s prediction.

10. **Kidney and other standalone apps**
   - `kidney/Chronic-Kidney-Disease-Prediction-main` is another standalone web app, with `app.py`, `templates/`, `static/`, and a saved model `models/kidney.pkl`.
   - `heart/`, `diabetes/`, `breastcancer/`, and `lungcancer/` mainly hold experimentation code and datasets rather than the root runtime.

11. **Deployment and runtime concerns**
   - `Procfile` files and `runtime.txt` show the repo is intended for Python web deployment on a platform like Heroku or similar PaaS.
   - The architecture is therefore split between:
     - **offline training notebooks/scripts**
     - **serialized model artifacts**
     - **Django/Flask-style serving apps**
     - **static/template-based UI**

12. **How to diagram it**
   - The most accurate diagram is a **hub-and-spoke model**:
     - a central LifeAI Django shell,
     - disease-specific prediction flows,
     - on-disk model/scaler artifacts,
     - separate training notebooks feeding those artifacts,
     - and a few fully independent sub-apps reused from prior projects.
   - Avoid drawing this as one unified microservice system; it is closer to a **repository of integrated demos and deployable slices** than a single production platform.

Main entry points: [`tools`](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/tools) (Model artifacts), [`predictor/views.py`](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/blob/master/predictor/views.py) (Predictor views), [`alz`](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/alz) (Alz app), [`manage.py`](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/blob/master/manage.py) (manage.py)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_root_app["LifeAI Django app"]
  node_manage_py["manage.py<br/>Django entrypoint<br/>[manage.py]"]
  node_core_urls["Core URLs<br/>routing<br/>[urls.py]"]
  node_predictor_views["Predictor views<br/>request handlers<br/>[views.py]"]
  node_predictor_forms["Predictor forms<br/>form schema<br/>[forms.py]"]
  node_root_templates["Root templates<br/>presentation"]
  node_root_static["Root static<br/>assets"]
  node_root_models[("Model artifacts<br/>serialized models")]
  node_root_db[("SQLite DB<br/>persistence<br/>[db.sqlite3]")]
  node_root_media[("Media<br/>uploads")]
end

subgraph group_standalone_apps["Standalone sub-apps"]
  node_alz_app["Alz app<br/>Django subapp"]
  node_alz_training["Alz training<br/>deep-learning research"]
  node_parkinsons_web["Parkinsons web<br/>Django app"]
  node_parkinsons_artifacts[("Parkinsons artifacts<br/>model assets")]
  node_kidney_app["Kidney app<br/>Flask-style app"]
end

subgraph group_research["Research and training"]
  node_heart_research["Heart research<br/>ML notebooks"]
  node_diabetes_research["Diabetes research<br/>ML notebooks"]
  node_breast_research["Breast research<br/>ML notebooks"]
  node_lung_research["Lung research<br/>ML notebooks"]
end

node_manage_py -->|"bootstraps"| node_core_urls
node_core_urls -->|"routes to"| node_predictor_views
node_predictor_views -->|"validates with"| node_predictor_forms
node_predictor_views -->|"renders"| node_root_templates
node_predictor_views -->|"loads artifacts"| node_root_models
node_predictor_views -->|"uses assets"| node_root_static
node_root_models -.->|"trained from"| node_root_static
node_root_db -.->|"persists for"| node_manage_py
node_root_media -.->|"stores outputs"| node_predictor_views
node_alz_app -->|"shares UI"| node_root_templates
node_alz_app -->|"uploads"| node_root_media
node_alz_training -.->|"feeds"| node_alz_app
node_parkinsons_web -->|"loads"| node_parkinsons_artifacts
node_heart_research -.->|"informs"| node_root_models
node_diabetes_research -.->|"informs"| node_root_models
node_breast_research -.->|"informs"| node_root_models
node_lung_research -.->|"informs"| node_root_models
node_kidney_app -.->|"parallel model app"| node_root_models

click node_manage_py "https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/blob/master/manage.py"
click node_core_urls "https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/blob/master/core/urls.py"
click node_predictor_views "https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/blob/master/predictor/views.py"
click node_predictor_forms "https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/blob/master/predictor/forms.py"
click node_root_templates "https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/templates"
click node_root_static "https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/static"
click node_root_models "https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/tools"
click node_root_db "https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/blob/master/db.sqlite3"
click node_root_media "https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/media"
click node_alz_app "https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/alz"
click node_alz_training "https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/alzheimers"
click node_parkinsons_web "https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/Parkinsons/parkinsons-predictor-django/parkinsons-predictor-main/web-app"
click node_parkinsons_artifacts "https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/Parkinsons/parkinsons-predictor-django/parkinsons-predictor-main/web-app/tools"
click node_kidney_app "https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/kidney/Chronic-Kidney-Disease-Prediction-main"
click node_heart_research "https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/heart"
click node_diabetes_research "https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/diabetes"
click node_breast_research "https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/breastcancer"
click node_lung_research "https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/lungcancer"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_manage_py,node_core_urls,node_predictor_views,node_predictor_forms,node_root_templates,node_root_static,node_root_models,node_root_db,node_root_media toneBlue
class node_alz_app,node_alz_training,node_parkinsons_web,node_parkinsons_artifacts,node_kidney_app toneAmber
class node_heart_research,node_diabetes_research,node_breast_research,node_lung_research toneMint
```

## Components

### LifeAI Django app

Primary multi-disease runtime and shared UI layer at the repository root.

- [manage.py](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/blob/master/manage.py): Django entrypoint · Root Django command entry used to run the main LifeAI app. · `manage.py`
- [Core URLs](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/blob/master/core/urls.py): routing · Project-level URL configuration for the root Django site. · `core/urls.py`
- [Predictor views](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/blob/master/predictor/views.py): request handlers · Main view layer that handles prediction form submission and result rendering. · `predictor/views.py`
- [Predictor forms](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/blob/master/predictor/forms.py): form schema · Django forms used to validate disease prediction inputs. · `predictor/forms.py`
- [Root templates](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/templates): presentation · Shared and disease-specific Django templates for the main LifeAI UI. · `templates`
- [Root static](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/static): assets · Static CSS, JS, and bundled training/reference CSVs for the main app. · `static`
- [Model artifacts](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/tools): serialized models · On-disk joblib/pickle artifacts used by the serving layer for inference. · `tools`
- [SQLite DB](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/blob/master/db.sqlite3): persistence · Lightweight Django database for app state and admin scaffolding. · `db.sqlite3`
- [Media](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/media): uploads · Persistent storage for uploaded files or generated outputs. · `media`

### Standalone sub-apps

Self-contained prediction apps embedded in the monorepo.

- [Alz app](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/alz): Django subapp · Separate Alzheimer’s workflow with its own forms, views, and URLs. · `alz`
- [Alz training](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/alzheimers): deep-learning research · Alzheimer’s preprocessing, augmentation, and CNN-oriented experimentation. · `alzheimers`
- [Parkinsons web](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/Parkinsons/parkinsons-predictor-django/parkinsons-predictor-main/web-app): Django app · Self-contained deployable Django application for Parkinson’s prediction. · `Parkinsons/parkinsons-predictor-django/parkinsons-predictor-main/web-app`
- [Parkinsons artifacts](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/Parkinsons/parkinsons-predictor-django/parkinsons-predictor-main/web-app/tools): model assets · Trained model and scaler artifacts used by the Parkinsons web app. · `Parkinsons/parkinsons-predictor-django/parkinsons-predictor-main/web-app/tools`
- [Kidney app](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/kidney/Chronic-Kidney-Disease-Prediction-main): Flask-style app · Standalone chronic kidney disease prediction app with templates and a pickled model. · `kidney/Chronic-Kidney-Disease-Prediction-main`

### Research and training

Offline notebooks, datasets, and preprocessing used to develop models and artifacts.

- [Heart research](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/heart): ML notebooks · Heart disease experimentation with ANN, genetic algorithms, and ensemble optimization. · `heart`
- [Diabetes research](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/diabetes): ML notebooks · Diabetes model-development notebooks and dataset material. · `diabetes`
- [Breast research](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/breastcancer): ML notebooks · Breast cancer experimentation notebooks and bundled datasets. · `breastcancer`
- [Lung research](https://github.com/move7/lifeai-multiple-disease-prediction-ml-ai-software/tree/master/lungcancer): ML notebooks · Lung cancer experimentation and whale-optimization work. · `lungcancer`

## Connections

- manage.py → Core URLs: bootstraps · The Django entrypoint loads the project URL configuration.
- Core URLs → Predictor views: routes to · Requests are dispatched from project URLs into the predictor app views.
- Predictor views → Predictor forms: validates with · Views use Django forms to validate disease-specific inputs.
- Predictor views → Root templates: renders · Prediction outcomes are shown through shared and disease-specific templates.
- Predictor views → Model artifacts: loads artifacts · Inference code reads serialized model assets from disk.
- Predictor views → Root static: uses assets · The UI consumes static CSS, JS, and bundled reference data.
- Model artifacts → Root static: trained from · Bundled CSVs in static support local experimentation and model fitting.
- SQLite DB → manage.py: persists for · SQLite supports the root Django runtime and admin state.
- Media → Predictor views: stores outputs · Uploaded files or generated outputs are persisted separately from models.
- Alz app → Root templates: shares UI · The Alzheimer’s app fits into the broader Django template-driven interface.
- Alz app → Media: uploads · The Alzheimer’s workflow uses media storage for uploaded files.
- Alz training → Alz app: feeds · Offline Alzheimer’s preprocessing and training inform the runtime subapp.
- Parkinsons web → Parkinsons artifacts: loads · The Parkinsons Django app serves predictions from local serialized artifacts.
- Heart research → Model artifacts: informs · Heart disease notebooks contribute model logic and artifacts to the main app.
- Diabetes research → Model artifacts: informs · Diabetes experimentation informs the serialized model assets used by the root app.
- Breast research → Model artifacts: informs · Breast cancer experimentation informs the root inference artifacts and pages.
- Lung research → Model artifacts: informs · Lung cancer experimentation feeds the broader model-development pipeline.
- Kidney app → Model artifacts: parallel model app · A separate kidney prediction app uses its own local pickled model and templates.
