How honojs/examples works
This repository is a collection of independent Hono examples, not one application. Users explore HTTP routing, CRUD, storage, authentication, JSX rendering, client/server APIs, and several deployment runtimes. The graph preserves those documented example branches; unsampled modules are represented by their exact tree paths, with uncertain wiring omitted.
Main entry points: App.tsx Auth and todo UI · src/index.ts Durable Object routes · src/index.ts Blog CRUD API · index.tsx JSX SSR routes
Components 30
HTTP examples
- Routing and middleware
basic/src/index.ts - Blog CRUD API
blog/src/index.ts - Blog API routes
blog/src/api.ts - Blog model
blog/src/model.ts - Static-file example
serve-static/src/index.ts
UI examples
- JSX SSR routes
jsx-ssr/src/index.tsx - Rendered pages
jsx-ssr/src/pages - JSX DOM client
hono-vite-jsx/src/client.tsx - JSX demo API
hono-vite-jsx/src/index.tsx - Pages React client
pages-stack/src/App.tsx - Pages API handler
pages-stack/functions/api/[[route]].ts - Next.js client
nextjs-stack/pages/index.tsx - Next.js API handler
nextjs-stack/pages/api/[...route].ts
Platform integrations
- Auth and todo UI
stytch-auth/src/App.tsx - Login and todos
stytch-auth/src/Auth.tsx - Todo editor
stytch-auth/src/Todos.tsx - Todo API
stytch-auth/api/TodoAPI.ts - Todo service
stytch-auth/api/TodoService.ts - Stripe checkout
env-vars/src/index.ts - Durable Object routes
durable-objects/src/index.ts - Counter object
durable-objects/src/counter.ts
Runtime examples
- Deno examples
deno/main.ts - Deno JSX example
deno/jsx.tsx - Bun examples
bun/hello.ts - Bun JSX example
bun/jsx.tsx
Other components
- Example user
- Cloudflare KV
- Stytch identity
- Stripe service
- Durable Object namespace
Connections 27
- Example user → Routing and middleware: sends requests
- Example user → Blog CRUD API: uses API
- Blog CRUD API → Blog API routes: mounts routes
- Example user → Static-file example: requests files
- Example user → JSX SSR routes: requests pages
- JSX SSR routes → Rendered pages: renders
- Example user → JSX DOM client: uses demo
- JSX DOM client → JSX demo API: fetches time
- Example user → Pages React client: opens client
- Pages React client → Pages API handler: fetches greeting
- Example user → Next.js client: submits name
- Next.js client → Next.js API handler: posts greeting
- Example user → Auth and todo UI: uses todo app
- Auth and todo UI → Stytch identity: provides auth
- Auth and todo UI → Login and todos: renders routes
- Auth and todo UI → Todo editor: renders editor
- Todo API → Todo service: delegates todos
- Todo service → Cloudflare KV: reads and writes
- Example user → Stripe checkout: starts checkout
- Stripe checkout → Stripe service: creates session
- Example user → Durable Object routes: requests counter
- Durable Object routes → Durable Object namespace: resolves stub
- Durable Object routes → Counter object: calls methods
- Example user → Deno examples: runs example
- Example user → Deno JSX example: runs example
- Example user → Bun examples: runs example
- Example user → Bun JSX example: runs example