Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.git
.github
tests
gothui-web
tendui-web
*_test.go
README.md
6 changes: 3 additions & 3 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ jobs:
- name: Vet
run: go vet ./...
- name: Build deployment image
run: docker build --build-arg VERSION="$(git describe --tags --long --dirty --always)" -t gothui-web:ci .
run: docker build --build-arg VERSION="$(git describe --tags --long --dirty --always)" -t tendui-web:ci .
- name: Smoke-test the deployed image
run: |
docker run --detach --name gothui-web-ci -p 127.0.0.1:8080:8080 gothui-web:ci
trap 'docker logs gothui-web-ci; docker rm -f gothui-web-ci' EXIT
docker run --detach --name tendui-web-ci -p 127.0.0.1:8080:8080 tendui-web:ci
trap 'docker logs tendui-web-ci; docker rm -f tendui-web-ci' EXIT
curl --fail --max-time 5 --retry 10 --retry-all-errors --retry-delay 1 --retry-max-time 20 http://127.0.0.1:8080/healthz
curl --fail http://127.0.0.1:8080/ | grep -F 'Start building'
curl --fail http://127.0.0.1:8080/site.css > /dev/null
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/tests/results/*
!/tests/results/.gitkeep
/gothui-web
/tendui-web

/tests/browser/node_modules/
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ FROM golang:1.27.3-alpine AS build
WORKDIR /src
COPY go.mod go.sum ./
COPY vendor ./vendor
COPY main.go docs.go docs_templ.go assets.go brand.go ./
COPY *.go ./
COPY static ./static
COPY content ./content
COPY library-version.json ./
ARG VERSION=2026.1.0-dev
RUN CGO_ENABLED=0 GOPROXY=off go build -mod=vendor -trimpath -ldflags="-s -w -X main.version=${VERSION}" -o /gothui-web .
RUN CGO_ENABLED=0 GOPROXY=off go build -mod=vendor -trimpath -ldflags="-s -w -X main.version=${VERSION}" -o /tendui-web .

FROM scratch
COPY --from=build /gothui-web /gothui-web
COPY --from=build /tendui-web /tendui-web
USER 65532:65532
ENV PORT=8080
EXPOSE 8080
ENTRYPOINT ["/gothui-web"]
ENTRYPOINT ["/tendui-web"]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2026 GothUI contributors
Copyright (c) 2026 TendUI contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
36 changes: 20 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
# GothUI Web
# TendUI Web

<img src="static/brand/logo-dark.svg" alt="GothUI" width="240">
<img src="static/brand/mascot.svg" alt="TendUI" width="112">

The documentation and examples website for [GothUI](https://github.com/Tend-Stack/GothUI):
semantic CSS and typed templ components, embedded in your Go binary.
The documentation and examples website for [TendUI](https://github.com/Tend-Stack/TendUI):
beautiful interfaces with no frontend build pipeline. Pure CSS and semantic HTML
work with any stack; first-class Go and templ support embeds the stylesheet
inside your Go binary.

The documentation composes GothUI’s typed `AppShell` and `Prose` components
The documentation composes TendUI’s typed `AppShell` and `Prose` components
with its embedded semantic stylesheet. Guide content uses Go HTML templates;
the landing page retains its own branding. Catalogs and demos share GothUI’s
example handler. All assets are embedded. No Node, npm, JavaScript,
the landing page keeps its own hero styling. Every page, including the mounted
catalog and demos, renders one shared `SiteHeader` (`site_header.templ`) and
reads the same `tendui_theme` cookie, which defaults to dark. Catalogs and demos
share TendUI’s example handler through `site.HandlerWithOptions`. All assets are embedded. No Node, npm, JavaScript,
external fonts, tracking, database, or runtime downloads are required to build or
serve it. The test-only browser suite is separate from the shipped application.

Documentation lives under `/docs`, the searchable 36-component reference under
`/catalog`, application examples under `/examples`, and native state/appearance
controls under `/playground`. The public canonical origin is https://gothui.com.
controls under `/playground`. The public canonical origin is https://tendui.com.

The library and templ runtime are vendored at the exact revision recorded in
`library-version.json`. Docker builds use `GOPROXY=off` and need no private-repo
credentials. To refresh from a clean library checkout, run
`python3 tools/vendor-library.py /path/to/GothUI`. This uses the local Go module
`python3 tools/vendor-library.py /path/to/TendUI`. This uses the local Go module
cache for already-downloaded dependencies, records a tag or exact pseudo-version,
and removes its temporary proxy and cache. Commit the resulting module metadata,
manifest, and vendor directory together. No local `replace` ships in the repo.
Expand All @@ -40,13 +44,13 @@ GET/HEAD and conditional requests. Unknown paths return 404.
```sh
go test -race ./...
go vet ./...
CGO_ENABLED=0 go build -trimpath -o gothui-web .
./gothui-web -version
CGO_ENABLED=0 go build -trimpath -o tendui-web .
./tendui-web -version
```

## Tend deployment

Connect `https://github.com/Tend-Stack/GothUI-Web`, branch `main`, in Tend.
Connect `https://github.com/Tend-Stack/TendUI-web`, branch `main`, in Tend.
Select the repository-root `Dockerfile`, container port **8080**, and HTTP health
path **/healthz**. No secrets, volumes, or additional services are required.
Enable GitHub push deployments in Tend; this repository does not call a deploy
Expand All @@ -56,8 +60,8 @@ The image runs as a non-root user and contains only the static Go executable.
For a local container check:

