Skip to content

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.

License

Notifications You must be signed in to change notification settings

solrac97gr/go-start

Folders and files

NameName
Last commit message
Last commit date

Latest commit

43039d1 Β· Dec 9, 2024

History

38 Commits
Dec 9, 2024
Dec 9, 2024
Dec 9, 2024
Dec 7, 2024
Dec 7, 2024
Aug 31, 2024
Aug 31, 2024
Aug 31, 2024
Sep 4, 2024
Dec 9, 2024
Aug 31, 2024
Aug 31, 2024
Dec 9, 2024

Repository files navigation

Go-Start (Beta Version) πŸš€

Overview πŸ“–

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.

Features ✨

  • Clean Architecture structure
  • Microservices-oriented setup
  • Pre-configured Docker environment
  • Automated code generation for entities
  • Built-in Makefile for common operations

Prerequisites πŸ—οΈ

Before installing Go-Start, ensure you have the following installed:

Installation πŸ› οΈ

  1. Clone the repository:
git clone [email protected]:solrac97gr/go-start.git
  1. Navigate to the repository and run the installation script:
cd go-start
bash scripts/install.sh

Usage Guide πŸ“š

Start a project πŸš€

  1. Navigate to your desired project location and run:
go-start
  1. 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)
  2. Start your application:

# Using Make
make run

# Using Docker
docker-compose up --build

Add new app to the project πŸš€

  1. Navigate inside of your current project:
go-start --flow=app
  1. Follow the interactive prompts:

    • Enter app name (e.g., tag)
  2. Verify that the app was correctly integrated in the main

  3. Start your application:

# Using Make
make run

# Using Docker
docker-compose up --build

Project Structure πŸ—οΈ

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

Current Limitations ⚠️

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

Contributing 🀝

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest new features
  • Submit pull requests

License πŸ“„

This project is licensed under the MIT License

Support πŸ’¬

For support, please open an issue on GitHub.


Note: This is a beta version. Use in production environments at your own discretion.

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published