Skip to content

ByteBrushStudios/void

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Void ⚑

Void is a modern, high-performance reverse proxy and maintenance system developed by ByteBrush Studios. It provides intelligent traffic routing with beautiful, techy maintenance pages when services are unavailable. Built with Go for exceptional performance and featuring a stunning glassmorphic UI with animated backgrounds.

✨ Features

  • πŸ”„ Intelligent Reverse Proxy: Automatically routes traffic to healthy backends and shows maintenance pages when services are down
  • 🎨 Modern UI: Beautiful glassmorphic design with animated backgrounds and smooth transitions
  • ⚑ High Performance: Built with Go's concurrency model for lightning-fast response times
  • πŸ“± Responsive Design: Works flawlessly on desktop, tablet, and mobile devices
  • πŸ› οΈ Debug Information: Built-in debugging tools with client and server information
  • 🌐 Multi-Service Support: Manage multiple services with individual configurations
  • πŸ“Š Smart API Handling: JSON responses for API endpoints during maintenance
  • πŸ”§ Easy Configuration: Simple YAML-based service configuration
  • 🐳 Container Ready: Docker and Kubernetes compatible
  • πŸš€ Multiple Deployment Options: Works with Nginx, Traefik, Dokploy, and more

πŸ–ΌοΈ Preview

Experience the modern, techy interface of Void:

Debug Panel Closed Clean, modern maintenance page with glassmorphic design

Debug Panel Open
Comprehensive debug information with syntax highlighting


πŸš€ Quick Start

Prerequisites

  • Go 1.18 or higher (for building from source)
  • OR Docker (for containerized deployment)

Option 1: Binary Installation

  1. Download and Build

    git clone https://github.com/ByteBrushStudios/void.git
    cd void
    make build
  2. Configure Services

    # Copy example service configuration
    mkdir -p services
    cp examples/services/example.yaml services/myapp.yaml
    # Edit the configuration file
  3. Run Void

    ./void

Option 2: Docker Deployment

  1. Using Docker Compose
    git clone https://github.com/ByteBrushStudios/void.git
    cd void
    cp examples/services.yaml.example services.yaml
    docker-compose -f examples/docker-compose.yml up -d

Void will start on port 1292 by default and begin reverse proxying to your configured services.


βš™οΈ Configuration

Service Configuration

Void uses YAML configuration files in the services directory to define your services:

# services/myapp.yaml
services:
  - name: "My Web Application [Production]"
    host: "http://127.0.0.1:3000"    # Backend server URL
    domain: "myapp.com"              # Domain to match requests
    support: "https://discord.gg/support"
    status: "https://status.myapp.com"

You can create multiple YAML files to organize your services by project or environment.

How It Works

  1. Healthy Service: Void reverse proxies requests to the backend defined in host
  2. Unhealthy Service: Void displays the beautiful maintenance page
  3. API Endpoints: Services listed in apiUrls receive JSON responses during maintenance

Configuration Fields

Field Description Example
name Display name for the service "My App [Production]"
host Backend server URL for reverse proxy "http://127.0.0.1:3000"
domain Domain to match requests against "myapp.com"
support Support/contact URL "https://discord.gg/support"
status Status page URL "https://status.myapp.com"

🌐 Deployment Options

Nginx Integration

Perfect for traditional server setups. Void acts as a fallback when your main services are down.

# Copy the example configuration
cp examples/nginx.conf /etc/nginx/sites-available/your-site
# Edit and enable the configuration
sudo nginx -t && sudo systemctl reload nginx

See examples/nginx.conf for a complete production-ready configuration.

Traefik Integration

Ideal for containerized environments with automatic service discovery.

# Copy Traefik configuration
cp examples/traefik.yml /etc/traefik/
# Void integrates seamlessly with Traefik's circuit breaker middleware

Dokploy Deployment

Modern deployment platform with built-in container orchestration.

# Import the Dokploy configuration
dokploy import examples/dokploy.json
# Deploy with zero-downtime rolling updates

Systemd Service

For production server deployments:

# Copy service file
sudo cp examples/void.service /etc/systemd/system/
# Enable and start
sudo systemctl daemon-reload
sudo systemctl enable void.service
sudo systemctl start void.service

πŸ”§ Environment Variables

Variable Description Default
VOID_PORT Server port 1292
VOID_LOG_LEVEL Log level (debug, info, warn, error) info

πŸ“Š Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Load Balancer │────│      Void       │────│  Backend Apps   β”‚
β”‚  (Nginx/Traefik)β”‚    β”‚ Reverse Proxy   β”‚    β”‚ (Your Services) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
                              β–Ό
                      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                      β”‚ Maintenance UI  β”‚
                      β”‚ (When backend   β”‚
                      β”‚  is unhealthy)  β”‚
                      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Request Flow

  1. Incoming Request β†’ Load balancer routes to Void
  2. Domain Matching β†’ Void matches request domain to configured service
  3. Health Check β†’ Void attempts to proxy to backend service
  4. Success β†’ Request proxied to healthy backend
  5. Failure β†’ Beautiful maintenance page served (HTML) or JSON response (APIs)

