A Go-based backend service / web API starter kit including CLI, database migrations, and Docker support.
This project provides a modular Go application skeleton useful for building REST APIs or backend microservices with migrations, logging, and Docker setup.
- ✅ Go (Golang) application with modular architecture
- ✅ CLI entrypoints under
cmd/ - ✅ Database migrations support
- ✅ Docker & Docker Compose setup
- ✅ Structured project layout (
internal/,cmd/,migrations/) - ✅ Ready for API server or worker service
├── cmd/ # Command binaries / entrypoints
├── internal/ # Core application logic
├── migrations/ # DB migrations
├── docker/ # Docker related configs
├── .dockerignore
├── docker-compose.yaml
├── go.mod # Go module definition
├── go.sum
├── Makefile
└── README.md
Make sure you have installed:
- Go 1.20+
- Docker & Docker Compose (optional but recommended)
- A database (PostgreSQL/MySQL depending on migration setup)
-
Clone the Project
git clone https://github.com/PriyanshuSharma23/greenlight.git cd greenlight```
-
Build the app
go build ./cmd/...
-
Run database migrations
Update the database config/environment variables as needed
go run ./migrations
-
Start the app
go run ./cmd/server
Replace
serverwith the appropriate command if different incmd/
-
Start services
docker compose up --build
-
Access your app at:
http://localhost:8080(Adjust port based on your configuration)
This repository is intended to be used as:
✅ Backend service starter kit ✅ API server basis ✅ Microservice or CLI tool foundation
Feel free to extend it with your own handlers, database models, middleware, and configuration!