Skip to content

🧰 GoMicroKit β€” A modern Go CLI tool to scaffold microservices using Fiber, GORM, Docker, and the repository pattern with an interactive TUI powered by Bubble Tea.

Notifications You must be signed in to change notification settings

msdevbytes/gomicrokit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧰 GoMicroKit β€” Scaffold Go Microservices Fast with Style πŸš€

GoMicroKit is an interactive CLI tool for generating scalable, idiomatic Go microservice boilerplates β€” with support for REST frameworks, databases, GORM, Docker, and more. Inspired by Laravel's artisan, but for Go developers.

✨ Built with Bubble Tea, Cobra, and Go best practices.


πŸ“¦ Features

  • πŸ—οΈ Generate a full microservice directory with:
    • Framework: fiber (more coming soon)
    • DB setup mysql (more coming soon)
    • GORM support toggle
    • Docker support
  • βš™οΈ Uses Repository Pattern, Service Layer, DTOs
  • πŸ§ͺ Auto-generates test boilerplates
  • 🐳 Dockerfile support
  • 🌈 Interactive UI with Bubble Tea (fancy CLI)
  • 🧽 Remove previously generated services
  • πŸ•ΉοΈ Flags & prompts: hybrid control for automation and UX

πŸ”§ Installation

go install github.com/msdevbytes/gomicrokit@latest

Or clone and run locally:

git clone https://github.com/msdevbytes/gomicrokit.git
cd gomicrokit
go run main.go

πŸš€ Usage

🎬 Start the CLI

gomicrokit new

You'll be guided through:

  • Project name
  • Framework selection (currently supports fiber)
  • Database selection
  • Use GORM? (y/n)
  • Include Dockerfile? (y/n)

✨ A spinner will run while your project is generated, packages are installed, and success is displayed in style.


πŸ§ͺ Example

gomicrokit new
🧱 Project Name:      mysvc
πŸ› οΈ  Framework:         fiber
πŸ—„οΈ  Database:          postgres
πŸ“¦ Use GORM:          y
🐳 Docker Support:    y

➑️ Output:

πŸ“ Scaffolding...
βœ… Created: internal/service/mysvc_service.go
βœ… Created: internal/repository/mysvc_repository.go
βœ… Created: internal/model/mysvc_model.go
βœ… Created: internal/handler/mysvc_handler.go
βœ… Updated: internal/service/container.go
βœ… Updated: internal/routes/index.go
πŸ“¦ Installing packages...
πŸ”₯ Done! Project 'mysvc' generated successfully.

πŸ“ Project Structure

mysvc/
β”œβ”€β”€ cmd/
β”‚   └── main.go
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ dto/
β”‚   β”œβ”€β”€ handler/
β”‚   β”œβ”€β”€ model/
β”‚   β”œβ”€β”€ repository/
β”‚   β”œβ”€β”€ routes/
β”‚   └── service/
β”œβ”€β”€ test/
β”‚   └── unit/
β”‚       └── dto/
β”œβ”€β”€ go.mod
β”œβ”€β”€ Dockerfile (optional)
└── .gen_history.json

⚑ Commands

πŸ—οΈ Generate a Service (non-interactive)

gomicrokit make:service --name=event --force

🧼 Remove a Service (interactive)

gomicrokit remove:service

✨ Templates

Templates are stored in:

templates/service/
β”œβ”€β”€ model.tmpl
β”œβ”€β”€ repository.tmpl
β”œβ”€β”€ service.tmpl
β”œβ”€β”€ handler.tmpl
β”œβ”€β”€ dto.tmpl
β”œβ”€β”€ dto_test.tmpl

πŸ“– Dev Guide

go run main.go

πŸ“„ License

MIT β€” use it freely.


πŸ’¬ Credits

Built with ❀️ by msdevbytes.

About

🧰 GoMicroKit β€” A modern Go CLI tool to scaffold microservices using Fiber, GORM, Docker, and the repository pattern with an interactive TUI powered by Bubble Tea.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages