Skip to content

Latest commit

 

History

History
277 lines (186 loc) · 8.66 KB

File metadata and controls

277 lines (186 loc) · 8.66 KB

📚 Documentation

Complete documentation for Bungate - The Lightning-Fast HTTP Gateway & Load Balancer.

🚀 Getting Started

Get up and running with Bungate in less than 5 minutes. Learn how to create your first gateway, add routes, enable load balancing, and add security features.

Perfect for: First-time users, quick setup, learning basics

Contents:

  • Installation
  • Your first gateway
  • Adding routes and load balancing
  • Basic security setup
  • Testing your gateway

🔐 Security & Authentication

Comprehensive guide to authentication and authorization in Bungate. Learn about JWT, API keys, OAuth2, and more.

Perfect for: Securing APIs, implementing auth, managing access control

Contents:

  • JWT authentication (gateway & route-level)
  • JWKS (JSON Web Key Set)
  • API key authentication
  • OAuth2 / OpenID Connect
  • Hybrid authentication
  • Best practices and troubleshooting

Enterprise-grade security features and best practices for production deployments.

Perfect for: Production security, compliance, threat mitigation

Contents:

  • Threat model
  • TLS/HTTPS configuration
  • Input validation & sanitization
  • Security headers
  • Session management
  • Trusted proxy configuration
  • Request size limits
  • JWT key rotation
  • Security checklist

Detailed guide to configuring TLS/HTTPS support with certificates, cipher suites, and HTTP redirection.

Perfect for: HTTPS setup, certificate management, secure communications

Contents:

  • Basic and advanced TLS configuration
  • Certificate management
  • Custom cipher suites
  • Client certificate validation (mTLS)
  • HTTP to HTTPS redirect
  • Production best practices
  • Troubleshooting TLS issues

⚙️ Core Features

Master the 8+ load balancing strategies and optimize traffic distribution across your backend servers.

Perfect for: High availability, performance optimization, scaling

Contents:

  • Load balancing strategies (round-robin, least-connections, weighted, IP hash, random, P2C, latency, weighted-least-connections)
  • Health checks and circuit breakers
  • Sticky sessions
  • Performance comparison
  • Advanced configuration
  • Best practices

Scale horizontally with multi-process clustering for maximum CPU utilization and reliability.

Perfect for: High-traffic applications, horizontal scaling, zero-downtime deployments

Contents:

  • Multi-process architecture
  • Configuration options
  • Lifecycle management
  • Dynamic scaling (scale up/down)
  • Zero-downtime rolling restarts
  • Signal handling
  • Worker management
  • Monitoring clusters

📖 Reference

Complete API documentation with all configuration options, interfaces, and types.

Perfect for: Detailed configuration, TypeScript integration, advanced usage

Contents:

  • BunGateway class and methods
  • Configuration interfaces
  • Route configuration
  • Middleware API
  • Logger API
  • Types and type guards

Real-world examples and use cases demonstrating Bungate in action.

Perfect for: Learning by example, implementation patterns, architecture ideas

Contents:

  • Microservices gateway
  • E-commerce platform
  • Multi-tenant SaaS
  • API marketplace
  • Content delivery (CDN-like)
  • WebSocket gateway
  • Development proxy
  • Canary deployments

Solutions to common issues, errors, and debugging techniques.

Perfect for: Solving problems, debugging, error resolution

Contents:

  • Authentication issues
  • Load balancing problems
  • Performance issues
  • Clustering issues
  • TLS/HTTPS problems
  • Common errors
  • Debug mode
  • Getting help

📊 Learning Paths

For Beginners

  1. Quick Start Guide - Learn the basics
  2. Authentication Guide - Secure your API
  3. Examples - See real-world use cases
  4. Troubleshooting - Solve common issues

For Production Deployments

  1. Security Guide - Harden your gateway
  2. TLS Configuration - Enable HTTPS
  3. Load Balancing Guide - Distribute traffic
  4. Clustering Guide - Scale horizontally
  5. API Reference - Fine-tune configuration

For Advanced Users

  1. API Reference - Master the API
  2. Clustering Guide - Advanced scaling
  3. Load Balancing Guide - Optimize routing
  4. Examples - Complex architectures
  5. Troubleshooting - Debug like a pro

🎯 Quick References

Common Tasks

Task Guide
Install and setup Quick Start
Add JWT authentication Authentication
Enable HTTPS TLS Configuration
Setup load balancing Load Balancing
Enable clustering Clustering
Fix auth errors Troubleshooting
Configure security headers Security Guide
Add rate limiting Quick Start

Configuration Examples

Example Location
Microservices gateway Examples
E-commerce platform Examples
Multi-tenant SaaS Examples
API marketplace Examples
WebSocket gateway Examples
Canary deployment Examples

🔍 Search Tips

Use your browser's search (Ctrl/Cmd + F) within each guide to find specific topics:

  • Authentication: Search for "JWT", "API key", "OAuth"
  • Load Balancing: Search for strategy names like "round-robin", "least-connections"
  • Configuration: Search for specific config keys like "timeout", "healthCheck"
  • Errors: Search for error messages in Troubleshooting

🌐 Additional Resources

Official

Community

  • 💬 Discussions - Ask questions, share ideas
  • 🐛 Issues - Report bugs, request features
  • 📖 Changelog - Release notes (if available)
  • 📝 Contributing - Contribution guidelines (if available)

Related Projects

  • Bun - The JavaScript runtime Bungate is built on
  • Pino - Fast logging library used by Bungate

📝 Documentation Feedback

Found an issue with the documentation? Have a suggestion?


📄 License

Bungate is MIT licensed. See LICENSE for details.


Built with ❤️ by 21no.de for the JavaScript Community

🏠 Homepage | 📚 Docs | ⭐ Star on GitHub