gitmyhub

go-blueprint

Go ★ 8.9k updated 1mo ago

Go-blueprint allows users to spin up a quick Go project using a popular framework

A command-line tool that generates a ready-to-build Go web application with your chosen framework and database driver in seconds, with optional Docker, GitHub Actions, HTMX, and React frontend scaffolding.

GoGinFiberChiEchoPostgreSQLMySQLSQLitesetup: easycomplexity 2/5

Go Blueprint is a command-line tool that generates a ready-to-use Go project structure for you. Instead of setting up a new Go web application from scratch, you run a single command and the tool creates the folder layout, wires up your chosen web framework, and optionally connects a database driver. It is aimed at developers who want to start building immediately without spending time on boilerplate setup.

When creating a project, you choose from several popular Go web frameworks: Chi, Gin, Fiber, HttpRouter, Gorilla/mux, and Echo. For the database layer, you can select from MySQL, PostgreSQL, SQLite, MongoDB, Redis, or ScyllaDB. These choices can be made interactively through a terminal prompt or passed directly as command-line flags.

An optional advanced mode adds more pieces to the generated project. The available extras include HTMX for server-driven UI interactions, Tailwind CSS for styling, a WebSocket endpoint, Docker configuration, a GitHub Actions workflow for automated testing and deployment, and a React frontend written in TypeScript with an example request to the backend. You can combine any of these in one command.

There is also a web interface at go-blueprint.dev where you can configure your choices visually, preview the folder structure the tool will create, and generate the corresponding CLI command to copy and run.

Installation is available through Go's package installer, npm, or Homebrew. The project is licensed under the MIT license.

Where it fits