AI-assisted machine learning workspace for students, analysts, and no-code ML beginners.
Upload a dataset β AI analyzes it β clean it β build a pipeline β train a model β download results.
Core rule: AI suggests β system validates β user approves β engine executes. The AI layer never mutates data directly.
- Features
- Tech Stack
- Architecture Overview
- Prerequisites
- Environment Setup
- Running Locally β Docker (Recommended)
- Running Locally β Native
- Environment Variables Reference
- Running Tests
- Project Structure
- API Reference
- Database Schema
- Troubleshooting
- Build Phases
- Known Limitations
| Area | What it does |
|---|---|
| Dataset upload | Upload CSV, XLSX, or JSON (up to 100 MB). Async profiling computes row count, column types, null rates, min/max/mean per column. |
| AI analysis | GPT-4o-mini infers task type (classification vs regression), recommends target column, flags data quality issues, ranks model candidates. |
| EDA | Distribution histograms, correlation matrix, missing value heatmap. AI writes plain-English commentary on each chart. |
| Cleaning | 9 transform types (drop column, fill nulls, rename, cast type, filter rows, normalize, one-hot encode, clip outliers, drop duplicates). Natural-language command interface. Every action goes through preview β confirm β apply. Each applied transform creates an immutable new dataset version. |
| Pipeline builder | React Flow drag-and-drop canvas. 8 node types: Input, Clean, Transform, Feature Engineering, Split, Train, Evaluate, Export. DAG validation before execute. |
| Model training | 6 model types via scikit-learn/XGBoost: Logistic Regression, Random Forest, XGBoost (classification); Linear Regression, Random Forest Regressor, XGBoost Regressor. 80/20 train/test split. Async Celery worker. Metrics: accuracy, F1, precision, recall, ROC-AUC (classification); RΒ², RMSE, MAE, MSE (regression). |
| Feature importance | Extracted from tree models via feature_importances_, from linear models via abs(coef_). Rendered as horizontal bar chart. |
| AI experiment summary | GPT-4o-mini explains results, gives assessment (excellent/good/fair/poor), suggests 2β3 improvements. Loaded on demand. |
| Model download | Presigned MinIO URL (5-minute TTL). Direct browser download of trained .joblib model file. |
| Error UX | Backend 422 validation errors (bad target column, column count >500) surfaced in UI. Failed training runs show error detail. |
| Layer | Technology | Version |
|---|---|---|
| Frontend | Next.js (App Router) | 14 |
| Language | TypeScript | 5 |
| Styling | Tailwind CSS | 3 |
| Server state | TanStack Query | v5 |
| Client state | Zustand | β |
| Charts | Recharts | β |
| Pipeline canvas | React Flow | β |
| Backend framework | FastAPI | 0.111 |
| Backend language | Python | 3.11 |
| ORM | SQLAlchemy | 2.0 |
| Migrations | Alembic | 1.13 |
| Schema validation | Pydantic | 2.7 |
| Database | PostgreSQL | 16 |
| Object storage | MinIO (S3-compatible) | β |
| Job queue broker | Redis | 7 |
| Task queue | Celery | 5.4 |
| ML | scikit-learn | 1.5 |
| ML (boosting) | XGBoost | 2.0 |
| Model serialization | joblib | 1.4 |
| Data processing | Pandas | 2.2 |
| AI | OpenAI API (GPT-4o-mini) | β |
| Auth | JWT (python-jose) + bcrypt (passlib) | β |
Browser (Next.js)
β
β HTTP/REST Authorization: Bearer <jwt>
βΌ
FastAPI (port 8000)
βββ Auth middleware β validates JWT on every protected route
βββ Routers β thin HTTP layer, delegates to services
βββ Services β business logic (no HTTP concerns)
β βββ storage_service.py β MinIO (boto3)
β βββ ai_service.py β OpenAI
β βββ training_service.py β pure sklearn/XGBoost functions (unit tested)
β βββ ...
βββ SQLAlchemy β PostgreSQL (sync, psycopg2)
βββ Celery task dispatch β Redis
β
βΌ
Celery Worker (same Docker image as backend)
βββ profile_dataset_task β runs pandas profiling, writes DatasetProfile to DB
βββ ai_analysis_task β calls OpenAI, writes AIInsight to DB
βββ eda_task β computes chart data, writes EDAResult to DB
βββ cleaning_worker_task β applies transform, writes new DatasetVersion to MinIO + DB
βββ train_model_task β trains model, writes TrainingRun + metrics + artifact to DB/MinIO
Object Storage (MinIO, port 9000)
Bucket: automl-files
βββ datasets/{project_id}/{uuid}/{filename} raw uploads and cleaned versions
βββ artifacts/{project_id}/models/{run_id}/model.joblib
Key design decisions:
- Every heavy operation (profiling, AI analysis, EDA, cleaning, training) is async. The API returns a
job_idimmediately. The frontend pollsGET /jobs/{jobId}or waits for data to appear. - Dataset versioning: raw upload = version 0. Every applied cleaning action creates a new immutable version. Training runs reference a specific version.
- The AI layer only produces JSON proposals. It never writes to the database directly.
- The Celery worker defers all imports inside the task function body to avoid forked-process import issues.
- Docker Desktop 4.x or later (includes Docker Compose v2)
- OpenAI API key β required for AI features (dataset analysis, EDA commentary, experiment summary)
That's it. Python and Node.js are not required on the host.
- Python 3.11 (exact β
python3.11 --version) - Node.js 20+ (
node --version) - Docker (for Postgres, Redis, MinIO only)
- OpenAI API key
The project uses a single .env file at the repo root. This file is read by:
- The backend FastAPI app (via
pydantic-settings) docker compose(to resolve${VARIABLE}substitutions indocker-compose.yml)- The Celery worker (same process as backend, same
.env)
The
.envfile is gitignored β it is never committed..env.exampleis the source of truth for what variables are needed.
Step 1: Copy the example file
cp .env.example .envStep 2: Set your OpenAI API key
Open .env in any editor and replace the placeholder:
OPENAI_API_KEY=sk-your-openai-api-key-here
with your real key:
OPENAI_API_KEY=sk-proj-abc123...
Get a key at https://platform.openai.com/api-keys
All other values in .env work as-is for local development. The only variable you must change is OPENAI_API_KEY.
The complete .env for local development looks like this:
DATABASE_URL=postgresql://automl:automl@localhost:5432/automl
REDIS_URL=redis://localhost:6379/0
MINIO_ENDPOINT=localhost:9000
MINIO_PUBLIC_ENDPOINT=localhost:9000
MINIO_ACCESS_KEY=minioadmin
MINIO_SECRET_KEY=minioadmin
MINIO_BUCKET=automl-files
MINIO_USE_SSL=false
SECRET_KEY=change-me-in-production-min-32-chars
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=1440
ENVIRONMENT=development
MAX_UPLOAD_SIZE_MB=100
OPENAI_API_KEY=sk-your-key-here
OPENAI_MODEL=gpt-4o-mini
NEXT_PUBLIC_API_URL=http://localhost:8000/api/v1All 5 services (Postgres, Redis, MinIO, backend, frontend) and the Celery worker run in containers. Nothing needs to be installed on the host beyond Docker.
Follow Environment Setup above. The .env file must exist with your OPENAI_API_KEY before starting Docker services.
Start the three stateful services first and wait for them to be healthy before proceeding:
docker compose up -d postgres redis minioCheck health status (all three should show healthy):
docker compose psExpected output:
NAME STATUS
automl-minio-1 Up 30 seconds (healthy)
automl-postgres-1 Up 30 seconds (healthy)
automl-redis-1 Up 30 seconds (healthy)
If any service shows starting instead of healthy, wait another 10β15 seconds and check again. MinIO takes the longest.
This creates all 10 tables (users, projects, datasets, dataset_versions, dataset_profiles, dataset_column_profiles, cleaning_actions, pipelines, training_runs, artifacts, etc.):
make migrateThis runs alembic upgrade head inside the backend container, applying all 5 migration files in order (001 β 005).
You should see output like:
INFO [alembic.runtime.migration] Running upgrade -> 001, initial schema
INFO [alembic.runtime.migration] Running upgrade 001 -> 002, add ai_insights and eda_results
INFO [alembic.runtime.migration] Running upgrade 002 -> 003, add cleaning and pipeline tables
INFO [alembic.runtime.migration] Running upgrade 003 -> 004, add training tables
INFO [alembic.runtime.migration] Running upgrade 004 -> 005, add error_message to training_runs
MinIO is running but the storage bucket does not yet exist. Create it:
make create-bucketThis sets up a automl-files bucket. All dataset uploads and trained model artifacts are stored here.
Note: The backend also attempts to create this bucket automatically at startup (via
storage.ensure_bucket()inlifespan). Themake create-bucketstep is a safety net in case the automatic creation fails.
docker compose up -dThis starts the backend API server, the Celery worker, and the Next.js frontend.
Wait about 20 seconds for the frontend to compile (Next.js dev mode compiles on first request):
docker compose logs -f frontend
# Wait until you see: "Ready - started server on 0.0.0.0:3000"| Service | URL | Notes |
|---|---|---|
| Frontend | http://localhost:3000 | Main application |
| Backend API | http://localhost:8000 | FastAPI |
| OpenAPI docs | http://localhost:8000/docs | Interactive API explorer |
| ReDoc | http://localhost:8000/redoc | Alternative API docs |
| MinIO console | http://localhost:9001 | Object storage browser |
MinIO console credentials: minioadmin / minioadmin
Register a new account at http://localhost:3000/register, then log in.
# View logs from backend and Celery worker
make logs
# View logs from a specific service
docker compose logs -f backend
docker compose logs -f worker
docker compose logs -f frontend
# Open a shell inside the running backend container
make shell-backend
# Run all backend tests inside the container (requires running Postgres)
make test-backend
# Stop all services (data is preserved in Docker volumes)
make down
# Stop all services and delete all data (volumes)
docker compose down -v
# Rebuild images after changing requirements.txt or package.json
docker compose build
docker compose up -ddocker-compose.yml hardcodes most values for local development. The only variable it reads from your .env file is OPENAI_API_KEY, using the ${OPENAI_API_KEY} syntax. Docker Compose automatically reads .env from the project root.
This means: you only need the .env file for OPENAI_API_KEY when using Docker. All database, Redis, and MinIO credentials are hardcoded in docker-compose.yml for local dev.
Run Postgres, Redis, and MinIO via Docker. Run the backend API, Celery worker, and frontend directly on the host. Best for active backend or frontend development.
docker compose up -d postgres redis minioVerify all three are healthy:
docker compose pscp .env.example .envEdit .env:
- Set
OPENAI_API_KEYto your real key - The default
DATABASE_URL,REDIS_URL,MINIO_ENDPOINTall point tolocalhostwhich is correct for native mode
cd backend
# Create and activate Python virtual environment
python3.11 -m venv venv
source venv/bin/activate # macOS/Linux
# venv\Scripts\activate # Windows
# Install all dependencies
pip install -r requirements.txtRun database migrations:
# Still inside backend/ with venv active
alembic upgrade headStart the API server:
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000The --reload flag restarts the server automatically when Python files change.
You should see:
INFO: Started server process
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8000
Open a second terminal, activate the same virtualenv, and start the worker:
cd backend
source venv/bin/activate
celery -A app.workers.celery_app worker --loglevel=info -Q profiling,training,exportThe worker handles all async jobs: profiling, AI analysis, EDA, cleaning transforms, and model training. Without the worker running, uploads will appear to hang.
You should see:
[tasks]
. app.workers.profiling_worker.profile_dataset_task
. app.workers.ai_worker.run_ai_analysis_task
. app.workers.eda_worker.compute_eda_task
. app.workers.cleaning_worker.apply_cleaning_task
. app.workers.training_worker.train_model_task
[celery@hostname] ready.
Open a third terminal:
cd frontend
npm install
npm run devThe Next.js dev server starts on http://localhost:3000.
The backend will attempt to auto-create the bucket on startup, but if it fails:
Option A: Via MinIO web console
- Open http://localhost:9001
- Log in:
minioadmin/minioadmin - Click "Create Bucket"
- Name:
automl-files - Click "Create Bucket"
Option B: Via mc CLI (if installed)
mc alias set local http://localhost:9000 minioadmin minioadmin
mc mb local/automl-filesThese variables must be present in .env (native setup) or are hardcoded / passed via docker-compose.yml (Docker setup).
| Variable | Required | Default | Description |
|---|---|---|---|
DATABASE_URL |
Yes | postgresql://automl:automl@localhost:5432/automl |
PostgreSQL connection string. In Docker, this points to the postgres service hostname. |
REDIS_URL |
Yes | redis://localhost:6379/0 |
Redis connection string. Used by Celery as both broker and result backend. In Docker, points to the redis service hostname. |
MINIO_ENDPOINT |
Yes | localhost:9000 |
MinIO address without protocol. Used by the backend and worker for server-side operations (upload, download, bucket creation). In Docker, this is minio:9000 (internal hostname). |
MINIO_PUBLIC_ENDPOINT |
Yes | localhost:9000 |
MinIO address used when generating presigned download URLs for the browser. Must be reachable from the user's browser. In Docker local dev, this is localhost:9000. In production, set to your public CDN or domain (e.g., storage.yourdomain.com). If empty, falls back to MINIO_ENDPOINT. |
MINIO_ACCESS_KEY |
Yes | minioadmin |
MinIO access key (username). |
MINIO_SECRET_KEY |
Yes | minioadmin |
MinIO secret key (password). |
MINIO_BUCKET |
No | automl-files |
Storage bucket name. Created automatically at backend startup. |
MINIO_USE_SSL |
No | false |
Set to true if MinIO is behind HTTPS. |
SECRET_KEY |
Yes | β | JWT signing key. Must be at least 32 characters. Never use the default in production. Generate one: openssl rand -hex 32 |
ALGORITHM |
No | HS256 |
JWT signing algorithm. |
ACCESS_TOKEN_EXPIRE_MINUTES |
No | 1440 |
JWT token lifetime (24 hours). |
ENVIRONMENT |
No | development |
Used for logging and behavior flags. |
MAX_UPLOAD_SIZE_MB |
No | 100 |
Maximum dataset file size. Files larger than this are rejected at upload. |
OPENAI_API_KEY |
Yes* | β | OpenAI API key. Required for AI analysis, cleaning suggestions, EDA commentary, and experiment summary. Without it, AI features return empty results but the rest of the app works. Get a key at platform.openai.com |
OPENAI_MODEL |
No | gpt-4o-mini |
OpenAI model to use for all AI features. |
NEXT_PUBLIC_API_URL |
Yes | http://localhost:8000/api/v1 |
The URL the browser uses to reach the backend API. Must be reachable from the user's browser. In Docker, the frontend container uses this to build API requests that run in the browser (not in Node.js). |
MINIO_ENDPOINTvsMINIO_PUBLIC_ENDPOINT: These solve a Docker networking problem. Inside Docker, the backend talks to MinIO atminio:9000(Docker internal hostname). But presigned download URLs are opened by the user's browser, which doesn't know aboutminio:9000.MINIO_PUBLIC_ENDPOINT=localhost:9000tells the backend to rewrite the host in presigned URLs before returning them to the frontend, so the browser can actually reach MinIO.
These tests cover pure business logic functions and do not need Postgres running:
cd backend
source venv/bin/activate # or activate your venv
pytest tests/test_training_service.py -v # 20 tests: prepare_features, build_model, metrics, feature importance
pytest tests/test_profiling_service.py -v # profiling pure functions
pytest tests/test_cleaning_service.py -v # 9 transform types
pytest tests/test_eda_service.py -v # chart data computation
pytest tests/test_ai_service.py -v # OpenAI response parsing (mocked)
pytest tests/test_pipeline_service.py -v # DAG validationRun all pure unit tests at once:
pytest tests/test_training_service.py tests/test_profiling_service.py \
tests/test_cleaning_service.py tests/test_eda_service.py \
tests/test_ai_service.py tests/test_pipeline_service.py -vExpected: 77 tests, all passing, in ~3 seconds.
These tests require a running PostgreSQL instance. They use a separate test database automl_test (defined in conftest.py):
# Create the test database first (one-time)
docker compose exec postgres createdb -U automl automl_test
# or natively:
psql -U automl -h localhost -c "CREATE DATABASE automl_test;"
# Run integration tests
pytest tests/test_auth.py tests/test_projects.py tests/test_datasets.py -vRun all tests with coverage:
pytest tests/ -v --cov=app --cov-report=term-missingVia Docker (no test database setup needed, uses the main DB):
make test-backendcd frontend
npx tsc --noEmit # 0 errors expectedcd frontend
npm run build # production build, catches any compilation errorsautoml/
β
βββ .env β your local config (gitignored, copy from .env.example)
βββ .env.example β template with all required variables
βββ docker-compose.yml β all 6 services: postgres, redis, minio, backend, worker, frontend
βββ Makefile β shortcuts: up, down, logs, migrate, test-backend, shell-backend
βββ .gitignore
β
βββ backend/
β βββ Dockerfile β python:3.11-slim, installs requirements, copies app
β βββ requirements.txt β all Python dependencies pinned to exact versions
β βββ alembic.ini β points Alembic to migrations/ directory
β β
β βββ app/
β β βββ main.py β FastAPI app factory; mounts all routers; creates MinIO bucket at startup
β β βββ config.py β pydantic-settings Settings class; reads from .env
β β βββ database.py β SQLAlchemy engine (sync, psycopg2); get_db() session dependency
β β β
β β βββ core/
β β β βββ security.py β create_access_token(), verify_token(), hash_password(), verify_password()
β β β βββ deps.py β get_current_user() FastAPI dependency (validates JWT, loads User from DB)
β β β
β β βββ models/ β SQLAlchemy ORM models (mapped_column / Mapped style)
β β β βββ base.py β Base, TimestampMixin (created_at, updated_at), new_uuid()
β β β βββ user.py β User (id, email, hashed_password, is_active)
β β β βββ project.py β Project (id, user_id, name, description)
β β β βββ dataset.py β Dataset (id, project_id, name, file_format, status) + DatasetVersion
β β β βββ profile.py β DatasetProfile + DatasetColumnProfile (per-column stats)
β β β βββ job.py β Job (id, project_id, job_type, status, input_json, output_json, error_message)
β β β βββ ai_insight.py β AIInsight (analysis results, model recommendations)
β β β βββ eda_result.py β EDAResult (chart data as JSONB)
β β β βββ cleaning.py β CleaningAction + CleaningExecution
β β β βββ pipeline.py β Pipeline + PipelineNode + PipelineEdge
β β β βββ training.py β TrainingRun + TrainingMetric + Artifact
β β β
β β βββ schemas/ β Pydantic v2 request/response models
β β β βββ auth.py
β β β βββ project.py
β β β βββ dataset.py
β β β βββ cleaning.py
β β β βββ pipeline.py
β β β βββ training.py
β β β
β β βββ routers/ β FastAPI route handlers (thin HTTP layer only)
β β β βββ auth.py β POST /auth/register, POST /auth/login, GET /auth/me
β β β βββ projects.py β POST/GET/PATCH/DELETE /projects, GET /projects/{id}
β β β βββ datasets.py β POST /datasets/upload, GET /datasets/{id}/preview, /profile, /versions
β β β βββ ai.py β POST /ai/datasets/{id}/analyze, GET /ai/datasets/{id}/insights
β β β βββ eda.py β GET /eda/datasets/{id}
β β β βββ cleaning.py β POST /cleaning/propose, /apply, GET /cleaning/actions
β β β βββ pipeline.py β POST/GET/PATCH /projects/{id}/pipelines, /validate, /execute
β β β βββ training.py β POST /training/start, GET /training/runs/{id}, /download, /metrics, /summary, POST /training/compare
β β β βββ jobs.py β GET /jobs, GET /jobs/{id}
β β β
β β βββ services/ β Business logic. No FastAPI imports. No HTTP concerns.
β β β βββ auth_service.py β register_user(), authenticate_user()
β β β βββ project_service.py β get_project() (with ownership check)
β β β βββ dataset_service.py β create_dataset_with_version(), validate_extension()
β β β βββ storage_service.py β StorageService: upload_file(), download_file(), get_presigned_url()
β β β βββ profiling_service.py β profile_dataframe() β pure pandas, no DB/network, unit tested
β β β βββ ai_service.py β OpenAI agents: analyze_dataset(), suggest_cleaning(), summarize_training_results()
β β β βββ eda_service.py β compute_eda() β chart data as dicts, unit tested
β β β βββ cleaning_service.py β apply_action() β dispatches to 9 transform functions, unit tested
β β β βββ pipeline_service.py β validate_dag() β topological sort, cycle detection, unit tested
β β β βββ training_service.py β prepare_features(), build_model(), compute_*_metrics(), extract_feature_importance(), serialize_model() β all pure functions, unit tested
β β β
β β βββ workers/ β Celery tasks. All imports deferred inside task bodies.
β β βββ celery_app.py β Celery instance; broker=Redis; queues: profiling, training, export
β β βββ profiling_worker.py β profile_dataset_task(job_id): reads file from MinIO, runs profiling_service, writes DatasetProfile to DB
β β βββ ai_worker.py β run_ai_analysis_task(job_id): calls ai_service, writes AIInsight to DB
β β βββ eda_worker.py β compute_eda_task(job_id): calls eda_service, writes EDAResult to DB
β β βββ cleaning_worker.py β apply_cleaning_task(job_id): reads version from MinIO, applies transform, writes new DatasetVersion
β β βββ training_worker.py β train_model_task(job_id): loads dataset, trains model, writes metrics + uploads .joblib to MinIO
β β
β βββ migrations/
β β βββ env.py β Alembic env; imports all ORM models so autogenerate works
β β βββ versions/
β β βββ 001_initial_schema.py β users, projects, datasets, dataset_versions, dataset_profiles, dataset_column_profiles, jobs
β β βββ 002_add_ai_insights_eda_results.py β ai_insights, eda_results
β β βββ 003_add_cleaning_pipeline.py β cleaning_actions, cleaning_executions, pipelines, pipeline_nodes, pipeline_edges
β β βββ 004_add_training_tables.py β training_runs, training_metrics, artifacts
β β βββ 005_add_training_run_error_message.py β adds error_message column to training_runs
β β
β βββ tests/
β βββ conftest.py β session-scoped engine on automl_test DB; per-test transaction rollback
β βββ test_auth.py β register, login, JWT validation (integration)
β βββ test_projects.py β project CRUD (integration)
β βββ test_datasets.py β upload, profile, preview (integration)
β βββ test_profiling_service.py β pure unit tests, no DB
β βββ test_cleaning_service.py β pure unit tests, no DB
β βββ test_eda_service.py β pure unit tests, no DB
β βββ test_ai_service.py β pure unit tests, no DB
β βββ test_pipeline_service.py β pure unit tests, no DB
β βββ test_training_service.py β pure unit tests, no DB (20 tests)
β
βββ frontend/
β βββ Dockerfile β node:20-alpine, npm ci, EXPOSE 3000
β βββ next.config.mjs
β βββ tailwind.config.ts
β βββ tsconfig.json
β βββ package.json
β β
β βββ src/
β βββ app/ β Next.js App Router pages
β β βββ layout.tsx β root layout; wraps with QueryClientProvider + AuthProvider
β β βββ (auth)/
β β β βββ login/page.tsx
β β β βββ register/page.tsx
β β βββ dashboard/page.tsx β project grid; lists all user projects
β β βββ projects/[projectId]/
β β βββ page.tsx β project overview: dataset list, pipeline list, recent training runs
β β βββ datasets/
β β β βββ upload/page.tsx β file upload form
β β β βββ [datasetId]/page.tsx β dataset workspace: 6 tabs (Profile, EDA, Clean, Train, Data Preview, Pipeline)
β β βββ pipelines/
β β β βββ [pipelineId]/page.tsx β React Flow canvas
β β βββ training/
β β βββ page.tsx β training run list + start form
β β βββ [runId]/page.tsx β run detail: metrics, feature importance chart, AI summary, download
β β
β βββ components/
β β βββ layout/
β β β βββ AppShell.tsx β top nav + side nav wrapper
β β β βββ TopNav.tsx
β β β βββ SideNav.tsx
β β βββ dataset/
β β β βββ DatasetUploadCard.tsx
β β β βββ PreviewTable.tsx
β β β βββ ProfileSummaryPanel.tsx
β β β βββ CleaningSuggestionList.tsx
β β β βββ CleaningCommandBox.tsx β natural-language cleaning input
β β βββ ai/
β β β βββ AIInsightCard.tsx
β β β βββ AIAssistantSidebar.tsx
β β β βββ ConfidenceBadge.tsx
β β βββ eda/
β β β βββ ChartCard.tsx
β β β βββ CorrelationMatrix.tsx
β β β βββ MissingHeatmap.tsx
β β βββ pipeline/
β β β βββ PipelineCanvas.tsx β React Flow wrapper
β β β βββ NodePalette.tsx
β β β βββ NodeInspector.tsx
β β βββ training/
β β β βββ MetricsCard.tsx β grid of metric values with color coding
β β β βββ FeatureImportanceChart.tsx β horizontal Recharts bar chart
β β β βββ RunComparisonTable.tsx β side-by-side metrics for multiple runs
β β βββ shared/
β β βββ JobStatusBadge.tsx β queued/running/succeeded/failed badge
β β βββ ErrorBanner.tsx β dismissible red error banner
β β
β βββ lib/
β βββ api/
β β βββ client.ts β single axios instance; attaches Bearer token from localStorage; base URL from NEXT_PUBLIC_API_URL
β β βββ auth.ts β authApi: login(), register(), me()
β β βββ projects.ts β projectsApi: list(), get(), create(), update(), delete()
β β βββ datasets.ts β datasetsApi: upload(), list(), get(), preview(), profile(), versions()
β β βββ ai.ts β aiApi: analyze(), getInsights()
β β βββ eda.ts β edaApi: get()
β β βββ cleaning.ts β cleaningApi: propose(), apply(), listActions()
β β βββ pipeline.ts β pipelineApi: create(), get(), save(), validate(), execute()
β β βββ training.ts β trainingApi: start(), get(), listForProject(), download(), compare(), getSummary()
β βββ hooks/
β β βββ useAuth.ts
β β βββ useProjects.ts
β β βββ useDatasets.ts
β β βββ useJobPoller.ts β polls GET /jobs/{id} every 2s while status is queued/running
β β βββ useAI.ts
β β βββ useEDA.ts
β β βββ useCleaning.ts
β β βββ usePipeline.ts
β β βββ useTraining.ts β useTrainingRun polls every 3s while queued/running
β βββ store/
β βββ authStore.ts β Zustand: token + user stored in localStorage; hydrated on mount
β
βββ docs/
βββ design/ β original design documents
β βββ spec_doc.md β product requirements and user stories
β βββ system_design.md β architecture decisions
β βββ database_design.md β full schema with all fields, indexes, constraints
β βββ api-spec.md β REST API contract
β βββ ai_orchestration.md β AI agent roles and prompting strategy
β βββ frontend_architecture.md β component hierarchy and UX rules
β βββ implementation_plan.md β phased build plan
βββ superpowers/
βββ plans/ β task-level implementation plans per phase
βββ specs/ β phase design specs
Base URL: http://localhost:8000/api/v1
All protected endpoints require: Authorization: Bearer <token>
Response envelope:
{ "success": true, "data": { ... } }Error response:
{ "success": false, "detail": "Error message here" }Async operations return immediately with a job_id. Poll GET /jobs/{jobId} until status is succeeded or failed.
| Method | Path | Body | Description |
|---|---|---|---|
POST |
/auth/register |
{email, password} |
Create account. Returns {token, user} |
POST |
/auth/login |
{email, password} |
Login. Returns {token, user} |
GET |
/auth/me |
β | Get current user |
| Method | Path | Description |
|---|---|---|
POST |
/projects |
Create project |
GET |
/projects |
List all user projects |
GET |
/projects/{id} |
Get project |
PATCH |
/projects/{id} |
Update name/description |
DELETE |
/projects/{id} |
Delete project |
| Method | Path | Description |
|---|---|---|
POST |
/datasets/upload |
Upload file (multipart). Body: project_id + file. Returns {dataset_id, job_id}. |
GET |
/projects/{id}/datasets |
List datasets for project |
GET |
/datasets/{id} |
Get dataset metadata |
GET |
/datasets/{id}/versions |
List all versions (v0 = raw, v1+ = after cleaning) |
GET |
/datasets/{id}/preview |
First 100 rows of latest version as JSON |
GET |
/datasets/{id}/profile |
Profiling results (column stats) |
| Method | Path | Description |
|---|---|---|
POST |
/ai/datasets/{id}/analyze |
Trigger AI analysis. Returns {job_id}. |
GET |
/ai/datasets/{id}/insights |
Get analysis results (task type, target column, cleaning suggestions, model recommendations) |
| Method | Path | Description |
|---|---|---|
POST |
/eda/datasets/{id}/compute |
Trigger EDA computation. Returns {job_id}. |
GET |
/eda/datasets/{id} |
Get chart data (distributions, correlation matrix, missing heatmap) |
| Method | Path | Description |
|---|---|---|
POST |
/cleaning/datasets/{id}/propose |
Propose a cleaning action (preview only, no data change). Body: {action_type, parameters} |
POST |
/cleaning/actions/{id}/apply |
Apply an approved action. Creates new DatasetVersion. Returns {job_id}. |
GET |
/cleaning/datasets/{id}/actions |
List all cleaning actions and their status |
| Method | Path | Description |
|---|---|---|
POST |
/projects/{id}/pipelines |
Create pipeline |
GET |
/projects/{id}/pipelines |
List pipelines |
GET |
/pipelines/{id} |
Get pipeline with nodes and edges |
PUT |
/pipelines/{id} |
Save pipeline (nodes + edges) |
POST |
/pipelines/{id}/validate |
Validate DAG (checks for cycles, disconnected nodes, missing required ports) |
POST |
/pipelines/{id}/execute |
Execute pipeline. Returns {job_id}. |
| Method | Path | Description |
|---|---|---|
POST |
/training/start |
Start training. Body: {dataset_version_id, model_type, target_column, task_type}. Validates target column exists before queuing. Returns {training_run_id, job_id}. |
GET |
/projects/{id}/training/runs |
List all training runs for a project |
GET |
/training/runs/{id} |
Get run with embedded metrics |
GET |
/training/runs/{id}/metrics |
Get all metric records |
GET |
/training/runs/{id}/feature-importance |
Get feature importance list (sorted descending) |
GET |
/training/runs/{id}/summary |
Get AI experiment summary (calls OpenAI) |
GET |
/training/runs/{id}/download |
Get presigned download URL for trained model .joblib file (5-minute TTL) |
POST |
/training/compare |
Compare multiple runs. Body: {run_ids: [...]} (2β5 runs). |
| Method | Path | Description |
|---|---|---|
GET |
/jobs |
List all jobs for current user |
GET |
/jobs/{id} |
Get job status: queued, running, succeeded, failed |
Full interactive docs at http://localhost:8000/docs
5 migrations, 15 tables total.
users
βββ projects
βββ datasets
β βββ dataset_versions β v0 = raw upload; v1+ = post-cleaning
β βββ dataset_profiles β async profiling results
β β βββ dataset_column_profiles β per-column stats
β βββ cleaning_actions β proposed/approved/applied/rejected
β β βββ cleaning_executions
β βββ (referenced by training_runs)
βββ pipelines
β βββ pipeline_nodes
β βββ pipeline_edges
βββ training_runs β one per model training job
β βββ training_metrics β one row per metric (accuracy, f1, rmse, etc.)
βββ artifacts β model .joblib files stored in MinIO
βββ jobs β tracks all async operations
βββ ai_insights β stores OpenAI analysis results
JSONB columns used for: profiling summaries, column profile distributions, AI metadata, cleaning parameters, pipeline node configs, model hyperparameters, feature importance lists.
# Check what's wrong
docker compose ps
docker compose logs postgres
docker compose logs redis
docker compose logs minioPort conflicts: If 5432, 6379, 9000, 8000, or 3000 are in use on your machine, stop whatever is using them or edit the port mappings in docker-compose.yml.
The backend tries to create the bucket at startup but may fail if MinIO isn't ready yet. Run:
make create-bucketThen restart the backend:
docker compose restart backend workerCheck that OPENAI_API_KEY is set correctly in .env:
grep OPENAI_API_KEY .envIn Docker, the compose file reads this from the host shell environment. Verify it reached the container:
docker compose exec backend env | grep OPENAIIf empty, restart after setting the key:
docker compose up -d backend workerCheck the worker logs:
docker compose logs workerCommon causes:
- Target column name typo β the backend now validates this before queuing, but old runs may have failed silently
- Dataset format issue β open the dataset workspace and check the preview tab
- MinIO connectivity β verify
make create-bucketsucceeded
This happens when MINIO_PUBLIC_ENDPOINT is not set. The presigned URL uses the internal Docker hostname minio:9000 which the browser can't reach.
Verify .env has:
MINIO_PUBLIC_ENDPOINT=localhost:9000
Then restart:
docker compose restart backendCheck NEXT_PUBLIC_API_URL in .env:
NEXT_PUBLIC_API_URL=http://localhost:8000/api/v1
Verify the backend is running:
curl http://localhost:8000/health
# Expected: {"status": "ok"}If migrations fail (e.g., table already exists):
make shell-backend
alembic current # see current revision
alembic history # see all revisions
alembic upgrade head # retryTo reset the database completely (destroys all data):
docker compose down -v # removes volumes
docker compose up -d postgres redis minio
make migrate
make create-bucket| Phase | Status | Contents |
|---|---|---|
| Phase 1 | β Complete | Auth, project management, dataset upload, async profiling, dataset workspace |
| Phase 2 | β Complete | AI analysis (OpenAI gpt-4o-mini), EDA charts, AI sidebar |
| Phase 3A | β Complete | Cleaning engine (9 transforms), NL command interface, preview/confirm/apply |
| Phase 3B | β Complete | Pipeline builder (React Flow canvas, 8 node types, DAG validation) |
| Phase 4 | β Complete | Model training (6 model types), metrics dashboard, feature importance, AI experiment summary |
| Phase 5 | β Complete | Model download (presigned URL), input validation, frontend error UX |
- No SHAP explainability β feature importance (from
feature_importances_/coef_) is available; SHAP requires a separate worker pass - No hyperparameter tuning UI β sensible defaults are used for all model types
- No cleaned dataset export β only the trained model artifact can be downloaded
- Single train/test split β 80/20, no cross-validation
- No rate limiting β not needed at local/demo scale
- No audit log β job history is available but not a dedicated audit trail
- CORS locked to localhost:3000 β change
allow_originsinmain.pyfor other origins