# tayyabzunair/algotrix architecture

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

- Interactive diagram: https://gitdiagram.com/tayyabzunair/algotrix
- Repository: https://github.com/tayyabzunair/algotrix

## Overview

Algotrix is a no-code AutoML web application. Its principal workflow takes a user-uploaded CSV through profiling, cleaning, exploratory analysis, target recommendation, model comparison/tuning, and model download. The backend route module visibly dispatches to the analysis and training modules; the upload-page excerpt shows the user-facing stages but omits its request-handling code, so frontend/backend workflow links are marked unverified. Authentication uses Supabase; detailed wiring for several account routes is not sampled.

Main entry points: [`backend/main.py`](https://github.com/tayyabzunair/algotrix/blob/main/backend/main.py) (API routes), [`frontend/app/signup/page.tsx`](https://github.com/tayyabzunair/algotrix/blob/main/frontend/app/signup/page.tsx) (Account pages), [`frontend/app/upload/page.tsx`](https://github.com/tayyabzunair/algotrix/blob/main/frontend/app/upload/page.tsx) (CSV workflow), [`frontend/lib/supabase/client.ts`](https://github.com/tayyabzunair/algotrix/blob/main/frontend/lib/supabase/client.ts) (Supabase client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_upload_ui["CSV workflow<br/>[page.tsx]"]
  node_dashboard["Dashboard"]
end

subgraph group_auth["Account access"]
  node_auth_pages["Account pages<br/>[page.tsx]"]
  node_supabase_client["Supabase client<br/>[client.ts]"]
  node_supabase[("Supabase")]
end

subgraph group_api["Backend API"]
  node_api_routes["API routes<br/>[main.py]"]
end

subgraph group_automl["AutoML stages"]
  node_profiling["Data profiling<br/>[profiler.py]"]
  node_cleaning["Data cleaning<br/>[cleaner.py]"]
  node_eda["Exploratory analysis<br/>[eda.py]"]
  node_target["Target suggestion<br/>[target_analyzer.py]"]
  node_training["Train and tune<br/>[trainer.py]"]
  node_model_file[("Model artifact<br/>[trainer.py]")]
end

node_user(("User"))

node_user -->|"uploads CSV"| node_upload_ui
node_upload_ui -.->|"submits workflow"| node_api_routes
node_api_routes -->|"profiles dataset"| node_profiling
node_api_routes -->|"cleans dataset"| node_cleaning
node_api_routes -->|"generates EDA"| node_eda
node_api_routes -->|"analyzes target"| node_target
node_api_routes -->|"trains models"| node_training
node_training -.->|"saves best model"| node_model_file
node_api_routes -->|"serves download"| node_model_file
node_api_routes -.->|"returns reports"| node_upload_ui
node_user -->|"creates account"| node_auth_pages
node_auth_pages -->|"creates client"| node_supabase_client
node_auth_pages -->|"signs up"| node_supabase
node_supabase_client -.->|"connects"| node_supabase
node_user -->|"views workspace"| node_dashboard

click node_upload_ui "https://github.com/tayyabzunair/algotrix/blob/main/frontend/app/upload/page.tsx"
click node_dashboard "https://github.com/tayyabzunair/algotrix/blob/main/frontend/app/dashboard/DashboardClient.tsx"
click node_auth_pages "https://github.com/tayyabzunair/algotrix/blob/main/frontend/app/signup/page.tsx"
click node_supabase_client "https://github.com/tayyabzunair/algotrix/blob/main/frontend/lib/supabase/client.ts"
click node_api_routes "https://github.com/tayyabzunair/algotrix/blob/main/backend/main.py"
click node_profiling "https://github.com/tayyabzunair/algotrix/blob/main/backend/profiler.py"
click node_cleaning "https://github.com/tayyabzunair/algotrix/blob/main/backend/cleaner.py"
click node_eda "https://github.com/tayyabzunair/algotrix/blob/main/backend/eda.py"
click node_target "https://github.com/tayyabzunair/algotrix/blob/main/backend/target_analyzer.py"
click node_training "https://github.com/tayyabzunair/algotrix/blob/main/backend/trainer.py"
click node_model_file "https://github.com/tayyabzunair/algotrix/blob/main/backend/trainer.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_upload_ui,node_dashboard,node_user toneBlue
class node_auth_pages,node_supabase_client,node_supabase toneAmber
class node_api_routes toneMint
class node_profiling,node_cleaning,node_eda,node_target,node_training,node_model_file toneRose
```

## Components

### Web experience

- [CSV workflow](https://github.com/tayyabzunair/algotrix/blob/main/frontend/app/upload/page.tsx): `frontend/app/upload/page.tsx`
- [Dashboard](https://github.com/tayyabzunair/algotrix/blob/main/frontend/app/dashboard/DashboardClient.tsx): `frontend/app/dashboard/DashboardClient.tsx`

### Account access

- [Account pages](https://github.com/tayyabzunair/algotrix/blob/main/frontend/app/signup/page.tsx): `frontend/app/signup/page.tsx`
- [Supabase client](https://github.com/tayyabzunair/algotrix/blob/main/frontend/lib/supabase/client.ts): `frontend/lib/supabase/client.ts`
- **Supabase**

### Backend API

- [API routes](https://github.com/tayyabzunair/algotrix/blob/main/backend/main.py): `backend/main.py`

### AutoML stages

- [Data profiling](https://github.com/tayyabzunair/algotrix/blob/main/backend/profiler.py): `backend/profiler.py`
- [Data cleaning](https://github.com/tayyabzunair/algotrix/blob/main/backend/cleaner.py): `backend/cleaner.py`
- [Exploratory analysis](https://github.com/tayyabzunair/algotrix/blob/main/backend/eda.py): `backend/eda.py`
- [Target suggestion](https://github.com/tayyabzunair/algotrix/blob/main/backend/target_analyzer.py): `backend/target_analyzer.py`
- [Train and tune](https://github.com/tayyabzunair/algotrix/blob/main/backend/trainer.py): `backend/trainer.py`
- [Model artifact](https://github.com/tayyabzunair/algotrix/blob/main/backend/trainer.py): `backend/trainer.py`

### Other components

- **User**

## Connections

- User → CSV workflow: uploads CSV (evidence: `README.md`)
- CSV workflow → API routes: submits workflow
- API routes → Data profiling: profiles dataset (evidence: `backend/main.py`)
- API routes → Data cleaning: cleans dataset (evidence: `backend/main.py`)
- API routes → Exploratory analysis: generates EDA (evidence: `backend/main.py`)
- API routes → Target suggestion: analyzes target (evidence: `backend/main.py`)
- API routes → Train and tune: trains models (evidence: `backend/main.py`)
- Train and tune → Model artifact: saves best model (evidence: `backend/trainer.py`)
- API routes → Model artifact: serves download (evidence: `backend/main.py`)
- API routes → CSV workflow: returns reports
- User → Account pages: creates account (evidence: `README.md`)
- Account pages → Supabase client: creates client (evidence: `frontend/app/signup/page.tsx`)
- Account pages → Supabase: signs up (evidence: `frontend/app/signup/page.tsx`)
- Supabase client → Supabase: connects
- User → Dashboard: views workspace (evidence: `frontend/app/dashboard/DashboardClient.tsx`)
