Skip to content

6missedcalls/cobra-gin-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

cobra-gin-starter

A modern Go starter template that unifies a Cobra CLI, Gin-powered REST API, and Templ + HTMX + TailwindCSS (GoTTH) web frontend — all served together with a single command.

GitHub go.mod Go version Go Report Card GitHub License

Features

  • Cobra CLI – easy command creation and management.
  • Gin – high-performance HTTP web framework.
  • Swagger (gin-swagger) – live, auto-generated API documentation.
  • Templ – type-safe HTML templating in Go.
  • HTMX – minimal-JS interactivity using server responses.
  • TailwindCSS v4 – modern utility-first styling.
  • Unified Serve Command – run API + web UI with cobra-gin-starter serve.

Run Locally

Clone the project

  git clone https://github.com/6missedcalls/cobra-gin-starter.git

Go to the project directory

  cd cobra-gin-starter

Install dependencies

  go mod tidy
  bun install

Generate Templ Components & Build TailwindCSS

  templ generate
  bun run build:css

Start the server (development)

  go run main.go serve

Start the server (production)

  ./cobra-gin-starter serve

Tech Stack

Client: HTMX, Templ, TailwindCSS v4

Server: Go, Gin, gin-swagger

CLI: Cobra

Contributing

Contributions are always welcome!

See docs/contributing.md for ways to get started,

License

MIT

About

A full-stack Go boilerplate combining a Cobra CLI, Gin REST API, and Templ + HTMX + TailwindCSS frontend — all in one unified project.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors