Skip to content

feat(docs): query-builder playground page + live SDK examples woven into doc pages #286

Description

@EricAndrechek

Why

The landing hero now embeds the live demo (LiveDemo.astro: real counts + SSE feed from stats.wavehouse.dev via @wavehouse/sdk in the browser). Direction from Eric: next step is letting visitors drive the query builder themselves, woven into the docs — not just watch it.

What

Roughly in order of value:

  1. /playground docs page — an interactive structured-query builder against the live gh_events table (public read-only role at stats.wavehouse.dev):
    • column picker, filter rows (column/op/value), aggregations + group-by, order/limit, time range
    • Run button → results table (and the raw JSON AST)
    • a "generated code" panel showing the equivalent @wavehouse/sdk chain for copy-paste
  2. Live examples embedded in doc pages — e.g. sdk.md / api.md code blocks gain a "Run it" affordance that executes the snippet against the demo instance and renders the rows inline, where relevant.
  3. Later / maybe: a mini one-line query builder in the landing hero itself.

Building blocks already in place (this branch / the LiveDemo PR)

  • @wavehouse/sdk is a docs workspace dep; check-docs/dev-docs build it first
  • LiveDemo.astro shows the patterns: module-script island, init/teardown for Astro view transitions, is:global styles for runtime-created DOM, graceful-degradation skeleton
  • Public endpoint verified: CORS *, public role row caps + timeouts, pipes cached (X-Cache)
  • Curated/cheaper data endpoints tracked in Wave-RF/WaveHouse-Stats#18 / Implement Trace Context Propagation over NATS #19; capacity in Bridge Bento Processing into Distributed Traces #20

Notes

  • Playground queries are user-authored → they bypass pipe caching; the public role's row cap (5000) + 3s timeout are load-bearing here. Coordinate with WaveHouse-Stats#20 on rate limits before promoting the page hard.
  • Keep the playground a normal docs page (sidebar entry), landing page links to it.

Metadata

Metadata

Assignees

Labels

area/docsDocumentation, site/, READMEarea/sdkTypeScript SDK (clients/ts/)documentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions