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
10 changes: 10 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ preserve unrelated work, and follow [CONTRIBUTING.md](CONTRIBUTING.md).
from a clean library checkout, use `python3 tools/vendor-library.py /path/to/TendUI`
and commit all resulting metadata and vendor changes together.

## Repository identity

- Present this repository as the source for **tendui.com**, with website-specific
README artwork and contributor instructions distinct from the component library.
- Public product, installation and source links must point to
`https://github.com/Tend-Stack/TendUI`. Reserve links to this repository for
clearly labeled website-maintainer instructions, issues and deployment setup.
- Route component and library API changes to TendUI; keep the README focused on
running, maintaining and contributing to this website.

## Product rules

- Use TendUI components and semantic HTML. Keep the public site usable without
Expand Down
14 changes: 9 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Contributing to TendUI-web

Thank you for helping improve TendUI. Start with a bug, documentation fix,
accessibility improvement or an issue labeled `good first issue` or `help wanted`.
Discuss new components, public API changes, dependencies and large refactors in an
issue before implementation. A proposal should explain the use case, native HTML
semantics, keyboard behavior, narrow-screen behavior and alternatives considered.
This repository maintains **tendui.com**, the documentation and examples website.
Start with a guide correction, navigation fix, website accessibility improvement
or an issue labeled `good first issue` or `help wanted`.

