Skip to content

Recipes

Practical patterns that show how to solve real problems with callbag-recharge. Each recipe is a self-contained example you can copy into your project.

Orchestration

RecipeWhat it shows
Airflow-Style Pipelinepipeline + step + gate + route for declarative DAG workflows with retry, circuit breakers, and checkpointing
Cron PipelinefromCron + exhaustMap + fromPromise for scheduled pipelines

Streaming & Async

RecipeWhat it shows
AI Chat with Streamingproducer + switchMap + scan for streaming LLM responses with auto-cancellation
Reactive Data PipelinefromIter/fromAsyncIter + pipe operators for streaming ETL
Real-Time Dashboardstate + derived + batch for diamond-safe metrics

Edge AI & LLM

RecipeWhat it shows
On-Device LLM StreamingfromAbortable + switchMap for Ollama/WebLLM token streams with auto-cancel
Hybrid Cloud+Edge RoutingConfidence-based routing between local and cloud LLMs with fallback
Tool Calls for Local LLMsReactive state machine for tool call lifecycle

State Management

RecipeWhat it shows
createStore (Zustand Migration)Zustand-compatible API with diamond-safe selectors and push-phase memoization

Migration Guides

GuideWhat it covers
From ZustandDrop-in compat layer + native API migration
From Jotaiatom() compat + diamond resolution benefits
From Nanostoresatom/computed/map compat + per-key reactivity via reactiveMap

Released under the MIT License.