Skip to content

Repository files navigation

FastyGo Web

Public Go + templ welcome site for the FastyGo stack. UI is UI8Kit codegen in internal/kit/.

Module: github.com/fastygo/web

Routes: home (/) and about (/about). Both compose RootLayout + TopnavLayout. Mobile sheet, dark theme, and En/Ru locale switching live in the shell. Pages live in internal/views/; routing lives in internal/site/router.go.

What this repo is

Layer Location Role
Framework wiring internal/serverapp/, cmd/server/ Locales, security, site feature, dev overlay
Kit (atoms) internal/kit/ UI8Kit codegen primitives + utils
UI registry internal/ui/ Layout shells, components, blocks
Pages internal/views/ Route bodies — compose layout + blocks only
Copy & i18n internal/fixtures/locale/ Embedded En/Ru strings
Project docs .project/ Architecture, retag, ADRs
Dev tooling fastygo.config.mjs, scripts/ CSS/retag/JS — not routes

Prerequisites

  • Go 1.25+
  • Bun (CSS build + config helpers)
  • templ CLI (go tool templ / templ generate)

Quick start

bun install
go mod download
bun run dev

Open http://127.0.0.1:3000/ — welcome hero. About: http://127.0.0.1:3000/about.

bun run dev builds CSS/JS/overlay, then scripts/dev.sh (templ generate + go run ./cmd/server). After .templ edits run bun run templ (or restart). After Tailwind class changes run bun run build:css. Ctrl+C stops the server.

Tooling SoT: fastygo.config.mjs (registry, retag, css). Go does not load it.

Scripts

Command Purpose
bun run dev / g CSS + JS + overlay + Go server
bun run build:css Tailwind via config paths
bun run retag Zoned raw-HTML ratchet
bun run test Retag + go test ./...
bun run verify templ + CSS + JS + retag + tests
bun run config Dump tooling config JSON

For React developers

See docs/for-react-devs.md. Maintainer docs: .project/ and docs/architecture.md.

Environment

Variable Default Purpose
APP_BIND 0.0.0.0:3000 HTTP listen address
APP_DEV_OVERLAY 1 in local dev via config Dev status overlay (loopback only)
APP_STATIC_DIR static Static files under /static/
APP_DEFAULT_LOCALE en Default locale
APP_AVAILABLE_LOCALES en,ru Header locale switcher

Probes: GET /healthz and GET /readyz.

Project layout

Path Role
fastygo.config.mjs Tooling SoT: server, css, registry, retag
internal/kit/ UI8Kit atoms (ui/*) + utils
internal/ui/ Registry — layout / components / blocks / widgets
internal/views/ Thin page composition
internal/site/ Runtime route manifest
internal/fixtures/locale/ UI copy per locale
static/css/ tokens.css + theme-blank.css
.project/ Architecture, retag, ADRs

Retag

Composition layers must not own raw HTML. See .project/retag.md and run bun run retag.

Dev overlay

When APP_DEV_OVERLAY=1 on loopback, the app injects a viewport-gated status overlay. Details: internal/devoverlay/README.md.

Adding a page

  1. Add copy to fixtures + every internal/fixtures/locale/*.json file.
  2. Add internal/views/<page>.templ composing @layout.RootLayout + a shell layout + blocks.
  3. Add one PageSpec in internal/site/router.go.
  4. Run bun run verify before landing.

License

MIT — see LICENSE. Copyright (c) 2026 FastyGo.

Depends on a-h/templ, github.com/fastygo/framework; UI8Kit atoms live in-repo under internal/kit.

About

Public Go + templ welcome site for the FastyGo stack. UI is UI8Kit codegen in internal/kit/

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages