Packages
Heximon ships as 44 small, single-purpose @heximon/* packages (plus the unscoped heximon CLI and the create-heximon forwarder), organized
into eight tiers. Each package depends only on the tiers below it, never the reverse, so you install the
foundation and the kernel first and add a tier's packages only when you reach for that capability.
Most apps use three concepts — a module, a controller, a provider — and never install more than a handful of these packages; every row below is opt-in.
Every package lives at packages/<tier>/<name> in the repo, but the npm name is always flat —
packages/architecture/domain publishes as @heximon/domain, packages/platforms/cloudflare publishes as
@heximon/cloudflare. The directory tier is a repo-organization detail; it never appears in an import path.
For the full API of any package, its src/ and README.md are the reference — this page is the map, not
the manual.
Foundation
DI-free value and contract types, safe to import on the frontend. No compiler, no server.
| Package | What it's for |
|---|---|
@heximon/primitives | Branded types, the Standard Schema contract, and value helpers — the value layer everything else builds on. |
@heximon/schema | Validator-agnostic DTO veneer: Schema / SchemaObject / SchemaArray over per-field Standard Schemas, with JSON Schema assembled from each field's ~standard.jsonSchema. |
@heximon/contract | The FE-safe API contract surface: the Contract, WebSocketContract, and ServerSentEvents bases with the Route builder and typed self-clients. |
Kernel
The two packages every other tier layers on: the build-time compiler and the runtime it compiles against.
| Package | What it's for |
|---|---|
@heximon/compiler | The compile-time DI compiler: parse → DI graph → codegen, plus the plugin API. Build-time only — never imported at runtime. |
@heximon/runtime | The DI runtime kernel: the Module base, the createApp/AppHandle runtime, and request/runtime primitives. |
Architecture
CQRS, DDD, events, and every durable-orchestration primitive — messaging, scheduling, sagas, and workflows.
durable (Cloudflare Durable Objects) lives in this tier too, alongside the other durability concepts.
| Package | What it's for |
|---|---|
@heximon/cqrs | Compile-time CQRS: Command/Query bases, CommandHandler/QueryHandler discovery, thin CommandBus/QueryBus facades over the shared HandlerRegistry, and the CQRS compiler plugin. |
@heximon/domain | Compile-time DDD: DomainObject/Entity/ValueObject/AggregateRoot bases, snapshot-diff dirty tracking, repository and mapper contracts, and the domain compiler plugin. |
@heximon/durable | Cloudflare Durable Objects: the DurableObject base and DI-injected DurableFactory handle, a generated DI bridge, a Node dev shim, and two turnkey DO-backed tiers — a distributed rate-limit store (/security) and a strongly-consistent KV Storage (/kv). |
@heximon/events | The base event bus: the class-identity EventBus, the EventHandler/NotificationHandler concepts, and the events compiler plugin. |
@heximon/integration | Integration events: typed cross-context event producers and handlers, the transactional outbox, and the cross-service fan-out compiler plugin. |
@heximon/queue | The queue tier: the Queue port with memory, Drizzle, SQS, Upstash, Vercel, Netlify, and Cloudflare backends, plus the cross-service integration-event fan-out legs. |
@heximon/saga | Durable timeouts: the DurableTimer port with transactional arm/cancel, TimeoutHandler compensation, and Node/Cloudflare/queue-delay drivers. |
@heximon/schedule | Scheduled (cron) work: the ScheduledHandler concept with Node, Cloudflare, Vercel, Netlify, and Deno drivers. |
@heximon/workflow | Durable workflows: the Workflow and WorkflowFactory concepts, a portable WorkflowStep port, and Cloudflare + Node replay engines. |
Data
Persistence contracts and the Drizzle dialect, plus key/value and blob storage.
| Package | What it's for |
|---|---|
@heximon/persistence | Dialect-agnostic persistence contracts: the abstract Database with transactional runInTransaction, optimistic concurrency, and the Migration contracts. |
@heximon/drizzle | Drizzle ORM persistence: transactions, entity mapping, and repositories over libsql, better-sqlite3, D1, durable-sqlite, pg, mysql2, and Hyperdrive. |
@heximon/kv | Key/value storage: the abstract Storage DI token with memory, Redis, Upstash, Cloudflare KV, and unstorage backends. |
@heximon/blob | Object storage: the BlobStore port with streaming bodies, byte ranges, and signed URLs, over memory, filesystem, R2, and S3 drivers. |
API
The HTTP layer, the frontend-safe client, and the protocol/doc generators that read a shared Contract.
| Package | What it's for |
|---|---|
@heximon/http | The HTTP layer: the Controller/Middleware runtime and the HTTP compiler plugin. |
@heximon/client | The FE-safe client: fetch/internal/mock transports for a Contract's self-client, typed SSE and WebSocket clients, and TanStack Query bindings. |
@heximon/openapi | An OpenAPI 3.1 generator: builds the document from contract route tables at runtime, with security helpers and Scalar / Swagger UI renderers. |
@heximon/mcp | A Model Context Protocol server: MCP tools derived from a Contract's route table, executed in-process, stateless Streamable HTTP. |
@heximon/asyncapi | An AsyncAPI 3.1 generator: builds the document from WebSocket contracts and SSE event maps at runtime, validator-agnostic. |
@heximon/sse | Server-Sent Events: the EventStream response builder and the ServerSentEventsHandler concept, with typed events, Last-Event-ID resume, and durable fan-out. |
@heximon/websocket | The WebSocket transport: the WebSocketHandler concept, typed bidirectional contracts, and a cross-platform connection port (Node + Cloudflare hibernation). |
Capabilities
Cross-cutting features you layer onto an app as needed — auth, caching, health checks, logging, tracing, and notifications.
| Package | What it's for |
|---|---|
@heximon/auth | Authentication: JWT sign/verify (jose/WebCrypto), password hashing (scrypt + PBKDF2), AuthContext, and the scopes-driven guard middleware. |
@heximon/cache | Multi-tier caching: a TieredCache storage chain, a Cache facade with single-flight and tag invalidation, plus CQRS query and HTTP response caching. |
@heximon/health | Health and readiness checks: HealthIndicator discovery, HealthRegistry aggregation, and the health compiler plugin. |
@heximon/logging | Structured logging drains + opt-in wide events: bridges evlog's drain catalog (OTLP/Axiom/Sentry/Datadog/…) onto the core Logger. |
@heximon/notifications | Multi-channel notifications: Message/MessageTransport ports with email, SMS, and push adapters, templating, suppression, and a dispatcher. |
@heximon/otel | Compile-time OpenTelemetry tracing: baked span names with module attribution, plus Node, Workers, and Lambda exporter legs. |
Platforms
One package per deploy target: a compile-time strategy + entry emitter, and where relevant a native scheduler or queue driver.
| Package | What it's for |
|---|---|
@heximon/node | The Node platform: the zero-config default deploy strategy, its driver bindings, and the standalone server host. |
@heximon/cloudflare | The Cloudflare toolkit: the Workers deploy strategy, wrangler.json emit, the workerd vp dev host, and Durable Object + Queues integrations. |
@heximon/vercel | The Vercel toolkit: Functions and Edge deploy strategies, Build Output API emit, cron, queues, and durable workflows on the Node tier. |
@heximon/netlify | The Netlify toolkit: Functions and Edge deploy strategies, scheduled functions, and the Async Workloads queue consumer. |
@heximon/aws | The AWS toolkit: the LambdaStrategy deploy strategy, the Lambda handler entry emitter, and the SQS push-consumer wiring. |
@heximon/deno | The Deno Deploy toolkit: the DenoDeployStrategy, the Deno entry emitter with Deno.cron, and the schedule driver. |
@heximon/nitro | Nitro v3 host integration: a NitroModule that mounts Heximon's routes onto Nitro's h3 and supplies the in-process InternalClient. |
@heximon/nuxt | A Nuxt 5 module: auto-initializes @heximon/nitro inside Nuxt's Nitro v3, serving Heximon's routes alongside Nuxt pages. |
Tooling
The build integration, the CLI, and everything that only runs at build/dev time — never bundled into production.
| Package | What it's for |
|---|---|
@heximon/build | The build integration: the complete Vite plugin (dev server + app build, WebSocket-in-dev) plus the cross-bundler app build for Rollup, Rolldown, esbuild, webpack, and rspack. |
heximon (packages/tooling/cli) | The Heximon CLI: create, deploy, provision, and migrations. See the CLI section. |
create-heximon (packages/tooling/create-heximon) | The pnpm create heximon front door — a thin forwarder onto heximon create. |
@heximon/deploy | Build-time deploy library: ships the vp build artifact to the app's configured platform behind a per-platform strategy seam. |
@heximon/dev | Host-agnostic dev-experience core: the dev pages (build-error + JSON preview), the diagnostic printer (terminal/overlay/HTML codeframes), and the in-memory generated-module store. Build-time only; consumed by the Vite / unplugin / Nitro hosts. |
@heximon/library | Cross-bundler library emit: package a published module (the typed create<Module> factory + heximon.manifest.json) for cross-package consumption, on Vite, Rollup, Rolldown, or esbuild. |
@heximon/testing | The in-process test harness: createTestApp compiles and boots an isolated app per call. |
Read the reference for a package
This page is the map. For a package's actual API, read its src/ and README.md — every package ships one,
and it's kept current with the source, not with this site. When a doc page here shows you the concepts, the
package README.md is where you'll find the full method list, config shape, and subpath exports.
See also
- Introduction — what Heximon is and why it compiles dependency injection ahead of time.
- Quick Start — a three-file HTTP app, wired by the compiler and served by Vite.
- Modules — how a module's config drives the whole DI graph, and where each tier's namespace key plugs in.
- Examples — the ladder, flagship, and gap example tiers, one concept (or full app) at a time.
Other bundlers
Compile a Heximon app and serve its generated wiring across bundlers with @heximon/build — the full dev experience on Vite (including WebSocket-in-dev), and Rollup / Rolldown / esbuild / webpack / rspack build tiers that emit a runnable server bundle from one unchanged src/.
AI Skills
The Heximon Agent Skill at docs/skills/heximon, its SKILL.md and references, and the llms.txt and MCP endpoints Docus serves for this site.