Building modern web services and APIs in Go (Golang) often requires writing a repetitive amount of boilerplate code—setting up HTTP/REST routing, gRPC proto definitions, configuration management, directory layouts, and Docker environments.
GoZen is a simplified Golang MVC code generator and boilerplate tool created to solve this exact problem. It allows developers to scaffold fully structured, production-ready Go microservices and applications in seconds.
What is GoZen?
gozen (developed by tech-thinker) is a lightweight CLI utility and generator designed for Go developers. It acts as an opinionated starter generator that structures your project around clean Architecture and MVC principles, supporting both REST controllers and gRPC services out of the box.
Key Benefits of Using GoZen
- Instant MVC & Modular Architecture Scaffold
- Instead of spending hours designing project directory structures,
gozencreates a standard, modular structure adhering to Go community standards.
- Instead of spending hours designing project directory structures,
- Dual-Protocol Support (REST + gRPC)
- Out of the box,
gozenprepares both REST API controllers and gRPC handlers with Protocol Buffers (.proto) scaffolding, allowing you to build multi-protocol APIs seamlessly.
- Out of the box,
- Pre-configured Docker & Live Reloading
- Includes ready-to-use
Dockerfile.dev,Dockerfile.debug, andmoddconfiguration (modd-dev.conf,modd-debug.conf) for effortless containerized local development and hot-reloading.
- Includes ready-to-use
- Structured Environment & Configuration Management
- Includes standardized
.env,.env.sample, andconfig/config.gofiles to manage application settings safely across environments.
- Includes standardized
- Reduced Boilerplate & Human Error
- Minimizes manual setup errors when wiring up routers, handlers, health check endpoints, and server initializations.
How GoZen Makes Developer Life Easy
- Focus on Business Logic: Developers can jump straight into writing core API endpoints rather than configuring routing tables, server initialization routines, and container files.
- Consistency Across Projects: Teams can use
gozento ensure every microservice across the organization shares an identical layout, making code reviews and maintenance straightforward. - Seamless Debugging & Local Dev: With pre-packaged Docker debug setups and live-reloading tools, local testing and step-debugging are hassle-free.
Step-by-Step: Creating a Fresh Go Project with GoZen
1. Installation
On macOS (using Homebrew)
1
2
brew tap tech-thinker/tap
brew install gozen
On Linux / macOS (using Binary Release)
1
2
3
4
TAG="v1.0.0" # Use the latest tag from GitHub releases
curl -sL "https://github.com/tech-thinker/gozen/releases/download/${TAG}/gozen-darwin-amd64" -o gozen
chmod +x gozen
sudo mv gozen /usr/bin
2. Running & Developing
Create project using gozen cli-
1
gozen create -p <package-name> -d postgres <app-name>
3. Generated Directory Structure
When gozen scaffolds a project, it generates the following clean structure:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.
├── .editorconfig
├── .env
├── .env.sample
├── .gitignore
├── app/
│ ├── grpc/
│ │ ├── handlers/
│ │ │ └── health.go
│ │ ├── proto/
│ │ │ ├── health.proto
│ │ │ ├── health.pb.go
│ │ │ └── health_grpc.pb.go
│ │ └── router/
│ │ └── router.go
│ ├── init.go
│ └── rest/
│ ├── controllers/
│ │ └── health.go
│ └── router/
│ └── router.go
├── config/
│ └── config.go
├── constants/
│ └── app.go
└── docker/
├── Dockerfile.debug
├── Dockerfile.dev
├── Dockerfile.prod
├── modd-debug.conf
└── modd-dev.conf
4. Running & Developing
- Environment Variables: Copy
.env.sampleto.envand set your local configurations. - Local Live Reloading: Run your app inside Docker with hot reload:
1
docker-compose up
- REST & gRPC Health Checks: The project comes pre-configured with ready
/healthREST and gRPC health endpoints.
Summary
gozen is a powerful, time-saving tool for Golang developers looking to quick-start projects with clean MVC architecture, REST + gRPC support, and containerized development tooling out of the box.