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.go
Your 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 deploy
On 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.
- 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/ginboot
For more detailed information on Ginboot's features and usage, refer to the following documentation:
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.