Skip to content

πŸ”§ Secure Supabase Configuration Generator with One-Click VPS Deployment - Generate production-ready configs with cryptographically secure secrets and deploy directly to your VPS with automated SSL setup

License

Notifications You must be signed in to change notification settings

miskaone/supabase-configurator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

48 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”§ Supabase Configuration Generator

Live at: https://SBConfig.com 🌐

A secure, fast web application that generates production-ready Supabase self-hosting configuration files with proper secrets management and Docker Compose setup.

⚑ Features

  • πŸ” Cryptographically secure secret generation
  • 🎫 JWT token creation with proper HMAC-SHA256 signing
  • πŸ“‹ Complete configuration files (.env and docker-compose.yml)
  • πŸš€ One-click VPS deployment with SCP automation to Hostinger
  • 🌍 Global edge deployment on Cloudflare Workers
  • πŸ“± Mobile responsive design with cyberpunk theme
  • ⚑ Lightning fast performance (sub-50ms response times)
  • πŸ”„ Automated CI/CD with GitHub Actions
  • πŸ§ͺ Staging environment for testing
  • πŸ›‘οΈ Complete security setup including firewall and SSL

πŸš€ Quick Start

Visit SBConfig.com to generate your configuration instantly, or use the staging environment at staging.sbconfig.com for testing.

Local Development

# Clone the repository
git clone https://github.com/miskaone/supabase-configurator.git
cd supabase-configurator

# Navigate to workers directory
cd workers

# Install dependencies
npm install

# Start local development server
npm run dev
# Opens at http://localhost:8787

πŸ—οΈ Architecture

Current Production Stack (v1.0)

  • 🌐 Cloudflare Workers - Global edge computing platform
  • πŸ”’ Web Crypto API - Secure cryptographic operations
  • πŸ“¦ Zero dependencies - Self-contained application
  • 🌍 275+ Edge locations - Worldwide distribution

Current Development Stack

  • πŸ“ Vanilla JavaScript - Monolithic Workers script (4,000+ lines)
  • 🎨 Inline CSS - TRON-style cyberpunk theme with particle effects
  • πŸ§ͺ GitHub Actions - Automated testing and deployment
  • πŸ” Lighthouse CI - Performance monitoring

πŸš€ Upcoming Migration (v2.0)

Target Architecture: Hybrid Next.js Frontend + Cloudflare Workers Backend

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    API Calls    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Next.js Frontend  β”‚ ──────────────→ β”‚ Cloudflare Workers   β”‚
β”‚  (Cloudflare Pages) β”‚                 β”‚    (Backend API)     β”‚
β”‚                     β”‚ ←────────────── β”‚                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    Responses    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Migration Benefits:

  • βœ… Type Safety with TypeScript
  • βœ… Component-based architecture for maintainability
  • βœ… Modern development experience with hot reload
  • βœ… Better testing capabilities for components and utilities
  • βœ… Easier feature additions (AI integration, user accounts)

Migration Status: Ready to begin - See PROJECT_STATUS.md

πŸ› οΈ Configuration Options

Environment Variables

  • ENVIRONMENT - Current environment (production/staging)
  • DOMAIN - Domain name for the deployment

Supported Configurations

  • Project naming with validation
  • Custom domains for Supabase instance
  • Email configuration for admin notifications
  • Database passwords (auto-generated or custom)
  • JWT secrets with secure generation
  • Anonymous keys for public API access
  • Service role keys for administrative access

πŸ“‹ Generated Files

.env File Includes:

  • Database configuration and credentials
  • JWT secrets and API keys
  • SMTP settings for email notifications
  • Storage backend configuration
  • Analytics and logging setup

docker-compose.yml Includes:

  • Complete Supabase stack (15+ services)
  • Health checks and dependency management
  • Volume mounts and network configuration
  • Resource limits and security settings

πŸš€ VPS Deployment Feature

NEW: One-click deployment directly to your Hostinger VPS!

How It Works

  1. Generate your Supabase configuration files
  2. Click "Deploy to VPS" button on results page
  3. Enter VPS details: IP, SSH credentials, domain (optional)
  4. Watch real-time progress through 7 deployment steps
  5. Access your instance immediately after completion

Deployment Process

The automated deployment handles everything:

  • πŸ“¦ System Updates - Updates Ubuntu/Debian packages
  • 🐳 Docker Installation - Installs Docker & Docker Compose
  • πŸ“ Directory Setup - Creates volume directories with proper permissions
  • βš™οΈ Configuration - Uploads all config files (Kong, Vector, SQL scripts)
  • πŸ›‘οΈ Security - Configures UFW firewall with essential ports only
  • 🌐 Nginx Setup - Reverse proxy with automatic SSL (if domain provided)
  • πŸ”’ SSL Certificates - Let's Encrypt with auto-renewal
  • πŸš€ Service Startup - Launches complete Supabase stack
  • βœ… Health Checks - Verifies all services are running

Supported VPS Providers

  • βœ… Hostinger VPS (primary target)
  • βœ… DigitalOcean Droplets
  • βœ… Linode
  • βœ… AWS EC2 (Ubuntu/Debian)
  • βœ… Any Ubuntu/Debian VPS

Access Your Instance

After deployment completes:

  • Studio Dashboard: https://yourdomain.com or http://vps-ip:3000
  • API Endpoint: https://yourdomain.com/api or http://vps-ip:8000
  • Database: vps-ip:5432

πŸ”„ Deployment Workflow

Branch Strategy

  • main β†’ Production deployment to sbconfig.com
  • staging β†’ Staging deployment to staging.sbconfig.com
  • Pull Requests β†’ Temporary preview deployments

Automated Pipeline

  1. Code changes pushed to GitHub
  2. GitHub Actions runs tests and validation
  3. Cloudflare Workers deployment
  4. Health checks verify deployment
  5. Lighthouse performance testing
  6. Notifications on success/failure

πŸ”’ Security Features

  • βœ… HTTPS enforced with automatic SSL certificates
  • βœ… Secure headers (HSTS, CSP, XSS Protection)
  • βœ… CORS configured for safe cross-origin requests
  • βœ… Input validation on client and server
  • βœ… No data persistence - completely stateless
  • βœ… Cryptographically strong secret generation
  • βœ… DDoS protection via Cloudflare

πŸ“Š Performance

  • πŸš€ Sub-50ms response times globally
  • πŸ“ˆ 99.9%+ uptime via Cloudflare infrastructure
  • ⚑ Instant loading with edge caching
  • πŸ“± Mobile optimized responsive design
  • πŸ” Lighthouse Score: 90+ across all metrics

πŸ§ͺ Testing

Run Tests Locally

cd workers
npm test

Manual Testing

Performance Testing

Lighthouse CI runs automatically on production deployments and provides detailed performance reports.

🌐 Global Deployment

Deployed across 275+ Cloudflare edge locations worldwide:

  • πŸ‡ΊπŸ‡Έ Americas: USA, Canada, Brazil, Mexico
  • πŸ‡ͺπŸ‡Ί Europe: UK, Germany, France, Netherlands
  • πŸ‡¦πŸ‡Ί Asia-Pacific: Japan, Singapore, Australia, India
  • 🌍 Africa & Middle East: South Africa, UAE

πŸ’° Cost Structure

Cloudflare Workers (Current Usage)

  • 100,000 requests/day - FREE
  • Sub-50ms response times - FREE
  • Global CDN distribution - FREE
  • SSL certificates - FREE
  • DDoS protection - FREE

Expected costs for typical usage: $0/month πŸ’Έ

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes to the Workers code in /workers/
  4. Test locally: npm run dev
  5. Commit changes: git commit -m 'Add amazing feature'
  6. Push to branch: git push origin feature/amazing-feature
  7. Create Pull Request - automatic staging deployment will be created

Development Guidelines

  • βœ… Keep it simple - Vanilla JS, no dependencies
  • βœ… Test locally before pushing
  • βœ… Write clear commit messages
  • βœ… Update documentation for new features

πŸ“š Documentation

Current Project

Migration Planning

πŸ†˜ Support & Issues

Getting Help

Troubleshooting

  • Check the GitHub Setup Guide for common issues
  • Monitor health endpoints: /health
  • Review Cloudflare Analytics for performance metrics

πŸ“„ License

MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Supabase team for the amazing open-source platform
  • Cloudflare for the incredible Workers platform
  • GitHub for Actions and hosting

Built with ❀️ for the Supabase community

🌟 Star this repository if you find it helpful!

Visit SBConfig.com β†’

About

πŸ”§ Secure Supabase Configuration Generator with One-Click VPS Deployment - Generate production-ready configs with cryptographically secure secrets and deploy directly to your VPS with automated SSL setup

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •