# Packages



Postel is a workspace of focused packages. Pick the ones you need; the rest don't get installed.

## Available today [#available-today]

| Package                       | Used for                                                                                                             | Notes                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`@postel/core`**            | [Inbound](/docs/inbound) and [Outbound](/docs/outbound) — the `Postel({ inbound, outbound })` factory and primitives | Zero runtime dependencies. The outbound runtime is available, including the in-process `InMemoryStorage` adapter (`import { InMemoryStorage } from "@postel/core"`). Inbound sources accept an optional [Standard Schema](https://github.com/standard-schema/standard-schema) `schema` (zod/valibot/…) that validates and types `event.data` — no schema-library dependency. Full signature reference: [Core](/docs/reference/core), [Inbound](/docs/reference/inbound), [Outbound](/docs/reference/outbound), [Strategies](/docs/reference/strategies). |
| **`@postel/http`**            | [Framework-agnostic webhook HTTP core](/docs/reference/http)                                                         | The verification gate (`handleInbound`, `fetchWebhook`) and the shared `PostelError`→HTTP-status policy every framework adapter binds to. Depends only on `@postel/core`.                                                                                                                                                                                                                                                                                                                                                                                |
| **`@postel/hono`**            | [Hono](/docs/web-adapters/hono) framework adapter                                                                    | `HonoWebAdapter(postel, app)` routing facade (`inbound.<source>.post`, `outbound.bindJwks`, `admin.bindAdminRoutes`) + low-level `verifyWebhook()` / `withWebhook()`.                                                                                                                                                                                                                                                                                                                                                                                    |
| **`@postel/express`**         | [Express](/docs/web-adapters/express) framework adapter                                                              | `ExpressWebAdapter(postel, app)` routing facade + low-level `verifyWebhook()` (mounts `express.raw()` + the gate) / `fetchToExpress`; sets `req.postel`.                                                                                                                                                                                                                                                                                                                                                                                                 |
| **`@postel/fastify`**         | [Fastify](/docs/web-adapters/fastify) framework adapter                                                              | `fastifyPostel` raw-body plugin + `FastifyWebAdapter(postel, app)` routing facade + low-level `verifyWebhook()` preHandler / `fetchToFastify`; sets `req.postel`.                                                                                                                                                                                                                                                                                                                                                                                        |
| **`@postel/nestjs`**          | [NestJS](/docs/web-adapters/nestjs) framework adapter                                                                | `NestjsWebAdapter(postel)` (type-checked `WebhookGuard`) + `PostelModule.forRoot(postel)` + `WebhookGuard(key)` guard + `@Event()` / `@WebhookResult()` decorators.                                                                                                                                                                                                                                                                                                                                                                                      |
| **`@postel/nextjs`**          | [Next.js](/docs/web-adapters/nextjs) framework adapter                                                               | `NextjsWebAdapter(postel)` Route Handler bindings (`inbound.<source>.post`, `outbound.bindJwks`, `admin.bindAdminRoutes`, each returning `{ METHOD: handler }`) + low-level `withWebhook()`.                                                                                                                                                                                                                                                                                                                                                             |
| **`@postel/admin`**           | [Admin control plane](/docs/operations/admin) over the outbound sender                                               | `adminRouter(postel, { authorize })` Fetch router (endpoint CRUD, replay, keys, message/attempt reads, tenant reads) with default-deny auth + tenant scoping; mount via Hono / `fetchToExpress` / `fetchToFastify`.                                                                                                                                                                                                                                                                                                                                      |
| **`@postel/effect`**          | [Effect-TS layer](/docs/reference/effect) over the core API                                                          | `PostelLive(config)` / `PostelTag()` — a Scope-managed `Layer`; `send`/`replay`/`messages.{get,attempts,list}`/`inbound.<source>.verify` return `Effect`s with `PostelError` as the typed failure channel. Peer-depends on `effect`.                                                                                                                                                                                                                                                                                                                     |
| **`@postel/sqlite`**          | [SQLite storage adapter](/docs/storage/sqlite)                                                                       | Standalone — Postel owns the SQLite database (`SqliteStorage`). Full outbound `Storage`; also exports `SqliteDedup` for inbound dedup.                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **`@postel/pg`**              | [Postgres storage adapter](/docs/storage/pg)                                                                         | Standalone — `PgStorage({ connectionString })`. Full outbound `Storage` (`FOR UPDATE SKIP LOCKED`, `LISTEN`/`NOTIFY`); also exports `PgDedup` for inbound dedup.                                                                                                                                                                                                                                                                                                                                                                                         |
| **`@postel/mysql`**           | [MySQL storage adapter](/docs/storage/mysql)                                                                         | Standalone — `MysqlStorage({ connectionString })` on `mysql2` (`FOR UPDATE SKIP LOCKED`, polling). Full outbound `Storage`; also exports `MysqlDedup` for inbound dedup.                                                                                                                                                                                                                                                                                                                                                                                 |
| **`@postel/kysely`**          | [Kysely storage adapter](/docs/storage/kysely)                                                                       | ORM/query-builder — `KyselyStorage({ db, dialect })` runs Postel's storage through your Kysely (Postgres, MySQL, or SQLite).                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **`@postel/drizzle`**         | [Drizzle storage adapter](/docs/storage/drizzle)                                                                     | ORM — `DrizzleStorage({ db, dialect })` runs Postel's storage through your Drizzle instance (Postgres, MySQL, or SQLite). Also exports `@postel/drizzle/schema` — dialect-specific Drizzle table definitions for the canonical schema.                                                                                                                                                                                                                                                                                                                   |
| **`@postel/prisma`**          | [Prisma storage adapter](/docs/storage/prisma)                                                                       | ORM — `PrismaStorage({ prisma, dialect })` runs Postel's storage through your PrismaClient's raw surface (Postgres, MySQL, or SQLite).                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **`@postel/typeorm`**         | [TypeORM storage adapter](/docs/storage/typeorm)                                                                     | ORM — `TypeOrmStorage({ dataSource, dialect })` runs Postel's storage through your TypeORM DataSource (Postgres, MySQL, or SQLite).                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **`@postel/mikro-orm`**       | [MikroORM storage adapter](/docs/storage/mikro-orm)                                                                  | ORM — `MikroOrmStorage({ orm, dialect })` runs Postel's storage through your MikroORM EntityManager (Postgres, MySQL, or SQLite).                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **`@postel/storage-helpers`** | Zero-DB helpers for [custom adapters](/docs/storage/custom-adapters)                                                 | Dialect codecs, capability flags, row encode/decode, migration SQL, callback registry — what every adapter reuses.                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **`@postel/cli`**             | `postel` CLI                                                                                                         | For v1, one verb: `postel migrate --dialect <postgres\|sqlite\|mysql> --url <connection-string>` brings a database to the current schema version through the matching standalone adapter.                                                                                                                                                                                                                                                                                                                                                                |

## Stubs today (name reserved, no runtime yet) [#stubs-today-name-reserved-no-runtime-yet]

| Package       | Will be           | Status  |
| ------------- | ----------------- | ------- |
| `@postel/bun` | Bun.serve adapter | Planned |

Each "stub" package exports only `__postelPackage` today, is marked `private`, and is **not part of the published 1.0 set** — a guard test fails CI if a name-only package is ever made publishable. Don't depend on them in production yet — the framework-agnostic [factory recipe](/docs/inbound/verify) works directly against each runtime's native `Request`.

## Storage adapters [#storage-adapters]

The `postel.outbound.*` runtime runs against any `Storage` adapter. The full Tier-1 matrix now ships: the in-process `InMemoryStorage` (in `@postel/core`), the standalone [`@postel/pg`](/docs/storage/pg) / [`@postel/sqlite`](/docs/storage/sqlite) / [`@postel/mysql`](/docs/storage/mysql), and the query-builder / ORM adapters [`@postel/kysely`](/docs/storage/kysely) / [`@postel/drizzle`](/docs/storage/drizzle) / [`@postel/prisma`](/docs/storage/prisma) / [`@postel/typeorm`](/docs/storage/typeorm) / [`@postel/mikro-orm`](/docs/storage/mikro-orm). See the [Storage](/docs/storage) section for how to choose, and [custom adapters](/docs/storage/custom-adapters) to back Postel with any other database.

The matrix is per [ADR 0007](https://github.com/postel-sh/postel/blob/main/decisions/0007-storage-strategy.md) — Postgres / SQLite as the canonical (benchmarked) first-class databases, MySQL as a first-party adapter set, query-builder / ORM adapters in their own packages. The external worker strategies (`BullMQ`, `PgBoss`) remain config slots that throw `NotImplementedError` until their adapters ship; the in-process worker pool is the supported runtime.

## Polyglot ports (Go, Python, Rust) [#polyglot-ports-go-python-rust]

Out of scope for the npm registry. See [Polyglot](/docs/project/polyglot) for the per-language plan.

## Compliance & tooling [#compliance--tooling]

| Package                     | What it is                                                                                                                                                                                                                              | Status                                                                                        |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `@postel/compliance`        | The executable behavioral oracle. Vendor-neutral test suite for any Standard Webhooks producer/receiver. A port version `X.Y.Z` claims conformance by passing `@postel/compliance@X.Y.*`.                                               | Receiver + sender; the sender corpus executes end-to-end against `@postel/compliance-driver`. |
| `@postel/compliance-driver` | The HTTP control-plane the compliance runner drives in sender mode — it wraps a real `Postel` outbound instance so the cross-port runner can reset state, register endpoints, send, advance the clock, and observe outgoing deliveries. | Workspace-internal harness for the suite; not a production dependency.                        |
| `@postel/test`              | Workspace-internal test fixtures (signed payload generators, vector builders).                                                                                                                                                          | Internal — not published.                                                                     |

## Every export [#every-export]

For exact type signatures, see the `@postel/core` reference — [Core API](/docs/reference/core) (factories, config, lifecycle), [Inbound API](/docs/reference/inbound), [Outbound API](/docs/reference/outbound), [Strategies](/docs/reference/strategies), and [Errors](/docs/reference/errors) — or [`@postel/http`](/docs/reference/http) for the framework-agnostic HTTP layer.
