Project tutorial

Build a Hono Blog

Build Driftwood Daily with Hono, JSX, Simple.css, Cloudflare D1, cookie sessions, owned post CRUD, search, password recovery, and Cloudflare Workers deployment.

  • Difficulty Intermediate
  • Parts 12
  • Stack TypeScript, Hono, JSX, Simple.css, Cloudflare D1, cookie sessions, bcryptjs

How this project works

Driftwood Daily is an original teaching blog in twelve complete snapshots. Clone once and run any numbered folder without rebuilding earlier stages.

The path starts with Hono and routing, adds JSX and Simple.css, then introduces isolated D1 databases per snapshot. Later parts add sessions, media, ownership, pagination, search, reset tokens, and Cloudflare Workers deploy notes.

Snapshots 4–12 seed [email protected] and [email protected] with password123.

Each stage keeps its own D1 database binding (driftwood_01driftwood_12) so you can reset with wrangler d1 execute or by deleting local Wrangler state.

Start with part 1 Open GitHub repo

Parts in order

Work through the parts in sequence. Each lesson explains the ideas in plain language, then points you to a complete runnable snapshot on GitHub for that stage.

  1. Part 1: Getting StartedCreate a minimal Hono Worker on port 8787.
  2. Part 2: RoutingOrganize page routes with the Hono router.
  3. Part 3: Layout and UIRender Hono JSX pages with Simple.css.
  4. Part 4: Data LayerPersist authors and posts with Cloudflare D1.
  5. Part 5: Feed and DetailBuild a database-backed feed and post detail pages.
  6. Part 6: RegistrationValidate accounts and store bcrypt password hashes.
  7. Part 7: Login and SessionsAuthenticate with signed session cookies.
  8. Part 8: Profiles and MediaShow author profiles and accept constrained avatar uploads.
  9. Part 9: Posts CRUD and OwnershipCreate, edit, and delete posts with owner authorization.
  10. Part 10: Pagination and SearchPaginate the feed and search post text.
  11. Part 11: Password ResetIssue expiring one-use password reset tokens.
  12. Part 12: DeployPrepare Driftwood Daily for Cloudflare Workers and remote D1.