Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 

Repository files navigation

Instant Deploy

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.


Stack & Technology


Key Features

  1. Google OAuth: Authenticated workspace protection where users can only view their own projects and deployments.
  2. Kubernetes Workload Deployments: Automatic generation and orchestration of Kubernetes Deployment and Service (ClusterIP) resources matching pod scales.
  3. Live DevOps Console: Logs streamed from active pods inside the Kubernetes cluster with log text-filtering, pausing, and auto-scroll control.
  4. Replicas Dynamic Scale:snappy scaling of pod workloads updating live replicas in the Kubernetes deployment manifest.
  5. 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.

Getting Started

Prerequisites


Step 1: Environment Variables Setup

Copy the env template file and create a .env configuration file:

cp .env.example .env

Configure the credentials inside .env:

  • Generate a NextAuth secret: openssl rand -base64 32 and place it in AUTH_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

Step 2: Spin up PostgreSQL Database

Use Docker Compose to run a local PostgreSQL instance:

docker-compose up -d db

This spins up a database container mapped to port 5432 with credentials matching the default DATABASE_URL in .env.


Step 3: Run Database Migrations

Apply the Prisma schema models to your PostgreSQL database:

npx prisma db push

This creates the users, accounts, sessions, projects, and deployments tables in the database.


Step 4: Run Development Server

Start the local Next.js development server:

npm run dev

Open http://localhost:3000 in your browser.


Running with Docker

To build and orchestrate both PostgreSQL and the compiled Next.js standalone application inside Docker Compose, run:

docker-compose up --build

Access the application at http://localhost:3000.


Project Structure

β”œβ”€β”€ 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

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors