Skip to content

23blocks-OS/TheLandingPage-SaaS

Repository files navigation

23Blocks Deployment Platform

An open-source, self-hostable deployment platform for static sites - like Netlify or Vercel, but you control the infrastructure.

πŸš€ Features

  • Upload & Deploy: Upload your dist folder and get instant hosting
  • Custom Subdomains: Each deployment gets a unique URL (e.g., user1.app1.23blocks.net)
  • S3 + CloudFront: Fast, reliable hosting with CDN
  • Self-Hostable: Bring your own AWS keys and run it yourself
  • Open Source: Free for everyone to use and modify
  • CLI Tool: Simple publish command to deploy from terminal
  • Web Dashboard: Manage all your deployments in one place

πŸ“¦ What's Inside

This monorepo includes:

  • apps/deployment-platform - Next.js web dashboard for users
  • apps/admin-dashboard - Admin dashboard for platform management
  • packages/deploy-cli - CLI tool for publishing sites
  • infrastructure/terraform - AWS infrastructure as code

πŸ—οΈ Architecture

User uploads dist folder
    ↓
Next.js API receives files
    ↓
Creates S3 bucket (or uses existing)
    ↓
Uploads files to S3
    ↓
CloudFront CDN serves files
    ↓
User accesses site at subdomain

πŸ› οΈ Tech Stack

  • Frontend: Next.js 14, React, Tailwind CSS
  • Backend: Next.js API Routes, Prisma ORM
  • Infrastructure: AWS (S3, CloudFront, Route53, Lambda)
  • IaC: Terraform
  • Database: PostgreSQL (configurable)
  • Storage: AWS S3

πŸ“‹ Prerequisites

  • Node.js 18+
  • pnpm 9+
  • AWS Account (for self-hosting)
  • PostgreSQL database
  • Domain name for hosting

πŸš€ Quick Start

1. Clone and Install

git clone https://github.com/23blocks-OS/TheLandingPage-SaaS.git
cd TheLandingPage-SaaS
pnpm install

2. Set Up Infrastructure

cd infrastructure/terraform
cp terraform.tfvars.example terraform.tfvars
# Edit terraform.tfvars with your AWS credentials and domain

terraform init
terraform plan
terraform apply

3. Configure Environment

cd apps/deployment-platform
cp .env.example .env.local
# Edit .env.local with your database and AWS credentials

4. Run Database Migrations

cd apps/deployment-platform
pnpm prisma migrate dev

5. Start Development

# From root directory
pnpm dev

Visit http://localhost:3000 to see the dashboard.

πŸ›‘οΈ Admin Dashboard

The admin dashboard provides a comprehensive interface for platform management:

Features

  • User Management: View, search, and manage all users
  • Deployment Monitoring: Track all deployments across the platform
  • Job Queue: Trigger and monitor background jobs
  • System Metrics: Monitor AWS usage, database health, and platform performance
  • Audit Logging: Complete audit trail of all admin actions

Setup

# Navigate to admin dashboard
cd apps/admin-dashboard

# Create first admin user
npx tsx scripts/create-admin.ts

# Start admin dashboard (runs on port 3001)
pnpm dev

Visit http://localhost:3001 to access the admin dashboard.

For detailed documentation, see apps/admin-dashboard/README.md

πŸ“€ Publishing a Site

Using the CLI

# Install CLI globally
pnpm install -g @23blocks/deploy-cli

# Login
23blocks-deploy login

# Publish your site
cd your-project/dist
23blocks-deploy publish

Using the Web Dashboard

  1. Login to your dashboard
  2. Click "New Deployment"
  3. Upload your dist folder
  4. Get your live URL!

πŸ”§ Configuration

Environment Variables

See apps/deployment-platform/.env.example for all required environment variables.

AWS Permissions

The platform requires the following AWS permissions:

  • S3: Full access for bucket creation and file uploads
  • CloudFront: Create and manage distributions
  • Route53: Manage DNS records for subdomains
  • Lambda: (Optional) For edge functions

🎯 Use Cases

  • Dev Agencies: Host client sites on your own infrastructure
  • Solo Developers: Deploy personal projects without vendor lock-in
  • Startups: Build your own hosting platform
  • Enterprise: Full control over deployment infrastructure

πŸ“– Documentation

🀝 Contributing

Contributions are welcome! Please read our contributing guidelines.

πŸ“„ License

MIT License - see LICENSE file for details

πŸ™ Acknowledgments

Inspired by Netlify and Vercel, built for the open-source community.

πŸ’¬ Support

  • GitHub Issues: For bugs and feature requests
  • Discussions: For questions and community support

Built with ❀️ by 23Blocks

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors