Status: current 0.x examples and recipes. This cookbook links to existing examples and reference pages instead of repeating the full learning path.
Run repository commands from the repository root unless a recipe says to cd
into an example directory.
Build a static page and component:
go run ./cmd/gowdk build --out /tmp/gowdk-build \
examples/pages/home.page.gwdk \
examples/pages/hero.cmp.gwdkBuild a dynamic SPA route declared with paths {}:
go run ./cmd/gowdk build --out /tmp/gowdk-dynamic-build \
examples/pages/blog-post.page.gwdkUse routing, language blocks, and examples/pages for the source contract.
Build source-level base components:
go run ./cmd/gowdk build --out /tmp/gowdk-base-components \
examples/components/base/*.gwdkBuild the component WASM island ABI example:
go run ./cmd/gowdk build --out /tmp/gowdk-wasm-island \
examples/components/wasm/*.gwdkBuild the persisted page-store example:
go run ./cmd/gowdk build --out /tmp/gowdk-store-persist \
examples/store-persist/shop.page.gwdk \
examples/store-persist/add-button.cmp.gwdk \
examples/store-persist/cart-badge.cmp.gwdkUse components, markup, examples/components, and examples/store-persist for supported component, client, and page-store behavior.
Build the endpoint cookbook:
cd examples/endpoints
make check
make routes
make buildUse actions, APIs, partials, and examples/endpoints for action redirects, validation fragments, JSON APIs, webhooks, and standalone fragments.
Build a simple generated SSR page:
go run ./cmd/gowdk build --ssr \
--out /tmp/gowdk-ssr-build \
--app /tmp/gowdk-ssr-app \
--bin /tmp/gowdk-ssr-site \
examples/ssr/simple-ssr.page.gwdkBuild the auth guard example:
cd examples/auth-guard
make check
make routes
make buildUse SSR, hybrid pages, guards, and examples/auth-guard for request-time page and route-gate behavior. Backend resource authorization remains app-owned Go code.
Build a page that calls imported Go from build {}:
go run ./cmd/gowdk build --out /tmp/gowdk-go-interop \
examples/go-interop/imported-build.page.gwdkBuild the command/query contract example:
go run ./cmd/gowdk build \
--config examples/contracts/gowdk.config.go \
--out /tmp/gowdk-contracts-build \
--app /tmp/gowdk-contracts-app \
--bin /tmp/gowdk-contracts-site \
examples/contracts/patients.page.gwdkUse Go interop, contracts, realtime, and examples/contracts for handler and contract registration patterns.
Build a configured stylesheet example:
go run ./cmd/gowdk build \
--config examples/css/gowdk.config.go \
--out /tmp/gowdk-css-build \
examples/css/styled.page.gwdkBuild the SEO addon example:
go run ./cmd/gowdk build \
--config examples/seo/gowdk.config.go \
--out /tmp/gowdk-seo-build \
examples/seo/*.gwdkUse CSS, images, SEO, and manifest for asset and metadata behavior.
Build a one-binary generated app:
go run ./cmd/gowdk build \
--out /tmp/gowdk-embed-build \
--app /tmp/gowdk-embed-app \
--bin /tmp/gowdk-embed-site \
examples/embed/site.page.gwdkEmit optional deployment recipe starters:
go run ./cmd/gowdk build \
--out /tmp/gowdk-build \
--app /tmp/gowdk-app \
--bin /tmp/gowdk-site \
--deploy-recipe systemd,caddy \
examples/pages/home.page.gwdk \
examples/pages/hero.cmp.gwdkUse deployment, testing, dev server, and security for current operations guidance.
Export an ordinary source project archive:
gowdk playground export --dir . --out /tmp/gowdk-project.zipUse playground onboarding and sandboxing for hosted execution constraints and export rules.
Use this table to find the maintained source for a recipe or gap. Current capability status belongs in product requirements, not in issue-state summaries inside the cookbook.
| Area | Owning source |
|---|---|
| Runnable recipes | This cookbook and the focused example directory |
| Example inventory and verification commands | Examples Index |
| Accepted language syntax and semantics | Language Index and Conformance Corpus |
| Commands, config, routing, runtime, and integrations | Reference Index |
| Compiler pipeline and generated artifacts | Compiler Index |
| Current capability maturity | Product Requirements |
| Dependency-aware future work | Product Roadmap |
| Architecture and implementation plans | Engineering Index |
| Production hardening and app-owned responsibilities | Security and Operations |
| Documentation rendering and authoring rules | Documentation Style |
When a recipe falls behind implementation, update the recipe, its example, and the owning contract in the same change. Issue links may provide traceability, but they must not be the only description of current behavior or remaining work.