Full-stack pipeline orchestration platform with a React dashboard, FastAPI backend, execution engine, and AI insights.
- Overview
- Current Architecture
- Technology Stack
- Repository Layout
- End-to-End Workflows
- API Surface
- Database and Persistence
- Run Locally
- Deployment Strategy
- Safety & Production Requirements
- Testing & Quality
- Contributing
FlexiRoaster combines:
- Frontend SPA (
src/) for dashboards, pipelines, schedules, logs, alerts, AI insights, and settings. - Backend API (
backend/) using FastAPI for pipeline CRUD, execution lifecycle, metrics, and Airflow callbacks. - Pipeline execution core (
backend/core/) to parse, validate, and execute staged pipelines. - Persistence layer split across:
- SQLAlchemy-backed backend database models (
backend/db/) - Supabase-powered frontend data model (
src/lib/supabase.ts,supabase/migrations/)
- SQLAlchemy-backed backend database models (
- AI features (
backend/ai/) for predictive insights and recommendations.
┌──────────────────────────────────────────────────────────────────┐
│ Frontend (Vite + React) │
│ Pages: Dashboard, Pipelines, Executions, Schedules, AI, Logs │
│ Hooks: usePipelines, useExecutions, useAlerts, useLogs, etc. │
└──────────────────────────────┬───────────────────────────────────┘
│ HTTP / JSON
┌──────────▼──────────┐
│ FastAPI API │
│ /api/v1/* + /health │
└───────┬──────────────┘
│
┌──────────────────┼──────────────────┐
│ │ │
┌────────▼─────────┐ ┌──────▼───────────┐ ┌────▼───────────────────┐
│ Pipeline Routes │ │ Execution Routes │ │ Metrics / Airflow │
│ CRUD + validate │ │ run + monitor │ │ callbacks + telemetry │
└────────┬─────────┘ └──────┬───────────┘ └────┬───────────────────┘
│ │ │
└───────────┬──────┴──────────────┬───┘
│ │
┌───────▼────────┐ ┌──────▼────────────┐
│ Core Engine │ │ DB / CRUD Layer │
│ parse+validate │ │ SQLAlchemy models │
│ execute stages │ │ executions/logs │
└─────────────────┘ └───────────────────┘
- Pipeline Management: Create, update, delete, and validate staged pipelines.
- Execution Management: Trigger, monitor, and inspect run outcomes.
- Scheduling UI: Configure schedule triggers from frontend experience.
- AI Insights: Generate risk, optimization, and anomaly recommendations.
- Observability: Metrics, logs, alerts, and health checks.
- React 19 + TypeScript
- Vite 7 build tooling
- Tailwind CSS styling
- React Router routing
- TanStack Query data fetching/caching
- Zustand local state stores
- Supabase JS frontend data/auth integration
- Recharts dashboard charts
- Lucide React icon set
- FastAPI (REST API)
- Uvicorn (ASGI runtime)
- Pydantic / pydantic-settings (configuration and schema validation)
- SQLAlchemy (ORM models + DB sessions)
- PyYAML (pipeline definition parsing)
- NumPy / Pandas / Scikit-learn (AI feature support)
- Pytest (backend tests)
- Supabase migrations for DB evolution (
supabase/migrations/) - Vercel config for frontend deployment (
vercel.json) - Airflow integration hooks (
backend/api/routes/airflow.py,pipeline/airflow/)
- Data Ingestion: Apache Kafka or Redpanda for streaming; Apache NiFi for ETL flows.
- Data Lake: Amazon S3, Google Cloud Storage, or Azure Blob Storage.
- Data Warehouse: Snowflake, BigQuery, or Amazon Redshift.
- Feature Store (ML): Feast or Tecton.
Flexi-Roaster/
├── src/ # React frontend app
│ ├── pages/ # Route pages (Dashboard, Schedules, etc.)
│ ├── components/ # Shared UI and feature components
│ ├── hooks/ # Data hooks (pipelines, logs, executions...)
│ ├── lib/ # API/Supabase clients and helpers
│ ├── store/ # Zustand stores
│ └── types/ # TS type definitions
├── backend/ # FastAPI backend + core engine
│ ├── api/routes/ # REST route modules
│ ├── core/ # Pipeline engine / executor
│ ├── models/ # Domain models
│ ├── db/ # SQLAlchemy models, CRUD, sessions
│ ├── ai/ # AI predictor + insight logic
│ └── tests/ # Backend tests
├── supabase/ # Supabase functions + SQL migrations
├── pipeline/ # Airflow + sample pipeline integration assets
├── public/ # Static frontend assets
└── README.md # This file
User (UI) -> Frontend Form -> API POST /api/v1/pipelines
-> FastAPI route builds Pipeline + Stages
-> Core validator checks schema/dependencies/cycles
-> Valid pipeline persisted in route storage / DB layer
-> Response returned to UI list/detail views
User clicks Execute
-> Frontend sends execution request
-> Backend creates execution context
-> Core executor resolves stage order and runs stage handlers
-> Logs + status updates emitted during execution
-> Final execution status/duration persisted
-> Frontend refreshes execution status and metrics
User creates schedule (type + expression + pipeline)
-> Schedule stored in frontend state/persistence
-> Next run time computed (cron/interval)
-> User can pause/resume or trigger run-now
-> Schedule card updates last/next run state in UI
Executions table/history
-> Aggregate per-pipeline failure + duration statistics
-> AI predictor generates insights with confidence
-> API returns recommendations + severity + messages
-> Frontend AI pages/widgets render prioritized insights
Airflow DAG callback
-> POST /api/v1/airflow/callback
-> Backend validates callback secret/payload
-> Execution status transitioned (running/success/failure/etc.)
-> Execution logs/context updated
-> Success response returned to orchestrator
GET /healthGET /POST /api/v1/pipelinesGET /api/v1/pipelinesGET /api/v1/pipelines/{pipeline_id}PUT /api/v1/pipelines/{pipeline_id}DELETE /api/v1/pipelines/{pipeline_id}POST /api/v1/executionsGET /api/v1/executionsGET /api/v1/executions/{execution_id}POST /api/v1/executions/{execution_id}/cancelGET /api/v1/metrics/systemGET /api/v1/metrics/pipelines/{pipeline_id}- Airflow integration endpoints under
/api/v1/airflow/*
See
backend/API_TESTING.mdfor concrete request/response examples.
This repo currently demonstrates two persistence planes:
-
Backend SQLAlchemy models (
backend/db/models.py)PipelineDBExecutionDBStageExecutionDBLogDBMetricDB
-
Supabase schema & generated TS types
- SQL migrations in
supabase/migrations/ - Typed frontend contracts in
src/types/database.ts
- SQL migrations in
- Frontend and backend can be run independently for development.
- Production deployments should align on a single source of truth for execution and schedule state.
- Keep schema migrations versioned and backward compatible.
- Node.js 20+
- npm 10+
- Python 3.8+
npm install
npm run devBuild production bundle:
npm run build
npm run previewcd backend
pip install -r requirements.txt
python -m backend.mainor:
uvicorn backend.main:app --reload --host 0.0.0.0 --port 8000- Apply SQL in
supabase/migrations/ - Configure frontend env variables for Supabase URL/key
- See
SUPABASE_SETUP.md
- Frontend: Vite build deployed via Vercel/static hosting.
- Backend: Containerized FastAPI app behind reverse proxy.
- Database: Managed Postgres + backups + migration pipeline.
- Workers/Orchestration: Split execution workers from API for scale.
- Observability: Central logs + metrics dashboards + alerting.
- FastAPI / Flask for custom inference APIs and business logic wrappers.
- TorchServe / TensorFlow Serving for framework-specific model hosting.
- BentoML for multi-framework packaging and serving workflows.
- Docker for packaging API and model-serving runtimes into portable images.
- Kubernetes for scheduling, autoscaling, and production runtime management.
- KServe / Seldon Core for Kubernetes-native model serving, rollout, and monitoring.
dev→staging→production- Promote with immutable build artifacts and schema migration gates.
- Use smoke tests and rollback plans per release.
A complete production safety blueprint is available in:
It includes:
- Confidence threshold policy design
- Human override flow
- Audit log architecture
- Explainability requirements
- Failure recovery strategy
- Architecture/service/API/schema/model/deployment sections
npm run lint
npm run buildcd backend
pytestUse examples in:
backend/API_TESTING.md
- Read CONTRIBUTING.md
- Prefer small, focused PRs
- Include validation steps in your PR description
- Keep docs in sync when adding routes, schemas, or workflows
MIT License.