# cmxau/auto-ml architecture

> Architecture diagram of the GitHub repository cmxau/auto-ml, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cmxau/auto-ml
- Repository: https://github.com/cmxau/auto-ml

## Overview

ML-AutoPilot is a browser-based, AI-assisted machine-learning workspace. Users organize work in projects, upload data for profiling and analysis, review and apply cleaning, then configure a DAG pipeline or train a model and inspect or download results. The README describes asynchronous jobs and an approval boundary: AI proposes, while users approve changes before execution. The graph shows the principal frontend-to-API paths and documented worker, storage, and model-training responsibilities; unsampled subsystem internals and uncertain wiring are left broad or omitted.

Main entry points: [`backend/app/main.py`](https://github.com/cmxau/auto-ml/blob/main/backend/app/main.py) (FastAPI app), [`backend/app/database.py`](https://github.com/cmxau/auto-ml/blob/main/backend/app/database.py) (Application records), [`frontend/src/lib/api/client.ts`](https://github.com/cmxau/auto-ml/blob/main/frontend/src/lib/api/client.ts) (API client), [`backend/app/routers/pipeline.py`](https://github.com/cmxau/auto-ml/blob/main/backend/app/routers/pipeline.py) (Pipeline control)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Browser workspace"]
  node_web["Web workspace<br/>[page.tsx]"]
  node_project_pages["Project pages<br/>[page.tsx]"]
  node_dataset_pages["Dataset pages<br/>[page.tsx]"]
  node_pipeline_canvas["Pipeline canvas<br/>[PipelineCanvas.tsx]"]
  node_training_pages["Training results<br/>[page.tsx]"]
  node_api_client["API client<br/>[client.ts]"]
end

subgraph group_api["API and domain"]
  node_api_app["FastAPI app<br/>[main.py]"]
  node_auth_routes["Authentication<br/>[auth.py]"]
  node_dataset_routes["Dataset routes<br/>[datasets.py]"]
  node_profile_service["Profiling"]
  node_ai_routes["AI analysis<br/>[ai.py]"]
  node_eda_routes["Exploration<br/>[eda.py]"]
  node_clean_routes["Data cleaning<br/>[cleaning.py]"]
  node_pipeline_routes["Pipeline control<br/>[pipeline.py]"]
  node_pipeline_service["DAG validation"]
  node_training_routes["Model training<br/>[training.py]"]
  node_job_routes["Job status<br/>[jobs.py]"]
  node_storage_service["Storage access<br/>[storage_service.py]"]
end

subgraph group_async["Async execution"]
  node_workers["Celery workers<br/>[celery_app.py]"]
  node_profile_worker["Profile worker"]
  node_ai_worker["AI worker<br/>[ai_worker.py]"]
  node_eda_worker["EDA worker<br/>[eda_worker.py]"]
  node_clean_worker["Cleaning worker<br/>[cleaning_worker.py]"]
  node_pipeline_worker["Pipeline runner<br/>[pipeline_worker.py]"]
  node_training_worker["Training worker<br/>[training_worker.py]"]
end

subgraph group_state["Persistent state"]
  node_database[("Application records<br/>[database.py]")]
end

subgraph group_integrations["External systems"]
  node_object_storage[("MinIO")]
  node_queue["Redis broker"]
  node_openai{{"OpenAI API"}}
  node_ml_engine{{"ML libraries"}}
end

node_user(("Analyst"))

node_user -->|"uses"| node_web
node_web -->|"requests"| node_api_client
node_project_pages -->|"loads projects"| node_api_client
node_dataset_pages -->|"loads data"| node_api_client
node_pipeline_canvas -->|"saves and validates"| node_api_client
node_training_pages -->|"loads runs"| node_api_client
node_api_client -->|"HTTP requests"| node_api_app
node_api_app -->|"dispatches"| node_auth_routes
node_api_app -->|"dispatches"| node_dataset_routes
node_api_app -->|"dispatches"| node_ai_routes
node_api_app -->|"dispatches"| node_eda_routes
node_api_app -->|"dispatches"| node_clean_routes
node_api_app -->|"dispatches"| node_pipeline_routes
node_api_app -->|"dispatches"| node_training_routes
node_api_app -->|"dispatches"| node_job_routes
node_dataset_routes -->|"profiles data"| node_profile_service
node_dataset_routes -->|"stores uploads"| node_storage_service
node_pipeline_routes -->|"validates graph"| node_pipeline_service
node_pipeline_routes -->|"queues run"| node_pipeline_worker
node_pipeline_routes -->|"stores runs"| node_database
node_profile_service -->|"stores profile"| node_database
node_workers -->|"uses broker"| node_queue
node_profile_worker -->|"writes profile"| node_database
node_ai_worker -.->|"requests analysis"| node_openai
node_ai_worker -->|"stores insights"| node_database
node_eda_worker -->|"stores results"| node_database
node_clean_worker -->|"reads and writes versions"| node_storage_service
node_clean_worker -->|"records versions"| node_database
node_pipeline_worker -->|"reads graph and writes run"| node_database
node_pipeline_worker -->|"dispatches training"| node_training_worker
node_training_worker -->|"trains model"| node_ml_engine
node_training_worker -->|"stores metrics"| node_database
node_training_worker -->|"stores artifact"| node_storage_service
node_storage_service -->|"uploads and downloads"| node_object_storage
node_job_routes -->|"reads job status"| node_database

click node_web "https://github.com/cmxau/auto-ml/blob/main/frontend/src/app/(auth)/login/page.tsx"
click node_project_pages "https://github.com/cmxau/auto-ml/blob/main/frontend/src/app/projects/%5BprojectId%5D/page.tsx"
click node_dataset_pages "https://github.com/cmxau/auto-ml/blob/main/frontend/src/app/projects/%5BprojectId%5D/datasets/%5BdatasetId%5D/page.tsx"
click node_pipeline_canvas "https://github.com/cmxau/auto-ml/blob/main/frontend/src/components/pipeline/PipelineCanvas.tsx"
click node_training_pages "https://github.com/cmxau/auto-ml/blob/main/frontend/src/app/projects/%5BprojectId%5D/training/%5BrunId%5D/page.tsx"
click node_api_client "https://github.com/cmxau/auto-ml/blob/main/frontend/src/lib/api/client.ts"
click node_api_app "https://github.com/cmxau/auto-ml/blob/main/backend/app/main.py"
click node_auth_routes "https://github.com/cmxau/auto-ml/blob/main/backend/app/routers/auth.py"
click node_dataset_routes "https://github.com/cmxau/auto-ml/blob/main/backend/app/routers/datasets.py"
click node_profile_service "https://github.com/cmxau/auto-ml/blob/main/backend/app/services/profiling_service.py"
click node_ai_routes "https://github.com/cmxau/auto-ml/blob/main/backend/app/routers/ai.py"
click node_eda_routes "https://github.com/cmxau/auto-ml/blob/main/backend/app/routers/eda.py"
click node_clean_routes "https://github.com/cmxau/auto-ml/blob/main/backend/app/routers/cleaning.py"
click node_pipeline_routes "https://github.com/cmxau/auto-ml/blob/main/backend/app/routers/pipeline.py"
click node_pipeline_service "https://github.com/cmxau/auto-ml/blob/main/backend/app/services/pipeline_service.py"
click node_training_routes "https://github.com/cmxau/auto-ml/blob/main/backend/app/routers/training.py"
click node_job_routes "https://github.com/cmxau/auto-ml/blob/main/backend/app/routers/jobs.py"
click node_workers "https://github.com/cmxau/auto-ml/blob/main/backend/app/workers/celery_app.py"
click node_profile_worker "https://github.com/cmxau/auto-ml/blob/main/backend/app/workers/profiling_worker.py"
click node_ai_worker "https://github.com/cmxau/auto-ml/blob/main/backend/app/workers/ai_worker.py"
click node_eda_worker "https://github.com/cmxau/auto-ml/blob/main/backend/app/workers/eda_worker.py"
click node_clean_worker "https://github.com/cmxau/auto-ml/blob/main/backend/app/workers/cleaning_worker.py"
click node_pipeline_worker "https://github.com/cmxau/auto-ml/blob/main/backend/app/workers/pipeline_worker.py"
click node_training_worker "https://github.com/cmxau/auto-ml/blob/main/backend/app/workers/training_worker.py"
click node_database "https://github.com/cmxau/auto-ml/blob/main/backend/app/database.py"
click node_storage_service "https://github.com/cmxau/auto-ml/blob/main/backend/app/services/storage_service.py"

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_web,node_project_pages,node_dataset_pages,node_pipeline_canvas,node_training_pages,node_api_client toneBlue
class node_api_app,node_auth_routes,node_dataset_routes,node_profile_service,node_ai_routes,node_eda_routes,node_clean_routes,node_pipeline_routes,node_pipeline_service,node_training_routes,node_job_routes,node_storage_service toneAmber
class node_workers,node_profile_worker,node_ai_worker,node_eda_worker,node_clean_worker,node_pipeline_worker,node_training_worker toneMint
class node_database toneRose
class node_object_storage,node_queue,node_openai,node_ml_engine,node_user toneIndigo
```

## Components

### Browser workspace

- [Web workspace](https://github.com/cmxau/auto-ml/blob/main/frontend/src/app/(auth)/login/page.tsx): `frontend/src/app/(auth)/login/page.tsx`
- [Project pages](https://github.com/cmxau/auto-ml/blob/main/frontend/src/app/projects/%5BprojectId%5D/page.tsx): `frontend/src/app/projects/[projectId]/page.tsx`
- [Dataset pages](https://github.com/cmxau/auto-ml/blob/main/frontend/src/app/projects/%5BprojectId%5D/datasets/%5BdatasetId%5D/page.tsx): `frontend/src/app/projects/[projectId]/datasets/[datasetId]/page.tsx`
- [Pipeline canvas](https://github.com/cmxau/auto-ml/blob/main/frontend/src/components/pipeline/PipelineCanvas.tsx): `frontend/src/components/pipeline/PipelineCanvas.tsx`
- [Training results](https://github.com/cmxau/auto-ml/blob/main/frontend/src/app/projects/%5BprojectId%5D/training/%5BrunId%5D/page.tsx): `frontend/src/app/projects/[projectId]/training/[runId]/page.tsx`
- [API client](https://github.com/cmxau/auto-ml/blob/main/frontend/src/lib/api/client.ts): `frontend/src/lib/api/client.ts`

### API and domain

- [FastAPI app](https://github.com/cmxau/auto-ml/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication](https://github.com/cmxau/auto-ml/blob/main/backend/app/routers/auth.py): `backend/app/routers/auth.py`
- [Dataset routes](https://github.com/cmxau/auto-ml/blob/main/backend/app/routers/datasets.py): `backend/app/routers/datasets.py`
- [Profiling](https://github.com/cmxau/auto-ml/blob/main/backend/app/services/profiling_service.py): `backend/app/services/profiling_service.py`
- [AI analysis](https://github.com/cmxau/auto-ml/blob/main/backend/app/routers/ai.py): `backend/app/routers/ai.py`
- [Exploration](https://github.com/cmxau/auto-ml/blob/main/backend/app/routers/eda.py): `backend/app/routers/eda.py`
- [Data cleaning](https://github.com/cmxau/auto-ml/blob/main/backend/app/routers/cleaning.py): `backend/app/routers/cleaning.py`
- [Pipeline control](https://github.com/cmxau/auto-ml/blob/main/backend/app/routers/pipeline.py): `backend/app/routers/pipeline.py`
- [DAG validation](https://github.com/cmxau/auto-ml/blob/main/backend/app/services/pipeline_service.py): `backend/app/services/pipeline_service.py`
- [Model training](https://github.com/cmxau/auto-ml/blob/main/backend/app/routers/training.py): `backend/app/routers/training.py`
- [Job status](https://github.com/cmxau/auto-ml/blob/main/backend/app/routers/jobs.py): `backend/app/routers/jobs.py`
- [Storage access](https://github.com/cmxau/auto-ml/blob/main/backend/app/services/storage_service.py): `backend/app/services/storage_service.py`

### Async execution

- [Celery workers](https://github.com/cmxau/auto-ml/blob/main/backend/app/workers/celery_app.py): `backend/app/workers/celery_app.py`
- [Profile worker](https://github.com/cmxau/auto-ml/blob/main/backend/app/workers/profiling_worker.py): `backend/app/workers/profiling_worker.py`
- [AI worker](https://github.com/cmxau/auto-ml/blob/main/backend/app/workers/ai_worker.py): `backend/app/workers/ai_worker.py`
- [EDA worker](https://github.com/cmxau/auto-ml/blob/main/backend/app/workers/eda_worker.py): `backend/app/workers/eda_worker.py`
- [Cleaning worker](https://github.com/cmxau/auto-ml/blob/main/backend/app/workers/cleaning_worker.py): `backend/app/workers/cleaning_worker.py`
- [Pipeline runner](https://github.com/cmxau/auto-ml/blob/main/backend/app/workers/pipeline_worker.py): `backend/app/workers/pipeline_worker.py`
- [Training worker](https://github.com/cmxau/auto-ml/blob/main/backend/app/workers/training_worker.py): `backend/app/workers/training_worker.py`

### Persistent state

- [Application records](https://github.com/cmxau/auto-ml/blob/main/backend/app/database.py): `backend/app/database.py`

### External systems

- **MinIO**
- **Redis broker**
- **OpenAI API**
- **ML libraries**

### Other components

- **Analyst**

## Connections

- Analyst → Web workspace: uses
- Web workspace → API client: requests
- Project pages → API client: loads projects
- Dataset pages → API client: loads data
- Pipeline canvas → API client: saves and validates
- Training results → API client: loads runs
- API client → FastAPI app: HTTP requests
- FastAPI app → Authentication: dispatches
- FastAPI app → Dataset routes: dispatches
- FastAPI app → AI analysis: dispatches
- FastAPI app → Exploration: dispatches
- FastAPI app → Data cleaning: dispatches
- FastAPI app → Pipeline control: dispatches
- FastAPI app → Model training: dispatches
- FastAPI app → Job status: dispatches
- Dataset routes → Profiling: profiles data
- Dataset routes → Storage access: stores uploads
- Pipeline control → DAG validation: validates graph
- Pipeline control → Pipeline runner: queues run
- Pipeline control → Application records: stores runs
- Profiling → Application records: stores profile
- Celery workers → Redis broker: uses broker
- Profile worker → Application records: writes profile
- AI worker → OpenAI API: requests analysis
- AI worker → Application records: stores insights
- EDA worker → Application records: stores results
- Cleaning worker → Storage access: reads and writes versions
- Cleaning worker → Application records: records versions
- Pipeline runner → Application records: reads graph and writes run
- Pipeline runner → Training worker: dispatches training
- Training worker → ML libraries: trains model
- Training worker → Application records: stores metrics
- Training worker → Storage access: stores artifact
- Storage access → MinIO: uploads and downloads
- Job status → Application records: reads job status