πŸ” Features Deep Dive

Intelligent Reverse Proxy

  • Automatic Failover: Seamlessly switches between backend and maintenance mode
  • Domain-Based Routing: Route different domains to different backend services
  • Health Detection: Automatically detects when services are available again
  • Header Preservation: Maintains original request headers for proper backend handling

Smart API Handling

apiUrls:
  - "api.example.com"
  - "webhooks.example.com"

API endpoints receive structured JSON responses instead of HTML:

{
  "message": "This service is down for maintenance...",
  "service": {
    "name": "API Server [Production]",
    "domain": "api.example.com",
    "support": "https://support.example.com",
    "status": "https://status.example.com"
  },
  "info": {
    "version": "2.0.0-alpha.1",
    "commit": "abc123"
  }
}

Debug Information

The debug panel provides comprehensive diagnostics:

  • Server Info: Void version, commit hash, routing details
  • Client Info: IP address, geolocation, browser details with privacy controls
  • Request Details: Path, hostname, and routing information

Modern UI Features

  • Animated Background: Subtle particle animations and grid patterns
  • Glassmorphic Design: Modern blur effects and transparency
  • Smooth Transitions: Buttery smooth animations and micro-interactions
  • Responsive Layout: Perfect on all screen sizes and devices
  • Dark Theme: Modern color palette optimized for readability

πŸ› οΈ Development

Project Structure

void/
β”œβ”€β”€ main.go                    # Main application entry point
β”œβ”€β”€ services.yaml             # Service configuration
β”œβ”€β”€ app.html                  # Modern maintenance page template
β”œβ”€β”€ assets/                   # Static assets (images, icons)
β”‚   └── previews/            # UI preview images
β”œβ”€β”€ state/                   # Application state management
β”œβ”€β”€ types/                   # Type definitions and structs
β”œβ”€β”€ examples/                # Configuration examples
β”‚   β”œβ”€β”€ nginx.conf          # Nginx integration example
β”‚   β”œβ”€β”€ traefik.yml         # Traefik configuration
β”‚   β”œβ”€β”€ dokploy.json        # Dokploy deployment config
β”‚   β”œβ”€β”€ void.service        # Systemd service template
β”‚   β”œβ”€β”€ docker-compose.yml  # Docker Compose setup
β”‚   └── services.yaml.example # Service configuration example
β”œβ”€β”€ temp/                   # Temporary files and drafts
└── README.md               # This documentation

Building from Source

# Install dependencies and build
make build

# Run in development mode with hot reload
make dev

# Run tests
make test

# Build for production with optimizations
make release

API Endpoints

Endpoint Description
/* Main router - handles all requests with domain matching
/__voidStatic/* Static assets (CSS, JS, images)

πŸ”§ Advanced Configuration

Load Balancing Integration

Void works excellently behind load balancers:

HAProxy Example:

backend void_maintenance
    server void1 127.0.0.1:1292 check

backend app_servers
    option httpchk GET /health
    server app1 127.0.0.1:3000 check fall 3 rise 2
    server app2 127.0.0.1:3001 check fall 3 rise 2

frontend web_frontend
    default_backend app_servers
    # Fallback to maintenance on 5xx errors
    errorfile 503 /dev/null
    errorloc 503 http://void-maintenance:1292

Container Orchestration

Kubernetes Example:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: void-maintenance
spec:
  replicas: 2
  selector:
    matchLabels:
      app: void
  template:
    metadata:
      labels:
        app: void
    spec:
      containers:
      - name: void
        image: void:latest
        ports:
        - containerPort: 1292
        env:
        - name: VOID_PORT
          value: "1292"
        - name: VOID_LOG_LEVEL
          value: "info"

🀝 Contributing

We welcome contributions! Here's how to get started:

  1. Fork & Clone

    git clone https://github.com/your-username/void.git
    cd void
  2. Create Feature Branch

    git checkout -b feature/amazing-feature
  3. Make Changes & Test

    make test
    make dev  # Test your changes
  4. Commit & Push

    git commit -m "feat: add amazing feature"
    git push origin feature/amazing-feature
  5. Open Pull Request

Development Guidelines

  • Follow Go best practices and gofmt formatting
  • Add tests for new features
  • Update documentation for any API changes
  • Ensure backwards compatibility
  • Test with multiple deployment scenarios

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

Open Source Credits


πŸ†˜ Support & Community


🏒 About ByteBrush Studios!

Void is developed and maintained by ByteBrush Studios, creators of high-quality open-source software for developers and businesses.

Other Projects:


⭐ Star this repo β€’ πŸ› Report Bug β€’ πŸ’‘ Request Feature

Made with ❀️ by ByteBrush Studios