goboot

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2025 License: MIT Imports: 1 Imported by: 0

README ΒΆ

goboot πŸš€

goboot is a production-grade CLI tool designed to scaffold Go projects with best practices, clean architecture, and a pluggable microservice factory.

Go Version Release License

Features

  • Pluggable Architecture: Decoupled feature generators for databases, auth, and more.
  • Incremental Adoption: Add features to existing projects using goboot add.
  • Production Ready: Multi-stage Docker builds, Kubernetes manifests, and OpenTelemetry.
  • Diagnostics: Built-in doctor command to check project health.
  • Interactive Mode: Guided setup for new projects.

Installation

From Source (Requires Go 1.22+)
go install github.com/codewithme224/goboot@latest
From Binaries

Download the latest binary for your platform from the Releases page.


Quick Start

1. Create a New Project

The easiest way to start is using the Interactive Mode:

goboot new --interactive

Or use flags for a quick setup:

goboot new --name myapp --module github.com/user/myapp --type rest --docker
2. Add Features Incrementally

Navigate to your project directory and add what you need:

cd myapp
goboot add db --type postgres
goboot add observability
goboot add k8s

Core Commands

goboot new

Scaffold a new project from scratch.

  • Types: rest, grpc, cli, worker.
  • Flags: --docker, --db, --auth, --ci, --observability.
goboot add

Enhance an existing project with new capabilities.

  • add db: Supports postgres, mysql, mongo.
  • add auth: Adds JWT middleware (REST).
  • add gateway: Adds gRPC-Gateway (gRPC).
  • add observability: Adds OTel + Prometheus + Structured Logging.
  • add k8s: Generates Deployment, Service, and ConfigMap.
  • add ci: Generates GitHub Actions workflows.
  • add test: Adds testify scaffolds.
  • add remote: Pulls templates from a remote Git URL.
goboot doctor

Checks the health of your project, validates config.yaml, go.mod, and checks for production best practices.

goboot upgrade

Checks if your project templates are out of date and suggests a migration plan.


Project Structure (Generated)

A typical goboot project follows a clean architecture:

myapp/
β”œβ”€β”€ cmd/                # Entry points (api, grpc, cli, worker)
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ config/         # Configuration loading
β”‚   β”œβ”€β”€ server/         # Server setup (HTTP/gRPC)
β”‚   β”œβ”€β”€ service/        # Business logic
β”‚   β”œβ”€β”€ db/             # Database connections (if added)
β”‚   └── observability/  # OTel & Metrics (if added)
β”œβ”€β”€ k8s/                # Kubernetes manifests (if added)
β”œβ”€β”€ config.yaml         # Application configuration
β”œβ”€β”€ Dockerfile          # Multi-stage production build
└── go.mod              # Module definition

Production Readiness Checklist

  • Observability: Enable observability.enabled: true in config.yaml.
  • Security: Review Dockerfile and K8s security contexts.
  • Resources: Tune CPU/Memory limits in k8s/deployment.yaml.
  • Secrets: Move sensitive data from ConfigMap to K8s Secrets.

License

MIT Β© codewithme224

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL