A production-ready Go project template that follows Domain-Driven Design (DDD) principles to create clean, maintainable, and scalable applications.
- Click the "Use this template" button at the top of this repository
- Name your new repository and create it
- Clone your new repository locally
- Update the following files with your project details:
go.mod: Change the module name to your project's module path.env-dev: Configure with your local development settingsREADME.md: Update with your project-specific information
- 🪟 Domain-Driven Design architecture
- 🔒 Clean separation of concerns
- 🛠 Built-in development tools (hot reload, testing)
- 📦 Docker support for local development
- 🗄 PostgreSQL integration ready
- ⚡️ Modern Go practices and patterns
- ✨ MDC Files for AI agents
- Mise
- Docker and Docker Compose
- Make
- Create your repository from this template
- Clone your new repository
- Copy the environment file:
cp .env-dev .env - Configure your environment variables in
.env - Install development tools:
make setup
- Compile the project:
make compile
- Start the database:
docker-compose up -d
- Load environment variables:
set -a && source .env && set +a
- Run migrations:
make migration/up
For development convenience, we use Air for hot reloading:
airRun the test suite with:
make testThe API is documented using OpenAPI 3.0. You can find the specification in openapi.yaml.
To view the interactive API documentation:
- Start the service
- Visit
/api/v1/docsendpoint
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.