This is a production-ready Go backend API template designed to kickstart your next project.
- Multiple Database Support: Easily switch between different databases (e.g., PostgreSQL, MySQL, SQLite).
- Docker Integration: Run the application and its dependencies in isolated containers.
- Makefile: Simplify common tasks like building, testing, and running the application.
- Database Migrations: Manage database schema changes with ease.
- Configuration Management: Use
local.yaml
for environment-specific configurations. - Modular Structure: Organized into
models
,database
,handlers
,middleware
,repositories
, andservices
. - Testing System: Includes a robust testing framework for unit and integration tests.
Click the "Use this template" button at the top right of this repository to create your own copy.
Update the following files with your environment-specific settings:
config/local.yaml
: Add your application-specific configurations (e.g., server port, logging level)..env
: Add your environment variables (e.g., database credentials, API keys).
go mod download
make run
- To apply migrations:
make migrate-up
- To rollback migrations:
make migrate-down
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.