Benzene Cookbooks

Practical recipes for common real-world scenarios using the TypeScript port of Benzene.

What are cookbooks?

Cookbooks are step-by-step guides that show you how to solve a specific problem with Benzene. Each one focuses on a single use case and gives you complete, copy-pasteable TypeScript you can adapt to your own service — the same three-level documentation set the .NET original ships, ported to npm, ESM, and vitest.

If you're new to Benzene, start with Getting Started and the docs index first; the cookbooks assume you already have a handler and a host wired up.

Available cookbooks

AWS

Reliability & Workflow

Messaging & Integration

Security

Architecture & Testing

Cookbook structure

Each cookbook follows the same shape:

  1. Problem Statement — what you're trying to achieve.
  2. Prerequisites / Installation — what you need, and the npm install @benzene/… packages.
  3. Step-by-Step Implementation — a detailed walkthrough with complete, runnable code.
  4. Testing — how to verify it with vitest.
  5. Troubleshooting — common issues and fixes.
  6. Variations — alternative approaches or extensions.
  7. Further Reading — related docs and resources.

See also