How varadpatil07/mechmodel works
MLPlatform is a full-stack ML SaaS: users manage datasets, explore them, train and evaluate models, then register models for predictions and reports. Its frontend reaches a FastAPI API; training is dispatched asynchronously to Celery. The README documents the broader product capabilities, while sampled source confirms the application entry point, training task flow, preprocessing, inference, and natural-language query orchestration. Some endpoint internals and integrations are unsampled, so uncertain wiring is omitted.
Main entry points: router.py API router · session.py PostgreSQL · training_tasks.py Training task · engine.py Query engine
Components 33
User interface
- Next.js app
frontend/src/app - API client
frontend/src/lib/api.ts - Auth state
frontend/src/stores/authStore.ts
Platform API
- FastAPI app
backend/app/main.py - API router
backend/app/api/v1/router.py - Authentication
backend/app/api/v1/endpoints/auth.py - Projects
backend/app/api/v1/endpoints/projects.py - Dataset management
backend/app/api/v1/endpoints/datasets.py - EDA and reports
backend/app/api/v1/endpoints/eda.py - Training jobs
backend/app/api/v1/endpoints/training.py - Model registry
backend/app/api/v1/endpoints/models.py - Prediction API
backend/app/api/v1/endpoints/predictions.py - Dashboard
backend/app/api/v1/endpoints/dashboard.py - Admin
backend/app/api/v1/endpoints/admin.py
ML lifecycle
- Preprocessing
backend/app/ml/preprocessing/pipeline.py - Model training
backend/app/ml/training/trainer.py - Hyperparameter tuning
backend/app/ml/training/tuning.py - Evaluation metrics
backend/app/ml/evaluation/metrics.py - Explainability
backend/app/ml/explainability/explainer.py - Artifact registry
backend/app/ml/registry/model_registry.py - Inference helpers
backend/app/ml/inference.py
Natural-language query
- Query endpoint
backend/app/api/v1/endpoints/query.py - Query engine
backend/app/nlquery/engine.py - Query providers
backend/app/nlquery/providers - Query executor
backend/app/nlquery/executor.py - Query validator
backend/app/nlquery/validator.py - Query sessions
backend/app/nlquery/session.py
State and workers
- PostgreSQL
backend/app/db/session.py - Celery worker
backend/app/tasks/celery_app.py - Training task
backend/app/tasks/training_tasks.py - Redis broker
Other components
- User
- LLM provider
Connections 44
- User → Next.js app: uses
- Next.js app → API client: requests through
- API client → FastAPI app: HTTP requests
- Authentication → Auth state: JWT state
- FastAPI app → API router: mounts routes
- API router → Authentication: dispatches
- API router → Projects: dispatches
- API router → Dataset management: dispatches
- API router → EDA and reports: dispatches
- API router → Training jobs: dispatches
- API router → Model registry: dispatches
- API router → Prediction API: dispatches
- API router → Dashboard: dispatches
- API router → Admin: dispatches
- Authentication → PostgreSQL: reads/writes
- Projects → PostgreSQL: reads/writes
- Dataset management → PostgreSQL: stores metadata
- EDA and reports → PostgreSQL: reads dataset records
- Training jobs → PostgreSQL: creates job
- Training jobs → Celery worker: dispatches job
- Model registry → PostgreSQL: reads/writes
- Prediction API → PostgreSQL: reads model records
- Dashboard → PostgreSQL: aggregates statistics
- Admin → PostgreSQL: manages records
- Celery worker → Training task: runs task
- Celery worker → Redis broker: uses broker
- Training task → PostgreSQL: updates job/model
- Training task → Preprocessing: builds pipeline
- Training task → Hyperparameter tuning: tunes parameters
- Training task → Model training: fits model
- Training task → Evaluation metrics: evaluates model
- Training task → Explainability: explains model
- Training task → Artifact registry: saves artifacts
- Prediction API → Inference helpers: runs inference
- Model registry → Artifact registry: manages artifacts
- API router → Query endpoint: dispatches
- Query endpoint → PostgreSQL: checks ownership/models
- Query endpoint → Query engine: processes question
- Query engine → Query providers: parses query
- Query providers → LLM provider: requests interpretation
- Query engine → Query validator: validates query
- Query engine → Query executor: executes structured query
- Query engine → Query sessions: reads/writes follow-ups
- Query endpoint → Inference helpers: predicts from model