Skip to content

Repository files navigation

Truss

Build ML models without writing a single line of code.

truss.runSelf-hostContributing

LicensePythonFastAPIReact


Truss is an open-source, no-code machine learning platform. Upload a CSV, clean your data, train a model, and export the results without touching a line of Python. It runs as a hosted service at truss.run and can be self-hosted in minutes with Docker Compose.

truss-final

Features

Data preparation

  • Column-level statistics and type inference on upload
  • Missing value imputation: mean, median, mode, custom per-column, or drop
  • Outlier handling: IQR and z-score methods with clip or drop actions
  • Row filtering with string, numeric, and boolean operators
  • Feature engineering: arithmetic expressions across columns
  • Feature selection with correlation-based ranking

Encoding and scaling

  • Label, one-hot, and ordinal encoding with per-column overrides
  • Standard, min-max, and robust scaling with per-column overrides
  • Interactive correlation matrix

Training and evaluation

  • Algorithms: Linear Regression, Logistic Regression, Random Forest, XGBoost
  • Tasks: classification and regression, auto-detected from target column
  • Evaluation metrics: accuracy, precision, recall, F1, AUC-ROC, R2, RMSE, MAE
  • k-fold and stratified cross-validation
  • Grid-search hyperparameter optimization

Export

  • Download trained model as a .pkl file
  • Export predictions as a .csv file
  • Batch prediction on new datasets
  • Full pipeline history with replay

Two workflow modes

  • Guided mode steps you through each stage in order: upload, analyze, clean, encode, scale, train, evaluate, export.
  • Freestyle mode gives you a side-panel interface where you can run any step in any order, jump back, and experiment freely.

Tech stack

LayerTechnology
BackendPython 3.11, FastAPI, SQLAlchemy 2 (async), PostgreSQL
MLscikit-learn, XGBoost, pandas, NumPy, joblib
CacheRedis (Upstash in production, local in Docker)
AuthSupabase JWT (production) or local HS256 (self-hosted)
StorageSupabase Storage (production) or local filesystem (self-hosted)
FrontendReact 18, TypeScript, Vite, Tailwind CSS, Framer Motion
DeploymentRender (backend), Vercel (frontend), Docker Compose (self-hosted)

Getting started

Hosted

Go to truss.run and create a free account. No setup required.

Self-hosted with Docker Compose

Prerequisites: Docker and Docker Compose installed.

git clone https://github.com/PracticalMind/truss.git
cd truss

Generate a JWT secret:

python -c "import secrets; print(secrets.token_hex(32))"

Open docker-compose.yml and set LOCAL_JWT_SECRET to the value above, then start the stack:

docker compose up --build

The app will be available at http://localhost and the API at http://localhost:8000.

Local development

Backend

cd backend
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e .
cp .env.example .env
# Edit .env with your values, then:
uvicorn app.main:app --reload

Frontend

cd frontend
npm install
cp .env.example .env # set VITE_API_BASE_URL=http://localhost:8000/api
npm run dev

Configuration

All backend configuration is done through environment variables (or a .env file). See backend/.env.example for the full list.

VariableDefaultDescription
DATABASE_URLrequiredPostgreSQL connection string
AUTH_PROVIDERsupabasesupabase or local
STORAGE_PROVIDERsupabasesupabase or local
LOCAL_JWT_SECRETrequired in local modeSecret for signing JWTs. Min 32 chars, not the default value.
LOCAL_STORAGE_PATH./data/uploadsPath for local file storage
REDIS_URLoptionalRedis connection string. Caching is skipped if blank.
BACKEND_CORS_ORIGINSrequiredComma-separated list of allowed origins
SUPABASE_URLrequired in supabase modeYour Supabase project URL
SUPABASE_JWT_SECRETrequired in supabase modeSupabase JWT secret
SUPABASE_SERVICE_ROLE_KEYrequired in supabase modeSupabase service role key
SUPABASE_STORAGE_BUCKETrequired in supabase modeStorage bucket name

Frontend variables (prefix VITE_) are baked in at build time:

VariableDescription
VITE_AUTH_PROVIDERsupabase or local, must match backend
VITE_API_BASE_URLBase URL for the backend API
VITE_SUPABASE_URLSupabase project URL (supabase mode only)
VITE_SUPABASE_ANON_KEYSupabase anon key (supabase mode only)

Project structure

truss/
backend/
app/
api/routes/ # FastAPI route handlers
core/ # Config, auth, Redis, storage, rate limiting
schemas/ # Pydantic request/response models
services/ # Database models and ML pipeline logic
frontend/
src/
pages/ # Step-by-step guided mode pages
freestyle/ # Freestyle mode layout and panels
contexts/ # Auth context
components/ # Shared UI components
docker-compose.yml

Contributing

Contributions are welcome. Please read CONTRIBUTING.md before opening a pull request.

License

MIT License. See LICENSE for details.

About

No-code ML pipeline builder. Upload a CSV, clean your data, train and export a model in minutes. Live at truss.run.

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages