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.