I wanted to share a project I've been working on: a Go monorepo template. My goal was to build a solid, production-ready starting point for new projects that eliminates the repetitive setup work.
It's structured to be highly scalable and future-proof, with a clear separation of concerns using cmd, pkg, internal, and services directories. This gives you a great foundation with plenty of room to grow, whether you're building a simple CLI tool or a complex system of microservices.
The best part is the setup workflow. After you fork and clone the repository, you just run a single command:
make change-username
A script will prompt you for your GitHub username and automatically refactor the entire project. It updates the Go module paths, documentation links, and license file, making the template truly yours in seconds.
It comes with:
- A well-defined, expandable project structure.
- Working demo applications (a CLI tool and an HTTP server using
htmx). - A comprehensive
Makefilefor common tasks like building, testing, and auditing. - A pre-configured GitHub Actions workflow for continuous integration.
- A "standard library first" philosophy, with a few carefully chosen dependencies for things like database access.
I built this to be the template I always wanted for my own projects. I hope it can help some of you get your ideas off the ground faster.
You can check it out on GitHub: https://github.com/dunamismax/go-monorepo-template
I would love to hear any feedback or suggestions you might have. Thanks