Instant Deploy is a dark-theme, developer-first Platform-as-a-Service (PaaS) similar to Render or Railway. It allows users to authenticate with Google, create projects, and deploy public Docker images (e.g. nginx:latest, redis:latest) to a local or remote Kubernetes cluster.
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Styles: Tailwind CSS v4 + shadcn/ui
- Database: PostgreSQL + Prisma Client
- Authentication: NextAuth.js (v5 / Auth.js)
- State Management: TanStack Query v5 (React Query)
- Container Engine: @kubernetes/client-node
- Google OAuth: Authenticated workspace protection where users can only view their own projects and deployments.
- Kubernetes Workload Deployments: Automatic generation and orchestration of Kubernetes
DeploymentandService(ClusterIP) resources matching pod scales. - Live DevOps Console: Logs streamed from active pods inside the Kubernetes cluster with log text-filtering, pausing, and auto-scroll control.
- Replicas Dynamic Scale:snappy scaling of pod workloads updating live replicas in the Kubernetes deployment manifest.
- Robust Mock Mode: Fallback simulation that enables full UX testing (including fake pods, scaling status changes, and simulated image logs) when a Kubernetes cluster is not active.
- Node.js v18+
- Docker & Docker Compose
- A running Kubernetes Cluster (e.g., Docker Desktop, Minikube, k3d, k3s) [Optional - Mock mode active by default if config is absent]
Copy the env template file and create a .env configuration file:
cp .env.example .envConfigure the credentials inside .env:
- Generate a NextAuth secret:
openssl rand -base64 32and place it inAUTH_SECRET. - Retrieve Google Client ID and Google Client Secret from Google Cloud Developer Console. Set the Authorized Redirect URI to:
http://localhost:3000/api/auth/callback/google
Use Docker Compose to run a local PostgreSQL instance:
docker-compose up -d dbThis spins up a database container mapped to port 5432 with credentials matching the default DATABASE_URL in .env.
Apply the Prisma schema models to your PostgreSQL database:
npx prisma db pushThis creates the users, accounts, sessions, projects, and deployments tables in the database.
Start the local Next.js development server:
npm run devOpen http://localhost:3000 in your browser.
To build and orchestrate both PostgreSQL and the compiled Next.js standalone application inside Docker Compose, run:
docker-compose up --buildAccess the application at http://localhost:3000.
βββ prisma/
β βββ schema.prisma # Prisma Database Schemas (User, Project, Deployment)
βββ src/
β βββ app/
β β βββ api/
β β β βββ auth/ # Auth.js Wildcard API handlers
β β β βββ projects/ # Projects and Deployments CRUD API Routes
β β β βββ ...
β β βββ dashboard/ # DevOps PaaS aggregate metrics
β β βββ projects/ # Project Detail, Deployment scale, and logs console
β β βββ layout.tsx # Standard Dark-theme wrappers
β β βββ providers.tsx # TanStack Query & NextAuth Session providers
β β βββ page.tsx # Login landing screen
β βββ components/
β β βββ ui/ # shadcn components (Table, Dialog, Card, Badges)
β β βββ Navbar.tsx # Nav menu & avatar dropdowns
β βββ lib/
β β βββ auth.ts # Auth.js Provider configurations
β β βββ k8s.ts # Kubernetes Node Client orchestration Layer
β β βββ prisma.ts # Database client singleton instance
β β βββ validation.ts # Zod payload validation rules