Cookbook
Short, goal-oriented recipes for common Pondoknusa tasks. Each recipe assumes 1.0.x and links to guide chapters for depth.
Recipes
| Recipe | When to use it |
|---|---|
| Realtime UI with Echo | Push server events to the browser over WebSockets |
| RAG Q&A endpoint | Ingest documents and answer questions with retrieval |
| Testing with fakes | Assert mail, notifications, and broadcasts in Vitest |
| Admin panel | Optional CRUD UI with audit log |
| Multi-locale apps | JSON locales, lang:publish, missing-key checks |
| Production observability | Health probes, structured logs, queue failure signals |
| Multi-tenant apps | Subdomain tenancy with global scopes and channel isolation |
| Partial reload (HTMX/Turbo) | Sub-100ms UI updates without full page reload |
| Edge response cache | Cloudflare/Fly/nginx caching with ETag middleware |
| Deploy with Cloudflare | CDN + R2 + Node origin (not Workers-only) |
| Cloudflare deployment | CDN + R2 + Node origin (full guide) |
Conventions
- Recipes use
pondoknusa newdefaults (SQLite + database queue) unless noted. - Optional driver packages (
@pondoknusa/redis-node,@pondoknusa/database-pg, …) are called out explicitly. - Stable vs experimental APIs follow API stability.
Contributing a recipe
Open a PR adding a page under docs/cookbook/ and register it in scripts/generate-docs.mjs tutorial/cookbook sidebar lists (or the generated sidebar.mts cookbook section).