For changes to components, semantic CSS, Go APIs or library behavior, contribute
to [TendUI](https://github.com/Tend-Stack/TendUI) instead. This website consumes
that library as a pinned dependency; do not edit its vendored copy here.
Discuss substantial website changes in an issue before implementation, including
keyboard behavior, narrow-screen behavior and the pages affected.

## Contribution terms: MIT + DCO

Expand Down
158 changes: 51 additions & 107 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,128 +1,72 @@
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/brand/readme-banner-dark.png">
<img src="docs/brand/readme-banner-light.png" alt="Tend UI — Modern UI for Go" width="1200">
</picture>

# The home of TendUI

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 TendUI’s typed `AppShell` and `Prose` components
with its embedded semantic stylesheet. Guide content uses Go HTML templates;
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 37-component reference under
`/catalog`, application examples under `/examples`, and native state/appearance
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 require no module-registry access. To refresh from a clean library checkout, run
`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.

[Visit tendui.com](https://tendui.com) · [Documentation](https://tendui.com/docs) · [Component catalog](https://tendui.com/catalog) · [Library source](https://github.com/Tend-Stack/TendUI)

## At a glance

| Surface | Purpose |
<a href="https://tendui.com">
<img src="docs/brand/website-banner.svg" alt="tendui.com — Website source. Documentation, examples and playground." width="1200">
</a>

# tendui.com · Website source

> **Looking for the component library?** Go to **[TendUI →](https://github.com/Tend-Stack/TendUI)** for installation, components, CSS and library contributions.

This repository builds and serves **[tendui.com](https://tendui.com)**: the public
documentation, component catalog, examples and playground for
[TendUI](https://github.com/Tend-Stack/TendUI). It is the website application;
it consumes a pinned release of the component library.

[Visit the website](https://tendui.com) · [Read the guides](https://tendui.com/docs) · [Explore the catalog](https://tendui.com/catalog)

## Work on the website

Use this repository for guide content, website navigation, site styling,
metadata, accessibility and deployment. Report website issues here. For component
behavior, CSS tokens, Go APIs or new components, use the
[TendUI library repository](https://github.com/Tend-Stack/TendUI).

| Website area | Where to work |
| --- | --- |
| Documentation | Go/templ and HTML quickstarts, theming, accessibility and agent setup. |
| Catalog | Component previews and downloadable recipes. |
| Playground | Native controls for states, appearance and interactions. |
| Deployment | One Go binary with embedded assets and vendored dependencies. |
| Guides and navigation | `content/`, `docs.go`, `docs.templ` |
| Homepage and shared header | `landing.templ`, `site_header.templ` |
| Website styles and artwork | `static/` |
| Routing, assets and metadata | `main.go`, `assets.go` |
| Library version used by the site | `library-version.json`, `go.mod`, `go.sum`, `vendor/` |

The catalog and runnable demos come from the library's example handler. Make
changes to those components in [TendUI](https://github.com/Tend-Stack/TendUI),
then update the website's pinned dependency.

## Run
## Run this site locally

Requires Go 1.26 or newer. Use a patched compiler for deployment.
Requires Go 1.26 or newer. Dependencies and generated templ output are committed;
normal builds need no Node.js, npm or template generation.

```sh
go run .
# Open http://localhost:8080
```

`PORT` defaults to `8080`. The server binds all interfaces, handles termination
signals gracefully, and exposes `GET /healthz` for health probes. Assets support
GET/HEAD and conditional requests. Unknown paths return 404.
`PORT` defaults to `8080`. Styles, images and guide content are embedded in the
website binary. No database or runtime asset downloads are required.

```sh
go test -race ./...
go vet ./...
CGO_ENABLED=0 go build -trimpath -o tendui-web .
./tendui-web -version
```

## Tend deployment

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
hook. Tend owns routing, TLS, the public domain, and deployment status.

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 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`.
Release/development builds should pass `git describe --tags --long --dirty` as
`VERSION` once tags exist. Before the first tag, `--always` provides the commit ID.

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 tendui.com;
`/sitemap.xml` lists the primary documentation and example routes.

## Scope

The site includes the guides, component catalog, live previews, downloads,
examples, and playground. Sample mutations update bounded browser cookies and
do not create real accounts or projects.
Links point to the project repositories; access follows their GitHub visibility.
There is no mailing-list form or unimplemented sign-up action.

MIT. See [LICENSE](LICENSE).

The server adds `Cache-Control: no-transform` while preserving each route's cache
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.
Template authors use the generator version recorded in `go.mod`. Browser test
tooling is development-only; see [CONTRIBUTING.md](CONTRIBUTING.md).

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
HTTP development keeps its original behavior.
## Maintain and deploy

Documentation shell source is `docs.templ`; generated `docs_templ.go` is committed.
After editing the shell, use templ v0.3.1100 to run `templ generate -f docs.templ`.
Normal builds need only Go. Website styles use content-hashed URLs; the library
stylesheet URL is tied to the vendored revision. This prevents cached landing-page
CSS from being reused after a documentation deployment, even when an edge proxy
sets a longer browser cache lifetime.
[Website maintenance guide](docs/maintaining-website.md) covers the pinned library,
Docker/Tend deployment, health probes, version metadata, proxy behavior and cache
policy. The repository-root `Dockerfile` builds the website application.

## Contributing
## Contribute to the site

See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, review and MIT + DCO sign-off.
Report vulnerabilities privately using [SECURITY.md](SECURITY.md); community
participation follows [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
Read [CONTRIBUTING.md](CONTRIBUTING.md), [AGENTS.md](AGENTS.md) and the
[code of conduct](CODE_OF_CONDUCT.md). Website contributions use MIT + DCO;
report vulnerabilities privately through [SECURITY.md](SECURITY.md).

## Coding agents
For a project that **uses the component library**, start with
[TendUI](https://github.com/Tend-Stack/TendUI) and its
[application agent guide](https://github.com/Tend-Stack/TendUI/blob/main/docs/agents.md).

Repository contributors should read [AGENTS.md](AGENTS.md); `CLAUDE.md` imports
the same instructions for Claude Code. For applications using TendUI, see
[the coding-agent guide](https://tendui.com/docs/agents) and merge its suggested
section into your own project instructions.
[MIT license](LICENSE) · [Website artwork provenance](docs/brand/README.md)
3 changes: 1 addition & 2 deletions content/agents.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ <h2>3. Give it a concrete task</h2>
<h2>Contributing to TendUI itself</h2>
<ul>
<li><a href="https://github.com/Tend-Stack/TendUI/blob/main/AGENTS.md">Library agent instructions</a>: components, semantic CSS, generated code, API compatibility and validation.</li>
<li><a href="https://github.com/Tend-Stack/TendUI-web/blob/main/AGENTS.md">Website agent instructions</a>: guide routes, shared header, pinned dependencies and deployment verification.</li>
<li><a href="https://github.com/Tend-Stack/TendUI/blob/main/docs/agents.md">Application guidance in the repository</a>: a Markdown version of this setup.</li>
</ul>
<p>Both repositories include a <code>CLAUDE.md</code> import of their own <code>AGENTS.md</code>. AI-assisted contributions follow <a href="https://github.com/Tend-Stack/TendUI/blob/main/CONTRIBUTING.md">MIT + DCO contribution rules</a>: a human reviews, tests and authorizes their own sign-off.</p>
<p>The library repository includes a <code>CLAUDE.md</code> import of its <code>AGENTS.md</code>. AI-assisted contributions follow <a href="https://github.com/Tend-Stack/TendUI/blob/main/CONTRIBUTING.md">MIT + DCO contribution rules</a>: a human reviews, tests and authorizes their own sign-off.</p>
{{end}}
19 changes: 12 additions & 7 deletions docs/brand/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# TendUI website documentation artwork
# Website repository artwork

## README banners
[website-banner.svg](website-banner.svg) is an original vector composition for
this repository's README. Its browser-window layout and **WEBSITE SOURCE** label
identify **tendui.com**, distinct from the illustrated product banner in the
[TendUI component library](https://github.com/Tend-Stack/TendUI).

The light and dark README banners are copied unchanged from the owner-supplied
Tend UI Gopher Brand Kit. Source names, byte sizes and SHA-256 hashes are recorded
in [readme-banners.json](readme-banners.json). They are documentation assets and
are not embedded into the runtime stylesheet or website executable. The README
uses a `picture` element to follow the reader's preferred color scheme.
The banner uses the site's midnight and violet palette. It contains no external
images, fonts, scripts or remote resources. It scales without a raster download
and is documentation-only; it is not embedded in the website executable.

[website-banner.json](website-banner.json) records its purpose, size and SHA-256.
The supplied product artwork used by the live site retains its separate
[asset provenance](../brand-assets.md).
Binary file removed docs/brand/readme-banner-dark.png
Binary file not shown.
Binary file removed docs/brand/readme-banner-light.png
Binary file not shown.
16 changes: 0 additions & 16 deletions docs/brand/readme-banners.json

This file was deleted.

9 changes: 9 additions & 0 deletions docs/brand/website-banner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"file": "website-banner.svg",
"type": "original vector composition",
"purpose": "Identify the tendui.com website repository separately from the component library",
"design": "Browser-window illustration and website-specific labels, using the established midnight and violet palette",
"external_assets": [],
"sha256": "7017b25b23b1a5653aabcc1e53d832035008640bf2935c2ad0665b58a10408c5",
"bytes": 3347
}
46 changes: 46 additions & 0 deletions docs/brand/website-banner.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading