Benzene (TypeScript)

Benzene is a hexagonal framework for services running in serverless environments, containers, or on physical servers. It supports multiple cloud providers and provides a unified programming model for message-based architectures. This is the TypeScript port of Benzene — you write a message handler once and host it unchanged on Express, AWS Lambda, or Azure Functions.

New to Benzene? Start with Getting Started — a small HTTP service running locally in about five minutes, no cloud account needed. Note that the @benzenejs/* packages aren't published to npm yet; that guide explains how to work from the cloned workspace in the meantime.

Documentation in progress. This TypeScript documentation set is being ported from the .NET docs. The guides below and the full cookbook collection are complete; a few areas (the service mesh UI and usage feed) are still being ported — for the mesh today, the mesh-service example is runnable. For the complete API surface, see the repository README, and for runnable projects covering every transport, the examples/ folder.

Main Themes

About the port

Benzene TypeScript mirrors the .NET library's structure, names, and file layout as closely as the language allows; ported tests come from the C# suite. Where the two necessarily differ — free functions instead of extension methods, Promise instead of Task, decorators instead of attributes, Zod/Joi/Yup instead of FluentValidation/DataAnnotations — the reasons are recorded in the README's Porting conventions. Every doc here uses the real, current TypeScript API; when in doubt, the src/ in the repository is the source of truth.

The language-neutral parts of Benzene — the core concepts, wire contracts, status vocabulary, mesh shapes, and the Cloud Service Profile — are defined once, for every language, in the cross-language Benzene specification. The docs here cover the TypeScript surface of those contracts and link to the spec for the normative detail.

Maintaining