Find a file
Philip Peterson 450d38c6da Extract shared site framework into internal/site and internal/component
Reduces sites/quintodrome and sites/hyper to their genuinely site-specific
parts: a Config (branding, GitHub repo, Linux download-format list),
classifyAsset, and landing-page content/mockup. Everything else — the HTTP
server, routes, release cache, update-check protocol, and page chrome —
now lives once in internal/site and internal/component.

The Linux format toggle's button list, order, and per-format arch
availability is now driven entirely by Config.LinuxFormats, reproducing
each site's current behavior as data (quintodrome shows Snap on both
arches; hyper hides it on arm64) rather than as forked logic. The one
deliberate behavior change: platformLabel's "linux-*" normalization
(previously only applied to linux-rpm on hyper's side) now applies to all
linux-* formats, fixing a cosmetic label bug on hyper's deb/pacman/flatpak
download rows ("linux-deb · x64.deb" -> "Linux · x64.deb").

Also unifies top-level tooling: a single SITE-parameterized Makefile and
Dockerfile, a single tailwind.config.js scanning internal/** and sites/**,
and a shared public/ with both product logos.

Verified: go build/vet/test pass for both sites, and `make dev
SITE=quintodrome` / `SITE=hyper` were run and curl-checked against /,
/download (including each site's Linux format toggle and arch-filtering),
and /api/update-check, matching pre-refactor behavior.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-26 03:55:36 -08:00
internal Extract shared site framework into internal/site and internal/component 2026-09-26 03:55:36 -08:00
public Extract shared site framework into internal/site and internal/component 2026-09-26 03:55:36 -08:00
scripts Refresh 2026-05-26 01:05:37 -07:00
sites Extract shared site framework into internal/site and internal/component 2026-09-26 03:55:36 -08:00
.gitignore initial commit 2026-05-25 22:40:39 -07:00
CLAUDE.md Extract shared site framework into internal/site and internal/component 2026-09-26 03:55:36 -08:00
Dockerfile Extract shared site framework into internal/site and internal/component 2026-09-26 03:55:36 -08:00
go.mod Fixes 2026-05-26 00:27:36 -07:00
go.sum Fixes 2026-05-26 00:27:36 -07:00
LICENSE initial commit 2026-05-25 22:40:39 -07:00
Makefile Extract shared site framework into internal/site and internal/component 2026-09-26 03:55:36 -08:00
package.json Extract shared site framework into internal/site and internal/component 2026-09-26 03:55:36 -08:00
README.md initial commit 2026-05-25 22:40:39 -07:00
tailwind.config.js Extract shared site framework into internal/site and internal/component 2026-09-26 03:55:36 -08:00

gomponents-starter-kit

Logo

GoDoc Go Go

A starter kit for building a web app with gomponents, HTMX, and TailwindCSS in Go.

Made with ✨sparkles✨ by maragu.

Does your company depend on this project? Contact me at markus@maragu.dk to discuss options for a one-time or recurring invoice to ensure its continued thriving.

Getting started

The easiest way to get started is to Use this template to create a new repository. Or you could clone this repository the traditional way:

git clone git@github.com:maragudk/gomponents-starter-kit.git your-app-name

After that, you can start the app with:

make start

If you make style changes, watch the CSS with:

make watch-css

You can run tests and linting with:

make test lint

Enabling TailwindCSS auto-complete in your IDE

TailwindCSS has auto-complete of classnames (and more) through IDE plugins.

After you've installed the TailwindCSS plugin for your IDE, it needs some configuration to work with gomponents. Here's the config for VS Code and JetBrains IDEs:

VSCode

Edit vscode-settings.json and add the following:

{
	"tailwindCSS.includeLanguages": {
		"go": "html",
	},
	"tailwindCSS.experimental.classRegex": [
		["Class(?:es)?[({]([^)}]*)[)}]", "[\"`]([^\"`]*)[\"`]"]
	],
}

See the official plugin page for more info

JetBrains/GoLand

Go to Settings -> Languages & Frameworks -> Style Sheets -> Tailwind CSS and add the following (don't delete the other config):

{
	"includeLanguages": {
		"go": "html"
	},
	"experimental": {
		"classRegex": [
			["Class(?:es)?[({]([^)}]*)[)}]", "[\"`]([^\"`]*)[\"`]"]
		]
	}
}

See the official plugin page for more info

Deploying

The CD workflow automatically builds a multi-platform Docker image and pushes it to the Github container registry GHCR.io, tagged with the commit hash as well as latest.

You can try building the image locally with:

make build-docker

Note that you need the containerd image store enabled for this to work.