KaaS is a Kubernetes as a Service platform console built with Next.js, Prisma, Auth.js, and a GitOps-oriented control model. It combines platform administration, cluster lifecycle management, security posture, monitoring, support workflows, and GitOps visibility into a single operator-facing interface.
- Cluster inventory, creation, scaling, deletion, and detail views
- Operator-style cluster detail console with signals, GitOps, security, operations, and debug preview tabs
- Monitoring, security, DORA metrics, support, teams, users, and audit views
- Prisma-backed API routes for clusters, teams, users, audit logs, and internal reconciliation
- GitOps manifest generation and reconciliation helpers for EKS, AKS, and GKE
- Standalone production build support for containerized deployment
- Unit and integration test coverage with Vitest
- Next.js 16 App Router
- React 19
- Material UI 7
- Prisma 7 with PostgreSQL
- Auth.js v5 beta
- SWR for client-side data fetching
- Vitest for tests
src/app: App Router pages and API routessrc/components: dashboard, cluster, layout, and shared UI componentssrc/lib: auth, Prisma, services, GitOps helpers, hooks, data, types, and utilitiesprisma: schema definitionk8s: deployment manifestsdocs/gitops-repo: example GitOps repository structure__tests__: unit and integration tests
npm installdocker compose up -d postgrescp .env.example .envThis repo currently uses prisma db push for local bootstrapping.
npm run db:pushnpm run devOpen http://localhost:3000.
If you want the repo to bootstrap PostgreSQL, install packages, sync Prisma, and start the dev server in one step, use:
npm run dev:localBy default the script runs with --allow-dirty so it works in an active local
development tree. To require a clean git working tree, run the script directly:
./scripts/dev-local.shIf you only want the setup steps without launching the dev server, use:
./scripts/dev-local.sh --allow-dirty --setup-onlyThe script performs these steps in order:
- starts
docker composePostgreSQL - waits for PostgreSQL readiness with
pg_isready - creates
.envfrom.env.exampleif needed - clears stale
.nextoutput - runs
npm install - runs
npm run db:generate - runs
npm run db:push - launches
npm run dev
This project uses Next.js output: "standalone". Do not use next start here.
npm run build
npm run startThe start command copies the built static assets into the standalone output before launching the Node server.
KaaS supports a local development sign-in path through Auth.js credentials.
AUTH_LOCAL_ENABLED="true"enables local dev sign-inNEXT_PUBLIC_AUTH_LOCAL_ENABLED="true"exposes local auth in the UIAUTH_LOCAL_SKIP_DB="true"allows local auth to work even if user rows are not seededAUTH_TRUST_HOST="true"avoids Auth.jsUntrustedHostfailures in local runtime
This is useful because the UI can boot even while you are still wiring database state, but cluster and admin APIs still require PostgreSQL to be reachable.
The primary local variables are defined in .env.example.
Key groups:
- Database:
DATABASE_URL - Auth.js:
NEXTAUTH_URL,NEXTAUTH_SECRET,AUTH_TRUST_HOST - Local dev auth:
AUTH_LOCAL_ENABLED,AUTH_LOCAL_SKIP_DB,AUTH_LOCAL_EMAIL,AUTH_LOCAL_NAME - OAuth providers: GitHub, Google, optional Azure AD placeholders
- GitOps integration:
GITOPS_REPO_OWNER,GITOPS_REPO_NAME,GITOPS_REPO_BRANCH,GITHUB_TOKEN - Internal reconciliation:
INTERNAL_API_TOKEN,KAAS_INTERNAL_URL,CAPI_NAMESPACE
Generate a local Auth.js secret with:
openssl rand -base64 32npm run dev
npm run build
npm run start
npm run lint
npm run type-check
npm test
npm run db:generate
npm run db:push
npm run db:studioRun the full test suite:
npm testRun type checks:
npm run type-checkRun linting:
npm run lintThe GitHub Actions workflow runs:
- lint and type-check
- Prisma client generation
- Vitest tests with PostgreSQL service container
- production build validation
- The app is configured for standalone output in next.config.ts.
- The container entry path is scripts/start-standalone.mjs.
- Example Kubernetes manifests live under k8s.
- Example GitOps structure lives under docs/gitops-repo.
This repository is a strong platform-console prototype with a meaningful API and UI surface area. Some advanced views still use synthesized or mock-backed data in the UI to validate operator workflows before wiring deeper backend integrations.
That is intentional: the information architecture is ahead of the data plumbing in a few areas, especially around cluster-scoped operator insights.