The Hypermedia App

The server-rendered application framework for Bun. Write .htx templates, query SQLite, return HTML. No build step. No client-side framework.

Open source · MIT License · Runs on a Raspberry Pi

# Create a new app in 30 seconds
bun create hypermedia-app my-app
cd my-app
bun run dev
850
req/sec on a Pi 5 at 1M rows *
142x
faster than WordPress *
5.3x
faster than Next.js SSR *
<2ms
page render latency *

Bun + SQLite Native

Bun's native SQLite driver with zero FFI overhead. WAL mode for concurrent reads. No external database server — your data lives in a single file.

HTX Template Engine

Server-side .htx templates with declarative data queries, computed properties, component composition, layout inheritance, and expression evaluation.

htmx Integration

Server returns HTML fragments, htmx swaps them in. No JSON serialization, no client-side rendering, no SPA complexity. Progressive enhancement built in.

Action Tokens

JWT-based prepare/execute CSRF protection. One-time tokens, replay guard, record scoping, expiration. Security without sessions.

Markdown Adapter

Serve documentation from flat .md files with YAML frontmatter. Zero-config content authoring — write markdown, see it rendered.

CLI + Scaffolding

bun create hypermedia-app scaffolds a full project. Dev server with diagnostics. Showcase and minimal variants.

How It Works

HTTP Request
File Router
.htx Template
SQLite Query
HTML Response

No compilation. No virtual DOM. No hydration. Templates go in, HTML comes out.


From the Blog

Engineering notes, benchmarks, and build logs.

850 req/sec from a Million-Row Database on a Raspberry Pi

Full e-commerce benchmark on a Raspberry Pi 5: 41 relational queries at 24 req/sec, 1,298 req/sec for the cart, 281 for product pages. Compared against WooCommerce (5,000+ queries per page), Magento, Medusa, Next.js, and NextFaster ($513/month with no published benchmarks).