Goservegen
goservegen - Go Backend Architecture Generator using goserve framework
Install / Use
/learn @afteracademy/GoservegenREADME
goservegen - Go Backend Architecture Generator using goserve framework
Project generator for go backend architecture using goserve framework
See more on goserve framework
github.com/afteracademy/goserve
Check the example project built using goservegen
How To Use goservegen
A. Either You can download the starter projects here
B. Or You can use goservegen directly to generate the project
Install go language in your system if not already installed. Download Go
goservegen [project directory path] [project module] [Database Type - mongo/postgres]
Postgres Project
go run github.com/afteracademy/goservegen/v2@latest ~/Downloads/my_project github.com/yourusername/example postgres
Mongo Project
go run github.com/afteracademy/goservegen/v2@latest ~/Downloads/my_project github.com/yourusername/example mongo
Note: It will generate project named
my_projectlocated at~/Downloadsand modulegithub.com/yourusername/example
Run the project using Docker
# Go to the project directory
cd ~/Downloads/my_project
docker compose up --build
Healthy Check
# Run on terminal
curl http://localhost:8080/health
Response
{
"code": "10000",
"status": 200,
"message": "success",
"data": {
"timestamp": "2026-01-25T06:45:17.228713387Z",
"status": "OK"
}
}
Now Open the generated project in your IDE/editor of choice
Have fun developing your REST API server!
Generated Project Structure
.
├── Dockerfile
├── api
│ ├── health
│ │ ├── controller.go
│ │ ├── dto
│ │ │ └── health_check.go
│ │ └── service.go
│ └── message
│ ├── controller.go
│ ├── dto
│ │ └── create_message.go
│ ├── model
│ │ └── message.go
│ └── service.go
├── cmd
│ └── main.go
├── config
│ └── env.go
├── docker-compose.yml
├── go.mod
├── go.sum
├── keys
│ ├── private.pem
│ └── public.pem
├── migrations
├── startup
│ ├── module.go
│ ├── server.go
│ └── testserver.go
└── utils
├── convertor.go
└── file.go
Working on the project
You can read about using this framework here github.com/afteracademy/goserve
