{{ define "demo_doc_start" }} {{ .Title }} {{ template "demo_nav" . }} {{ template "demo_app_shell" . }}
{{ end }} {{ define "demo_doc_end" }}
{{ end }} {{ define "demo_masthead" }}

{{ index . "label" }}

{{ index . "title" }}

{{ index . "lead" }}

{{ if index . "back_url" }}

{{ index . "back_text" }}

{{ end }} {{ if index . "links_html" }} {{ index . "links_html" }} {{ end }}
{{ end }} {{ define "demo_app_shell" }}

Demo Application Shell

Universal Operations Console

Reference shell for server-rendered Go web apps using shared design-code contracts.

ENV: demo DB: connected operator@demo · admin
{{ end }} {{ define "base.html" }} {{ template "demo_doc_start" . }}

Submodule-First Design Kit

{{ .Title }}

A universal design-code workspace for Go web applications: reusable rules, demo-first UI patterns, and canonical development contracts for AI-assisted implementation.

{{ range .Patterns }} {{ if .Link }} {{ .Name }} {{ end }} {{ end }}

Design Approach

Contract First

UI behavior is defined as explicit contracts (filters, pagination, modal steps, timeline grouping) before implementation details. Demo pages act as executable specs.

Server-Rendered by Default

Patterns target Go server-rendered apps first (net/http or Gin with templates). Interactivity is additive and must preserve deterministic URL/query contracts.

Reusable, Not Branded

Shared patterns standardize behavior and structure while leaving visual branding, domain terminology, and business logic to each host project.

Development Workflow Standard

1. Describe the contract

Update Bible + pattern contract first: routes, query params, states, edge cases, and UI semantics.

2. Implement in demo

Build the pattern in the demo app as a live reference page with realistic state transitions and test coverage.

3. Publish as bundle

Encode reusable docs and templates in the design kit and expose them as bundles for host repositories.

4. Apply in host repos

Use the sync workflow to plan and apply changes, then adapt domain-specific rules without breaking canonical UI contracts.

What the Demo Standardizes

URL-driven filters Server-side pagination Bulk selection semantics Modal state machines Import preview / confirm CSV export behavior Operator tooling dashboards Timeline card grouping Drilldown UX

Anti-Patterns (Do Not Implement)

Page-local filters on paginated tables

Do not filter only the currently rendered page slice. Filters must apply to the full dataset/query scope before pagination.

Nested modals

Do not open one modal from another modal. Use a single modal state machine with explicit stages (edit, confirm, done).

Implicit export scope

Do not export without clear scope selection when ambiguity exists (selected, filtered, all). Make the scope explicit in UI and request.

Undocumented UI contracts

Do not implement new interaction behavior without updating the design code (Bible, pattern contract, and demo reference page).

Bundles

healthz
{{ range .Bundles }}

{{ .Name }}

{{ .Status }}

{{ .Summary }}

{{ .Bundle }}

{{ if .Link }}

Open demo

{{ end }}
{{ end }}

Pattern Roadmap

{{ range .Patterns }}

{{ .Name }}

{{ .Status }}

{{ .Summary }}

{{ .Bundle }}

{{ end }}
{{ template "demo_doc_end" . }} {{ end }} {{ define "demo_nav" }} {{ end }} {{ define "table_pattern.html" }} {{ template "demo_doc_start" . }} {{ template "demo_masthead" (dict "label" "Pattern Demo" "title" .Title "lead" "Server-side filtering and pagination. Filters apply to the full dataset before pagination." "back_url" "/" "back_text" "← Back to catalog") }}

Filters

Reset

Canonical List Page

{{ if gt .Pager.TotalItems 0 }} Showing {{ .Pager.From }}–{{ .Pager.To }} of {{ .Pager.TotalItems }} {{ else }} Showing 0 of 0 {{ end }}
{{ if .Rows }} {{ range .Rows }} {{ end }} {{ else }} {{ end }}
ID Name Category Status Owner Updated
{{ .ID }} {{ .Name }} {{ .Category }} {{ .Status }} {{ .Owner }} {{ .Updated }}
No rows match current filters.
{{ if gt .Pager.TotalPages 1 }} {{ end }}
{{ template "demo_doc_end" . }} {{ end }}