Enterprise AI Governance and Control Plane
PySetu AI is a production-grade, multi-tenant SaaS platform that governs the full AI request lifecycle across agents, LLMs, MCP servers, and enterprise data sources.
- OpenAI & Gemini Compatible Gateway
- Enterprise LLM Router
- MCP Governance Platform
- AI Security Gateway & Policy Engine
- AI Observability & Audit Platform
- Data Governance & DLP
| Layer | Technologies |
|---|---|
| Frontend | Next.js, React, TypeScript, Tailwind CSS, shadcn/ui, Recharts, Zustand, TanStack Query |
| Backend | Python, FastAPI, SQLAlchemy, PostgreSQL, Redis, Celery, OpenTelemetry |
| Security | JWT, RBAC, ABAC, OPA, Hashicorp Vault |
| Deployment | Docker, Docker Compose, Kubernetes-ready |
- Node.js 20+
- Python 3.12+
- Docker & Docker Compose (optional)
cd frontend
npm install
npm run devcd backend
pip install -r requirements.txt
# Start PostgreSQL (from repo root)
docker compose up postgres -d
# Migrate and seed
python -m alembic upgrade head
python -m app.db.seed
# Run API
uvicorn app.main:app --reload --port 8000API docs: http://localhost:8000/docs
If port 8000 is in use, run uvicorn app.main:app --reload --port 8001 and set NEXT_PUBLIC_API_URL=http://localhost:8001/api/v1 in frontend/.env.local.
macOS external volume users: If this repo lives on a volume under
/Volumes/, always usemakeinstead of rawdocker compose --build. macOS creates hidden._*sidecar files withxattrmetadata that Docker BuildKit cannot read, causingoperation not permittederrors. The Makefile runsdot_cleanautomatically. See.agents/AGENTS.mdfor full details.
# From repo root — clean + build + start all services
make build
# Or with raw docker compose (only on Linux / non-external volumes)
docker compose --env-file .env.docker up --build -d# Common make targets
make build # dot_clean + rebuild all services
make build-backend # dot_clean + rebuild backend only
make migrate # run alembic upgrade head inside container
make ps # show container status
make logs # tail all logs
make restart # full down + clean + rebuild
make down # stop all containers| Service | URL |
|---|---|
| Frontend | http://localhost:3000 |
| Backend API | http://localhost:8001 |
| API Docs | http://localhost:8001/docs |
| Vault (secrets) | http://localhost:8200 |
| Mailhog (email) | http://localhost:8025 |
Sign in with admin@acme.com / demo1234 (tenant: acme).
Backend is mapped to host port 8001 by default to avoid conflicts with other services on 8000. Override via
.env.docker.
Chart path: deploy/helm/pysetu
# Build images (set NEXT_PUBLIC_API_URL to your ingress URL)
docker build -t pysetu/backend:latest ./backend
docker build -t pysetu/frontend:latest \
--build-arg NEXT_PUBLIC_API_URL=http://pysetu.local/api/v1 ./frontend
# Local cluster profile (Minikube / kind)
helm upgrade --install pysetu ./deploy/helm/pysetu \
-f ./deploy/helm/pysetu/values-minikube.yaml \
--namespace pysetu --create-namespace
# Production overrides (example)
helm upgrade --install pysetu ./deploy/helm/pysetu \
--set secrets.jwtSecretKey=<strong-secret> \
--set postgresql.auth.password=<strong-password> \
--set config.opaFailOpen=false \
--set ingress.enabled=true \
--set ingress.host=pysetu.example.comThe chart deploys backend, frontend, Celery worker/beat, PostgreSQL, Redis, OPA (with ABAC Rego policies), optional Ingress, and backend HPA.
Before any non-dev deployment:
- Copy
.env.production.exampleand fill secrets (never commit). - Generate or Vault-bootstrap JWT: docs/security/jwt-secret-rotation.md
- Set
DEBUG=false, confirm Vault AppRole (Vault is on by default in Compose), and use strong database passwords. - Run
./scripts/generate-jwt-secret.shor./scripts/vault-bootstrap-jwt-secret.sh
For isolated environments with no cloud LLM access:
# Build transferable bundle (connected machine)
.\deploy\airgap\bundle.ps1 -Version 0.1.0
# On air-gapped host: extract archive and run .\install.ps1See deploy/airgap/README.md for full instructions. Set AIR_GAP_MODE=true to disable cloud LLM upstreams.
GitHub Actions workflow (.github/workflows/ci.yml):
- Backend: Ruff + pytest
- Frontend: ESLint + production build
- Helm:
helm lint+ template render - Docker: backend/frontend image build smoke test
PySetu AI/
├── frontend/ # Next.js App Router UI
├── backend/ # FastAPI services
├── deploy/
│ ├── airgap/ # Offline bundle scripts (BL-032)
│ ├── helm/pysetu/ # Kubernetes Helm chart (BL-031)
│ └── opa/policies/ # OPA Rego policies (Docker Compose)
├── docs/ # Architecture, planning, progress, ADRs
├── .agents/AGENTS.md # Agent rules — Docker, Alembic, macOS volume gotchas
├── Makefile # Docker helpers (use instead of raw docker compose --build)
├── docker-compose.yml
└── README.md
See /docs for architecture, planning, progress tracking, ADRs, and agent handoffs.
Recent (Aug 15): Compliance UX & config update — tabbed Compliance Center, IaC/data-movement policy modals, Reports preview, Help fixes, Vault default-on.
| Phase | Scope |
|---|---|
| Phase 1 | Foundation, Auth, Multi-Tenancy, Navigation, Dashboard |
| Phase 2 | Policy Studio, LLM Router, MCP Governance |
| Phase 3 | Audit Explorer, Compliance, Security Center |
| Phase 4 | Studio, Reporting, Analytics |
| Phase 5 | Air Gap, Kubernetes, Production Hardening |
Proprietary — PySetu AI