A lightweight and powerful Go web framework built on top of Gin, designed for building scalable web applications with MongoDB integration and AWS Lambda support.
- Go 1.21 or later
- MongoDB (for local development)
- AWS SAM CLI (for deployment)
- AWS credentials configured
- Install the Ginboot CLI tool:
go install github.com/klass-lk/ginboot-cli@latest- Create a new project:
# Create a new project
ginboot new myproject
# Navigate to project directory
cd myproject
# Initialize dependencies
go mod tidy- Run locally:
go run main.goYour API will be available at http://localhost:8080/api/v1
To deploy your application to AWS Lambda:
# Build the project for AWS Lambda
ginboot build
# Deploy to AWS
ginboot deployOn first deployment, you'll be prompted for:
- Stack name (defaults to project name)
- AWS Region
- S3 bucket configuration
These settings will be saved in ginboot-app.yml for future deployments.
- Database Operations: Built-in multi-database support (MongoDB, SQL, DynamoDB) through a generic repository interface, enabling common CRUD operations with minimal code.
- Pluggable Telemetry: Optional, lightweight OpenTelemetry plugin (
ginboot/telemetry) to ship traces, metrics, and logs straight to Grafana (or any OTLP backend) without bloating the core framework. - Context-Bound Logger: A pluggable, context-aware logger (
ctx.Logger().Info(...)) that automatically correlates logs with active distributed traces. - API Request Handling: Simplified API request and authentication context extraction.
- Error Handling: Easily define and manage business errors.
- Password Encoding: Inbuilt password hashing and matching utility for secure authentication.
- CORS Configuration: Flexible CORS setup with both default and custom configurations.
To install GinBoot, add it to your project:
go get github.com/klass-lk/ginbootTo use the optional telemetry plugin:
go get github.com/klass-lk/ginboot/telemetryThen import it. The import is blank because you are not calling anything — it compiles the plugin in so it can register itself with the framework:
import _ "github.com/klass-lk/ginboot/telemetry"From there, telemetry.enabled: true in ginboot.yml or an
OTEL_EXPORTER_OTLP_ENDPOINT in the environment switches it on. See
Telemetry & Observability.
Already have an API? You do not need a rewrite.
- Go apps migrate in place.
server.Engine()is the real*gin.Engineand Ginboot route groups accept Gin's ownfunc(c *gin.Context)handlers, so your existing routes keep serving traffic while you convert one controller at a time. - APIs in other languages are ported against their contract — Express, NestJS, FastAPI, Django, Spring Boot, ASP.NET, Rails or Laravel — then traffic moves path by path with both services running.
| Guide | |
|---|---|
| Start here | Migrating to Ginboot · ginboot.com/docs/5-migration |
| From an existing Go app | ginboot.com/docs/5-migration/from-go |
| From another language | ginboot.com/docs/5-migration/from-other-languages |
| For AI coding agents | ginboot.com/docs/5-migration/agent-playbook |
Using an AI coding agent? Point it at
AGENTS.md, ginboot.com/llms.txt or
ginboot.com/llms-full.txt — the whole documentation
in one request.
For more detailed information on Ginboot's features and usage, refer to the following documentation:
- Server Configuration
- Routing
- Authentication
- Database Support
- Deployment to AWS Lambda using SAM
- Testing
- Caching Support
- Telemetry & Observability
- Migrating to Ginboot
Contributions are welcome! Please read our contributing guidelines for more details.
This project is licensed under the MIT License. See the LICENSE file for details.