Documentation Index
Fetch the complete documentation index at: https://mnah05-boiler-go-21-79.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Welcome to Boiler-Go
Boiler-Go is a production-ready Go backend boilerplate that provides a solid foundation for building scalable web services. It combines clean architecture principles with battle-tested libraries and production-ready patterns.Quick start
Get your backend running in under 5 minutes
Architecture
Understand the project structure and design patterns
API endpoints
Explore the available HTTP endpoints
Configuration
Learn how to configure your application
Key features
Boiler-Go comes packed with production-ready features out of the box:Thread-safe database pool
Concurrent-safe PostgreSQL connection management with pgx/v5
Background jobs
Redis-based task processing with Asynq for reliable job execution
Graceful shutdown
Proper resource cleanup and timeout handling for both API and worker
Structured logging
JSON logging with request tracing and correlation IDs using zerolog
Health checks
Lightweight service health monitoring with duration tracking
Worker management
API endpoints for worker status and ping testing
Tech stack
Boiler-Go is built on modern, production-tested libraries:Core backend
- Echo v4 - High performance HTTP router and middleware framework
- pgx/v5 - Fast PostgreSQL driver and toolkit
- sqlc - Type-safe SQL code generation
Background jobs and caching
- Asynq - Redis-based distributed task queue
- go-redis/v9 - Type-safe Redis client
Configuration and logging
Production ready
Boiler-Go includes several production-ready features that are often overlooked in boilerplates:Thread safety
Thread safety
- Database pool uses
sync.RWMutexfor concurrent access - Configuration loading uses
sync.Oncefor safe singleton pattern - All shared resources are properly synchronized
Observability
Observability
- Structured JSON logging throughout the application
- Request correlation via
X-Request-IDheader - Request IDs propagated from API to worker logs
- Global fallback logger for non-request contexts
Error handling
Error handling
- Comprehensive error checking and logging
- Graceful degradation on service failures
- Proper resource cleanup on errors
- Context-aware timeouts
Resource management
Resource management
- Connection pooling with configurable limits
- Context-aware database initialization with timeouts
- Automatic cleanup on shutdown
- Memory leak prevention
What you’ll build
With Boiler-Go, you get a complete backend system:- HTTP API server - Handles incoming requests with structured logging and middleware
- Background worker - Processes asynchronous tasks from Redis queues
- Health monitoring - Exposes health check endpoints for load balancers
- Worker management - Test and monitor your background job processing
Both the API server and worker process share the same codebase and configuration, making deployment and maintenance straightforward.
Next steps
Get started
Follow the quickstart guide to set up your development environment and run your first API server
Understand the architecture
Learn about the project structure and design patterns used throughout the codebase
Explore the API
Check out the API reference to see what endpoints are available