```sh
docker build --build-arg VERSION="$(git describe --tags --long --dirty --always)" -t gothui-web .
docker run --rm -p 8080:8080 gothui-web
docker build --build-arg VERSION="$(git describe --tags --long --dirty --always)" -t tendui-web .
docker run --rm -p 8080:8080 tendui-web
```

Version lines use `YEAR.RELEASE.FIX`, initially `2026.1.0`; Git tags use `v2026.1.0`.
Expand All @@ -66,7 +70,7 @@ Release/development builds should pass `git describe --tags --long --dirty` as

GitHub Actions tests the HTTP contract, runs vet, and builds the Dockerfile.
Tend may deploy independently of CI; check both statuses after publication.
The documentation and homepage include canonical metadata for gothui.com;
The documentation and homepage include canonical metadata for tendui.com;
`/sitemap.xml` lists the primary documentation and example routes.

## Scope
Expand All @@ -84,7 +88,7 @@ policy. This keeps proxies from rewriting versioned Go commands as email links
or injecting email-decoding scripts. Production smoke checks must inspect the
actual HTML through the public domain as well as the origin/container response.

For the fixed public host `gothui.com`, Tend terminates HTTPS before forwarding
For the fixed public host `tendui.com`, Tend terminates HTTPS before forwarding
HTTP to the container. The website adapts validated presentation URLs for the
shared demo handler and marks its cookies Secure. It preserves Origin-based
request protection and does not trust arbitrary forwarded headers. Localhost
Expand Down
3 changes: 2 additions & 1 deletion assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ func assetURL(name, source string) string {

var siteStylesheetURL = assetURL("site", "static/site.css")
var docsStylesheetURL = assetURL("docs", "static/docs.css")
var libraryStylesheetURL = assetURL("gothui", "library-version.json")
var headerStylesheetURL = assetURL("header", "static/header.css")
var libraryStylesheetURL = assetURL("tendui", "library-version.json")

// Resolve artwork references before hashing CSS or HTML so a brand update also
// changes the referring stylesheet URL. Friendly image URLs remain downloadable.
Expand Down
2 changes: 1 addition & 1 deletion content/accessibility.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ <h2>Test the complete workflow</h2><ul><li>Navigate with Tab, Shift+Tab, Enter,
<h2>Native overlays and fallbacks</h2><p>Dialog, Popover, and grouped disclosures depend on browser capabilities. Include ordinary-page or inline alternatives where needed. The <a href="/interactions">interactions example</a> demonstrates the native controls and fallback paths.</p>
<h2>Motion without dependency</h2><p>Entrances are short and finite. Reduced-motion preferences disable decoration without removing the content. Avoid using animation alone to communicate success, failure, or progress.</p>
<h2>Evidence and limits</h2><p>Go tests verify output contracts and source-color contrast. Browser automation checks representative flows and accessibility rules. Neither proves accessibility conformance or screen-reader usability for every application. Review your assembled interface with the assistive technologies you support.</p>
<p>Release review tracks keyboard, mobile layout, reduced motion, forced colors, print, and optional HTMX separately. See <a href="https://github.com/Tend-Stack/GothUI/blob/main/docs/accessibility.md">the current accessibility evidence</a> for scope and outstanding checks.</p>
<p>Release review tracks keyboard, mobile layout, reduced motion, forced colors, print, and optional HTMX separately. See <a href="https://github.com/Tend-Stack/TendUI/blob/main/docs/accessibility.md">the current accessibility evidence</a> for scope and outstanding checks.</p>
{{end}}
6 changes: 3 additions & 3 deletions content/deploy.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{define "body"}}
<h2>Build once</h2><pre tabindex="0" aria-label="Build commands"><code>templ generate
CGO_ENABLED=0 go build -trimpath -o app .</code></pre><p>Generate your application’s templ files before the Go build. GothUI’s component Go is already included in the module. The executable contains the stylesheet; no asset directory or frontend toolchain is required at runtime.</p>
<h2>Serve the asset route</h2><p>Keep <code>/gothui/static/</code> mapped to <code>gothui.AssetHandler()</code>. The handler supplies content-derived ETags and conditional requests. Do not put authenticated user data into shared public caches.</p>
CGO_ENABLED=0 go build -trimpath -o app .</code></pre><p>Generate your application’s templ files before the Go build. TendUI’s component Go is already included in the module. The executable contains the stylesheet; no asset directory or frontend toolchain is required at runtime.</p>
<h2>Serve the asset route</h2><p>Keep <code>/tendui/static/</code> mapped to <code>tendui.AssetHandler()</code>. The handler supplies content-derived ETags and conditional requests. Do not put authenticated user data into shared public caches.</p>
<h2>Own the HTTP server</h2><p>Use timeouts, request-size limits, graceful shutdown, health probes, and your platform’s TLS routing. If a proxy terminates TLS, trust forwarded headers only from that proxy. Set cookies and cross-origin protection according to your deployment.</p>
<h2>This website</h2><p>GothUI’s site uses a non-root container built from Go. Tend deploys the GitHub <code>main</code> branch using the root Dockerfile, port <code>8080</code>, and health endpoint <code>/healthz</code>. Documentation, examples, and assets ship together.</p>
<h2>This website</h2><p>TendUI’s site uses a non-root container built from Go. Tend deploys the GitHub <code>main</code> branch using the root Dockerfile, port <code>8080</code>, and health endpoint <code>/healthz</code>. Documentation, examples, and assets ship together.</p>
<h2>Version the artifact</h2><p>Use <code>git describe --tags --long --dirty</code> for development builds after the first tag, and record the exact source revision for deployed artifacts. A green build proves the checks that ran; verify the actual public site and workflows after deployment.</p>
{{end}}
2 changes: 1 addition & 1 deletion content/examples.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{define "body"}}
<section class="example-section" aria-labelledby="examples-0"><h2 id="examples-0">Explore the building blocks</h2><div class="example-directory">
<article><h3>Component playground</h3><p>Switch themes, variants and input states, then test your own combinations.</p><a class="example-link" href="/playground">Open playground <span aria-hidden="true">→</span></a></article>
<article><h3>Component catalog</h3><p>Search all 36 components, try a compiled preview and download its templ source.</p><a class="example-link" href="/catalog">Browse components <span aria-hidden="true">→</span></a></article>
<article><h3>Component catalog</h3><p>Search all 37 components, try a compiled preview and download its templ source.</p><a class="example-link" href="/catalog">Browse components <span aria-hidden="true">→</span></a></article>
<article><h3>Appearance studio</h3><p>Preview settings and export matching CSS overrides or Go configuration.</p><a class="example-link" href="/settings">Customize appearance <span aria-hidden="true">→</span></a></article>
<article><h3>Motion & surfaces</h3><p>Compare bounded entrances, elevation and reduced-motion behavior.</p><a class="example-link" href="/motion">Explore motion <span aria-hidden="true">→</span></a></article>
</div></section>
Expand Down
2 changes: 1 addition & 1 deletion content/htmx.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{define "body"}}
<h2>Optional means application-owned</h2><p>GothUI emits HTMX attributes but does not bundle HTMX or any other JavaScript. This website’s public demos work with native HTML. In an enhanced app, load your own pinned, locally served HTMX runtime and use an appropriate Content Security Policy.</p>
<h2>Optional means application-owned</h2><p>TendUI emits HTMX attributes but does not bundle HTMX or any other JavaScript. This website’s public demos work with native HTML. In an enhanced app, load your own pinned, locally served HTMX runtime and use an appropriate Content Security Policy.</p>
<pre tabindex="0" aria-label="HTMX button configuration"><code>components.ButtonProps{
Text: "Load details",
Type: components.ButtonTypeButton,
Expand Down
18 changes: 9 additions & 9 deletions content/install.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{{define "body"}}
<h2>1. Add the module</h2>
<p>Use Go 1.26 or newer. Choose a patched compiler for deployed applications. Install the first stable release:</p>
<p>Use Go 1.26 or newer. Choose a patched compiler for deployed applications. Install the TendUI development branch while the renamed release is being prepared:</p>
<pre tabindex="0" aria-label="Install dependencies"><code>go mod init example.com/myapp
go get github.com/Tend-Stack/GothUI/v2026@v2026.1.0
go get github.com/Tend-Stack/TendUI/v2026@main
go install github.com/a-h/templ/cmd/templ@v0.3.1100</code></pre>
<p>The repository currently requires GitHub access. For private-module downloads, configure your normal Git credentials and <code>GOPRIVATE=github.com/Tend-Stack/GothUI</code>. Never put credentials in source or import URLs.</p>
<p>The repository currently requires GitHub access. For private-module downloads, configure your normal Git credentials and <code>GOPRIVATE=github.com/Tend-Stack/TendUI</code>. Never put credentials in source or import URLs.</p>
<h2>2. Create a page</h2><p>Save this as <code>page.templ</code>. Go structs configure the component; ordinary HTML supplies the content.</p>
<pre tabindex="0" aria-label="Templ page example"><code>package main

import "github.com/Tend-Stack/GothUI/v2026/components"
import "github.com/Tend-Stack/TendUI/v2026/components"

templ page() {
@components.Layout(components.LayoutProps{
Title: "My GothUI app",
Title: "My TendUI app",
Language: "en",
Theme: components.ThemeSystem,
}, body())
}

templ body() {
&lt;main&gt;
&lt;h1&gt;Hello, GothUI.&lt;/h1&gt;
&lt;h1&gt;Hello, TendUI.&lt;/h1&gt;
@components.Card(components.CardProps{}) {
&lt;p&gt;A little less setup. A little more making.&lt;/p&gt;
}
Expand All @@ -34,13 +34,13 @@ <h2>3. Serve the page and stylesheet</h2><p>Save this as <code>main.go</code>. T
"net/http"
"time"

"github.com/Tend-Stack/GothUI/v2026"
"github.com/Tend-Stack/TendUI/v2026"
"github.com/a-h/templ"
)

func main() {
mux := http.NewServeMux()
mux.Handle(gothui.AssetPath, gothui.AssetHandler())
mux.Handle(tendui.AssetPath, tendui.AssetHandler())
mux.Handle("GET /{$}", templ.Handler(page()))
server := &amp;http.Server{
Addr: ":8080", Handler: mux,
Expand All @@ -50,5 +50,5 @@ <h2>3. Serve the page and stylesheet</h2><p>Save this as <code>main.go</code>. T
}</code></pre>
<h2>4. Generate and run</h2><pre tabindex="0" aria-label="Generate and run commands"><code>templ generate
go run .</code></pre><p>Open <code>http://localhost:8080</code>. To ship the app, run <code>go build</code>. Your generated Go and embedded CSS become one executable.</p>
<h2>Versioning</h2><p>Releases use <code>YEAR.RELEASE.FIX</code>, starting with <code>v2026.1.0</code>. The module suffix <code>/v2026</code> follows Go’s major-version rules. Fixes on this line retain the suffix.</p>
<h2>Versioning</h2><p>Releases use <code>YEAR.RELEASE.FIX</code>, using tags such as <code>v2026.2.0</code>. Existing pre-rename tags retain their original module path; use <code>@main</code> for TendUI until its first renamed release. The module suffix <code>/v2026</code> follows Go’s major-version rules. Fixes on this line retain the suffix.</p>
{{end}}
Loading