You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.com/solrac97gr/go-start

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/solrac97gr/go-start

v0.0.0-20241209171314-43039d14add8
Source
Go
Version published
Created
Source

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:

  • Go (1.16 or later)
  • Git
  • Docker

Installation 🛠️

  • Clone the repository:
git clone git@github.com:solrac97gr/go-start.git
  • Navigate to the repository and run the installation script:
cd go-start
bash scripts/install.sh

Usage Guide 📚

Start a project 🚀

  • 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)
  • Start your application:

# Using Make
make run

# Using Docker
docker-compose up --build

Add new app to the project 🚀

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

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

  • 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.

FAQs

Package last updated on 09 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts