MCPcopy Index your code
hub / github.com/Melkeydev/go-blueprint

github.com/Melkeydev/go-blueprint @v0.10.11 sqlite

repository ↗ · DeepWiki ↗ · release v0.10.11 ↗
232 symbols 422 edges 40 files 53 documented · 23%
README

logo

Introducing the Ultimate Golang Blueprint Library

Go Blueprint is a CLI tool that allows users to spin up a Go project with the corresponding structure seamlessly. It also gives the option to integrate with one of the more popular Go frameworks (and the list is growing with new features)!

Why Would I use this?

  • Easy to set up and install
  • Have the entire Go structure already established
  • Setting up a Go HTTP server (or Fasthttp with Fiber)
  • Integrate with a popular frameworks
  • Focus on the actual code of your application

Table of Contents

Install

go install github.com/melkeydev/go-blueprint@latest

This installs a go binary that will automatically bind to your $GOPATH

if you’re using Zsh, you’ll need to add it manually to ~/.zshrc.

GOPATH=$HOME/go  PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

don't forget to update

source ~/.zshrc

Then in a new terminal run:

go-blueprint create

You can also use the provided flags to set up a project without interacting with the UI.

go-blueprint create --name my-project --framework gin --driver postgres --git commit

See go-blueprint create -h for all the options and shorthands.

Frameworks Supported

Database Support

Go Blueprint now offers enhanced database support, allowing you to choose your preferred database driver during project setup. Use the --driver or -d flag to specify the database driver you want to integrate into your project.

Supported Database Drivers

Choose from a variety of supported database drivers:

Advanced Features

Blueprint is focused on being as minimalistic as possible. That being said, we wanted to offer the ability to add other features people may want without bloating the overall experience.

You can now use the --advanced flag when running the create command to get access to the following features. This is a multi-option prompt; one or more features can be used at the same time:

  • HTMX support using Templ
  • CI/CD workflow setup using Github Actions
  • Websocket sets up a websocket endpoint
  • Tailwind css framework
  • Docker configuration for go project
  • React frontend written in TypeScript, including an example fetch request to the backend

Note: Selecting Tailwind option will automatically select HTMX unless React is explicitly selected

Blueprint UI

Blueprint UI is a web application that allows you to create commands for the CLI and preview the structure of your project. You will be able to see directories and files that will be created upon command execution. Check it out at go-blueprint.dev

Usage Example

Here's an example of setting up a project with a specific database driver:

go-blueprint create --name my-project --framework gin --driver postgres --git commit

Starter Image

Advanced features are accessible with the --advanced flag

go-blueprint create --advanced

Advanced features can be enabled using the --feature flag along with the --advanced flag.

HTMX:

go-blueprint create --advanced --feature htmx

CI/CD workflow:

go-blueprint create --advanced --feature githubaction

Websocket:

go-blueprint create --advanced --feature websocket

Tailwind:

go-blueprint create --advanced --feature tailwind

Docker:

go-blueprint create --advanced --feature docker

React:

go-blueprint create --advanced --feature react

Or all features at once:

go-blueprint create --name my-project --framework chi --driver mysql --advanced --feature htmx --feature githubaction --feature websocket --feature tailwind --feature docker --git commit --feature react

Advanced Options

Visit documentation to learn more about blueprint and its features.

GitHub Stats

Alt

License

Licensed under MIT License

Extension points exported contracts — how you extend this code

Templater (Interface)
A Templater has the methods that help build the files in the Project folder, and is specific to a Framework [7 implementers]
cmd/program/program.go
DBDriverTemplater (Interface)
(no doc) [6 implementers]
cmd/program/program.go
DockerTemplater (Interface)
(no doc) [5 implementers]
cmd/program/program.go
WorkflowTemplater (Interface)
(no doc)
cmd/program/program.go

Core symbols most depended-on inside this repo

String
called by 21
cmd/flags/git.go
CreateErrorInputModel
called by 12
cmd/ui/textinput/textinput.go
CreateFileWithInjection
called by 12
cmd/program/program.go
Err
called by 11
cmd/ui/textinput/textinput.go
ExecuteCmd
called by 8
cmd/utils/utils.go
GoGetPackage
called by 6
cmd/utils/utils.go
StdLibWebsocketTemplImportsTemplate
called by 6
cmd/template/advanced/routes.go
GetRootDir
called by 5
cmd/utils/utils.go

Shape

Method 125
Function 63
Struct 34
TypeAlias 6
Interface 4

Languages

Go100%

Modules by API surface

cmd/program/program.go35 symbols
cmd/template/advanced/routes.go25 symbols
cmd/utils/utils.go11 symbols
cmd/ui/textinput/textinput.go11 symbols
cmd/template/framework/routerRoutes.go8 symbols
cmd/template/framework/httpRoutes.go8 symbols
cmd/template/framework/gorillaRoutes.go8 symbols
cmd/template/framework/ginRoutes.go8 symbols
cmd/template/framework/fiberServer.go8 symbols
cmd/template/framework/echoRoutes.go8 symbols
cmd/template/framework/chiRoutes.go8 symbols
cmd/ui/multiSelect/multiSelect.go7 symbols

Dependencies from manifests, versioned

github.com/atotto/clipboardv0.1.4 · 1×
github.com/aymanbagabas/go-osc52/v2v2.0.1 · 1×
github.com/containerd/consolev1.0.4-0.20230313162 · 1×
github.com/inconshreveable/mousetrapv1.1.0 · 1×
github.com/lucasb-eyer/go-colorfulv1.2.0 · 1×
github.com/mattn/go-isattyv0.0.18 · 1×
github.com/mattn/go-localereaderv0.0.1 · 1×
github.com/mattn/go-runewidthv0.0.15 · 1×
github.com/muesli/ansiv0.0.0-2021101807403 · 1×

Datastores touched

(mysql)Database · 1 repos

For agents

$ claude mcp add go-blueprint \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact