Go-Start is a powerful CLI tool designed to bootstrap Go projects with a production-ready structure. It automatically generates projects following microservices architecture patterns, clean architecture principles, and includes pre-configured Docker setup.
- Clean Architecture structure
- Microservices-oriented setup
- Pre-configured Docker environment
- Automated code generation for entities
- Built-in Makefile for common operations
Before installing Go-Start, ensure you have the following installed:
- Clone the repository:
git clone [email protected]:solrac97gr/go-start.git
- Navigate to the repository and run the installation script:
cd go-start
bash scripts/install.sh
- Navigate to your desired project location and run:
go-start
-
Follow the interactive prompts:
- Enter project name (e.g.,
ecommerce
) - Provide GitHub username (e.g.,
solrac97gr
) - List your project entities, separated by commas (e.g.,
product,user,payment
)
- Enter project name (e.g.,
-
Start your application:
# Using Make
make run
# Using Docker
docker-compose up --build
- Navigate inside of your current project:
go-start --flow=app
-
Follow the interactive prompts:
- Enter app name (e.g.,
tag
)
- Enter app name (e.g.,
-
Verify that the app was correctly integrated in the main
-
Start your application:
# Using Make
make run
# Using Docker
docker-compose up --build
The generated project follows clean architecture principles with the following structure:
your-project/
βββ cmd/
β βββ http/
β βββ main.go
βββ infrastructure/
β βββ docker/
β βββ Dockerfile
βββ internal/
β βββ {entity-name}/
β β βββ application/
β β β βββ {entity}_application.go
β β βββ domain/
β β β βββ models/
β β β β βββ {entity}.go
β β β βββ ports/
β β β βββ {entity}_repository.go
β β βββ infrastructure/
β β βββ handler/
β β β βββ {entity}_handler.go
β β βββ repository/
β β β βββ {entity}_repository.go
β β βββ server/
β β βββ {entity}_server.go
βββ pkg/
β βββ factory/
β β βββ {entity}_factory.go
β βββ server/
β βββ super_server.go
βββ docker-compose.yaml
βββ go.mod
βββ go.sum
βββ Makefile
This beta version includes:
- MongoDB as the default database
- Fiber as the default web framework
Future releases will support:
- Multiple database options
- Various web frameworks
- Additional architectural patterns
Contributions are welcome! Feel free to:
- Report bugs
- Suggest new features
- Submit pull requests
This project is licensed under the MIT License
For support, please open an issue on GitHub.
Note: This is a beta version. Use in production environments at your own discretion.