Skip to content

docs: HTMX example app demonstrating tavern features #128

Description

@catgoose

Summary

Create a working HTMX example application that demonstrates tavern's key features in a realistic setting. This serves as both documentation and a proof-of-concept for new users evaluating the library.

Proposed App

A live dashboard application (e.g., project management board, monitoring dashboard, or team activity feed) that showcases:

Core features:

  • Topic-based pub/sub with SSE streaming
  • Scoped subscriptions (per-user views)
  • OOB fragment swaps (Replace, Append, Delete)
  • Snapshot + delta streams (initial state + live updates)

Advanced features:

  • Topic groups (single SSE connection per page)
  • Reactive hooks (After hooks cascading updates across UI regions)
  • Mutation hooks (form submit triggers SSE updates to other viewers)
  • Subscriber filtering (role-based content)
  • TTL messages (toast notifications that auto-expire)
  • Presence tracking (who's viewing)
  • Adaptive backpressure (graceful degradation demo)
  • Batch publish (bulk actions updating multiple regions atomically)

Stack:

  • Go + net/http (or Echo)
  • HTMX with SSE extension
  • Minimal CSS (Pico, Simple.css, or similar)
  • No build step, no JS framework

Location

_examples/ directory in the repo. Self-contained with its own main.go and go.mod (or use the parent module).

Goals

  • New users can go run . and see tavern working in under 30 seconds
  • Each feature is demonstrated with inline comments explaining the pattern
  • Serves as a living integration test

Metadata

Metadata

Assignees

No one assigned

    Labels

    future featurePlanned for future development

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions