--- name: edge-stack description: | Modern edge-native web stack: Hono + htmx + UnoCSS + Cloudflare D1. Use when: building server-rendered apps with interactivity, rapid prototyping, CRUD apps, landing pages, marketplaces. Zero cold start, global edge deployment, $0/month on CF free tier. TypeScript alternative to Rust/Axum + htmx stack. --- # Edge Stack Ultra-fast edge-native web development: **Hono + htmx + UnoCSS + D1** ## Stack Overview | Layer | Tool | Why | |-------|------|-----| | Framework | Hono | Ultra-fast, TypeScript, JSX support | | Interactivity | htmx | Server-rendered, 14kb, no build step | | Styling | UnoCSS | Tailwind-compatible, instant builds | | Database | Cloudflare D1 | SQLite on edge, free tier | | Deploy | CF Workers/Pages | Global edge, zero cold start | ## Quick Start ```bash # Create project pnpm create hono@latest my-app # Select: cloudflare-workers cd my-app pnpm add htmx.org ``` ### wrangler.toml ```toml name = "my-app" compatibility_date = "2024-01-01" main = "src/index.ts" [[d1_databases]] binding = "DB" database_name = "my-db" database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ``` ### Basic App ```typescript import { Hono } from 'hono' import { html } from 'hono/html' type Bindings = { DB: D1Database } const app = new Hono<{ Bindings: Bindings }>() // Layout with htmx const Layout = ({ children }: { children: any }) => html`
${children} ` // Page with htmx interactivity app.get('/', (c) => { return c.html(