Skip to content
Arsh-PathanPublic

About

CodeHost is a minimalist, beginner-friendly Cloud Hosting (PaaS) platform designed for students and developers who want to deploy their code online without touching a terminal.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

CodeHost Logo

CodeHost

Next-Generation Cloud Platform & PaaS Built for Developers & Students
Deploy any repository, template, or Dockerfile in seconds with zero configuration and zero surprise bills.

Live Platform Discord License Node.js Next.js Docker


⚑ Overview

CodeHost is a minimalist, developer-first Platform as a Service (PaaS) engineered to remove cloud complexity. Built on high-performance container virtualization, automated SSL edge routing, and a zero-surprise prepaid credit model, CodeHost lets you launch web applications, APIs, worker services, and databases in under 30 seconds without ever touching an SSH terminal.


πŸš€ Key Features

1. 1-Click Starter Template Marketplace

Skip project boilerplate completely. Launch pre-configured, production-ready fullstack apps and APIs in one click:

  • Next.js 15 Fullstack: App router, Tailwind CSS, TypeScript, and Docker containerization.
  • FastAPI AI Server: Python 3.11, Pydantic v2, CORS, and Swagger UI.
  • Express TypeScript Microservice: Production health checks, structured logging, and JSON body parsing.
  • Django REST Framework: PostgreSQL-ready, migrations pre-wired, and admin dashboard.
  • Go Fiber High-Performance API: Ultra-fast routing and sub-millisecond responses.
  • Flask Python Lightweight App: Minimalistic WSGI application sandbox.

2. Universal Git & Zip Deployment

  • Git Push to Deploy: Connect any public or private GitHub repository with branch and subdirectory support.
  • Drag-and-Drop Zip Uploads: Deploy single or multi-file archives directly from your browser.
  • Automatic Framework Detection: Zero-Dockerfile detection for 20+ stacks (Next.js, Node.js, Python, Go, Rust, PHP, Bun, Deno, .NET, Ruby, and custom Dockerfiles).

3. Scale-to-Zero Engine & Idle Sleep

  • Inactive containers automatically hibernate after periods of zero HTTP traffic to preserve your credits.
  • Instant cold-start wakeups in < 800ms when a new request hits your subdomain.

4. Managed 1-Click Databases

  • Deploy isolated PostgreSQL, MySQL, Redis, and MongoDB instances alongside your application.
  • Instant internal DNS connections (postgres://user:pass@internal-db:5432/app) with automated volume persistence.

5. Automated Custom Domains & Free SSL

  • Every project receives a free https://your-app.code-host.online subdomain with automatic Let's Encrypt TLS encryption.
  • Connect your own custom apex domains or subdomains with CNAME verification.

6. Transparent Prepaid Billing & Hackathon Pass

  • Zero Surprise Bills: No automatic card recurring charges. 1 Credit = β‚Ή1.60 ($0.02). Buy preset bundles or any custom amount from β‚Ή16.
  • Free Tier Forever: 1 active project at 128MB RAM, 0.5 CPU, 1GB NVMe, and free SSL for β‚Ή0.
  • Weekend Hackathon Pass: β‚Ή49 for 72 hours of dedicated Pro compute (2 vCPUs, 2GB RAM, 5GB NVMe, priority build sandboxes) for hackathons and demos.

7. Full-Featured Email Notification Suite

Automated branded email notifications via SMTP:

  • Payment receipts and credit top-up invoices.
  • Container status alerts (Running, Stopped, Failed, Building).
  • Low credit warnings before containers auto-hibernate.
  • Weekend Hackathon Pass activation and expiry reminders.
  • Account verification and onboarding walkthroughs.

πŸ›οΈ System Architecture

                                  [ User Traffic ]
                                         β”‚
                                         β–Ό
                      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                      β”‚          Nginx Reverse Proxy         β”‚
                      β”‚  - Automatic Let's Encrypt TLS       β”‚
                      β”‚  - Subdomain & Custom Domain Routing β”‚
                      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                         β”‚
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β–Ό                                               β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚     Frontend Web Client      β”‚                β”‚       Control Plane API      β”‚
  β”‚  - Next.js 16 + Turbopack    β”‚                β”‚  - Express + TypeScript      β”‚
  β”‚  - Tailwind CSS + GSAP       │◄──WebSocket───►│  - JWT + OAuth (Google/GH)   β”‚
  β”‚  - Razorpay Checkout.js      β”‚                β”‚  - PostgreSQL (Prisma ORM)   β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                β”‚  - Nodemailer SMTP Service   β”‚
                                                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                                 β”‚
                                                                 β–Ό
                                                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                                  β”‚       Execution Engine       β”‚
                                                  β”‚  - Docker Engine Isolation   β”‚
                                                  β”‚  - BuildKit Multi-Stage      β”‚
                                                  β”‚  - Cgroup RAM/CPU Quotas     β”‚
                                                  β”‚  - Real-time Log Streaming   β”‚
                                                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Tech Stack

Layer Technologies
Frontend Next.js 16 (App Router), TypeScript, Tailwind CSS, Lucide Icons, GSAP, Canvas Confetti
Backend Express.js, TypeScript, Socket.IO, Nodemailer, Razorpay SDK
Database & Cache PostgreSQL 15, Prisma ORM, Redis 7
Infrastructure Docker Engine, Docker Compose, Nginx Reverse Proxy, Ubuntu Linux VPS
Payments Razorpay (UPI, Google Pay, PhonePe, Debit/Credit Cards, NetBanking)

πŸ’³ Pricing & Resource Tiers

Tier Price / Month Credits RAM vCPU NVMe Storage Projects
Free β‚Ή0 (Forever) 0 128 MB 0.5 1 GB 1
Basic β‚Ή80 50 256 MB 1.0 2 GB 3
Pro β‚Ή240 150 512 MB 2.0 5 GB 5
Business β‚Ή640 400 1.0 GB 4.0 10 GB 10
Hackathon Pass β‚Ή49 (72h) β€” 2.0 GB 2.0 5 GB 1

Note: Custom credit amounts can be purchased anytime starting at β‚Ή16 (10 credits).


⚑ Quickstart (Self-Hosting & Local Development)

1. Prerequisites

  • Docker Engine & Docker Compose (v24+)
  • Node.js 20+ and npm or pnpm
  • Git

2. Clone the Repository

git clone https://github.com/Arsh-Pathan/CodeHost.git
cd CodeHost

3. Environment Configuration

Copy the sample environment file in infra/:

cd infra
cp .env.example .env

Configure the necessary variables:

# Database
DATABASE_URL="postgresql://codehost:codehost_secret@db:5432/codehost?schema=public"

# Authentication & Application
JWT_SECRET="your-super-secure-jwt-secret"
APP_URL="http://localhost:3000"
API_URL="http://localhost:4000"

# Payments (Razorpay)
RAZORPAY_KEY_ID="rzp_test_..."
RAZORPAY_KEY_SECRET="your_razorpay_secret"

# Email Delivery (SMTP)
SMTP_HOST="smtp.gmail.com"
SMTP_PORT=587
SMTP_USER="your-email@gmail.com"
SMTP_PASS="your-app-password"

4. Boot the Infrastructure

# Create shared internal bridge network
docker network create codehost_internal

# Launch containers
docker compose up -d

5. Apply Database Schema

docker exec -it codehost-api npx prisma migrate deploy --schema=./database/prisma/schema.prisma

πŸ“ Repository Structure

CodeHost/
β”œβ”€β”€ backend/                  # Express TypeScript API server
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ lib/              # Email templates and utility helpers
β”‚   β”‚   β”œβ”€β”€ routes/           # Auth, Projects, Deployments, Billing, Admin
β”‚   β”‚   └── services/         # Docker runner, buildpack detection, Razorpay
β”œβ”€β”€ frontend/                 # Next.js 16 Web Application
β”‚   β”œβ”€β”€ public/               # Static assets and brand logos
β”‚   └── src/
β”‚       β”œβ”€β”€ app/              # App router pages (Landing, Dashboard, Billing, Docs)
β”‚       └── components/       # Panel layouts, navbar, and terminal consoles
β”œβ”€β”€ packages/                 # Shared monorepo packages
β”‚   β”œβ”€β”€ config/               # Shared environment schemas and tier definitions
β”‚   β”œβ”€β”€ database/             # Prisma schema and client exports
β”‚   β”œβ”€β”€ docker/               # Dockerode singleton configuration
β”‚   └── logger/               # Pino structured logging
β”œβ”€β”€ infra/                    # Docker Compose files, Nginx proxy, and SSL configs
└── README.md                 # Project documentation

πŸ›‘οΈ Security & Container Isolation

  • Sandboxed Execution: Every project runs in an unprivileged, isolated Docker container with strict memory limits and CPU constraints.
  • Resource Clamping: Built-in OOM (Out Of Memory) protection and process limits prevent noisy-neighbor attacks.
  • Safe Networking: Containers communicate strictly through isolated Docker bridges with no access to the host host-level network.

🀝 Contributing

Contributions, feature suggestions, and bug reports are warmly welcome!

  1. Fork the Project.
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature).
  3. Commit your Changes (git commit -m 'feat: Add AmazingFeature').
  4. Push to the Branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

πŸ“„ License

Distributed under the MIT License. See LICENSE for more information.

Developed with ❀️ by Arsh Pathan and the CodeHost Community.

About

CodeHost is a minimalist, beginner-friendly Cloud Hosting (PaaS) platform designed for students and developers who want to deploy their code online without touching a terminal.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Contributors

Languages