Skip to content

Effect Server Utils

Two packages that carry the parts of a server application Effect leaves to you — how messages are dispatched, and who is allowed to send them.

@effect-server-utils/cqrs

Command and query buses whose success and error channels come from the message definition, an event bus where the subscription picks the consistency model, and process managers. A unit-of-work boundary over your own transaction primitive ships separately, so the buses stay free of any opinion about transactions.

Read the overview →

@effect-server-utils/authz

One call at the boundary — hasPermissions("todo", "update", id) — over policy checks registered against (resource, action) pairs, with per-request resource resolution and composable check combinators.

Read the overview →

Typed end to end

A handler that returns the wrong thing does not compile. A caller reads both the success and the error channel off the message definition, so there is no side table keyed by tag that a declaration could quietly drift from.

Hosts own their vocabulary

Neither package names an HTTP status, a session type, a SQL dialect, or an action taxonomy. Those arrive through explicit seams: a TransactionDriver you supply, an AuthzConfig you augment.

Wiring errors surface at boot

A module whose dispatch surface was never merged fails at startup with a tagged defect naming the unroutable tags — not on a rarely-exercised path in production.

Independently versioned

Two packages, published on their own cadences. Take the one you need; neither depends on the other.