Private single-user cabinet built on FastyGo Framework, Panel, and UI8Kit v0.4.0. This repository is a cloneable shell: admin layout (sidebar, mobile sheet, header, language and theme toggles), fixture authentication, and embedded locale JSON. Use it as a neutral starting point for a new cabinet.
- Go 1.25+
- Bun (for CSS build and
ui8px)
bun install
go mod download
bun run build:css
go tool templ generate ./...
export SESSION_KEY="replace-with-a-long-random-secret-at-least-32-chars"
bun run goUI8Kit static CSS/JS, theme scripts, and Google Sans (gfonts.css + fonts/google-sans/) are committed under web/static/.
bun run go runs scripts/run-server.mjs: the server always starts with the repository root as cwd (correct web/static), and Ctrl+C is forwarded to the Go process so the port is released.
Closing a browser tab does not stop an HTTP server. Stop the job in the terminal (Ctrl+C) or close the terminal panel; if the port stays busy, an old go process is still running (see troubleshooting below).
Open http://127.0.0.1:8080/ — you are redirected to /cabinet (or to login if not signed in). You can also open http://127.0.0.1:8080/cabinet/login directly.
- Email:
test@admin.dash - Password:
test
There is no SQLite and no server-side user database; credentials are fixed in code for this autonomous template.
| Variable | Default | Purpose |
|---|---|---|
APP_BIND |
127.0.0.1:8080 |
HTTP listen address |
APP_STATIC_DIR |
web/static when env omitted |
Static files under /static/. Framework’s built-in default points at a CMS-style folder; this app forces web/static whenever APP_STATIC_DIR is not set in the environment. Use an absolute path if you do not start the server from the repo root. |
SESSION_KEY |
dev-only fallback (logged) | HMAC secret for the session cookie |
APP_DEFAULT_LOCALE |
en |
Default locale |
APP_AVAILABLE_LOCALES |
en,ru |
Locales for the header switcher (query + cookie) |
Probes: GET /healthz and GET /readyz are registered in cmd/server/main.go.
Set SESSION_KEY to a long random value before any non-local use.
Another process (often a previous go run) is still bound to that port. Stop it or use another port:
export APP_BIND=127.0.0.1:8081
bun run goOn Windows, find and end the listener, for example: netstat -ano | findstr :8080 then taskkill /PID <pid> /F.
Run from the repo root (or use bun run go), run bun run build:css, and ensure web/static exists. See APP_STATIC_DIR in the table above.
| Path | Role |
|---|---|
cmd/server/main.go |
Composition root: config, locales, health, cabinet feature |
internal/cabinet/ |
HTTP routes: /cabinet, /cabinet/login, /cabinet/logout, /cabinet/sample (placeholder) |
internal/auth/ |
Cookie session + fixture login |
internal/paneldef/ |
panel.Panel descriptor (pages, nav metadata) |
internal/fixtures/locale/ |
Embedded JSON copy per locale |
internal/views/ |
templ pages, layout.templ (CabinetLayout + UI8Kit Shell), partials/account_menu.templ, and login_shell.go for marketing login shell |
internal/ui/elements/ |
Small reusable UI (e.g. elements/toggles language control) |
web/static/ |
app.css (Tailwind build), css/ui8kit/*, css/gfonts.css, fonts/google-sans/*, js/theme.js, js/ui8kit.js |
bun run verifyThis runs templ generate, Tailwind build, ui8px lint (policy under .ui8px/policy/), and go test ./....
- Copy the repository (or subtree:
cmd/server,internal/cabinet,internal/ui,internal/views,internal/paneldef,web/static,package.json,.ui8px). - Change the Go module path in
go.modand imports. - Extend
internal/paneldef/panel.gowith newpanel.Pageorpanel.Resourceentries; mirror each with a route handler ininternal/cabinet/feature.go. - Add or extend
templunderinternal/views/(and Tailwind@sourceinweb/static/css/input.cssfor new paths). - Replace fixture auth in
internal/auth/fixture.gowith your own policy when you outgrow the single-user model.
- Domain-specific pages and Panel resources wired to your product.
- Optional persistence or APIs as needed for your cabinet.
The .fastygo/ directory in some workspaces is reference-only and is not imported at runtime; this module builds standalone.