Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package aggregates holds the write-side models (deciders) of the domain.
|
Package aggregates holds the write-side models (deciders) of the domain. |
|
Package authforward routes PocketBase's own native auth-collection traffic to the master on a --cqrsRole=secondary node (F-12, the remainder of item 5).
|
Package authforward routes PocketBase's own native auth-collection traffic to the master on a --cqrsRole=secondary node (F-12, the remainder of item 5). |
|
Package authverify lets a --cqrsRole=secondary node verify bearer tokens it cannot verify itself — the fix for F-13.
|
Package authverify lets a --cqrsRole=secondary node verify bearer tokens it cannot verify itself — the fix for F-13. |
|
Package batching accumulates decided-but-uncommitted commands into batches and commits each batch's events in one SQLite transaction, instead of one transaction per command (item 4).
|
Package batching accumulates decided-but-uncommitted commands into batches and commits each batch's events in one SQLite transaction, instead of one transaction per command (item 4). |
|
Package catalog introspects the running platform — aggregates, event types, consumers, collections, functions and reactor flows — into a single document (the catalog), rendered as JSON, Markdown + Mermaid, or domain-doc skeletons.
|
Package catalog introspects the running platform — aggregates, event types, consumers, collections, functions and reactor flows — into a single document (the catalog), rendered as JSON, Markdown + Mermaid, or domain-doc skeletons. |
|
cmd
|
|
|
extcaller
command
Command extcaller is the reference wiring for running an external-service-caller against a pocketcqrs deployment.
|
Command extcaller is the reference wiring for running an external-service-caller against a pocketcqrs deployment. |
|
Package commandqueue durably records incoming commands before they are decided, so a batching event writer can accumulate many commands' decided events into one SQLite transaction instead of one per command (item 4).
|
Package commandqueue durably records incoming commands before they are decided, so a batching event writer can accumulate many commands' decided events into one SQLite transaction instead of one per command (item 4). |
|
Package consumers provides the shared checkpointed-consumption engine: named consumers follow the event log in position order with durable checkpoints, so delivery survives restarts.
|
Package consumers provides the shared checkpointed-consumption engine: named consumers follow the event log in position order with durable checkpoints, so delivery survives restarts. |
|
Package decider implements the functional event-sourcing Decider pattern (see https://thinkbeforecoding.com/post/2021/12/17/functional-event-sourcing-decider): commands are decided against a folded stream state, producing the events that get appended to the event store.
|
Package decider implements the functional event-sourcing Decider pattern (see https://thinkbeforecoding.com/post/2021/12/17/functional-event-sourcing-decider): commands are decided against a folded stream state, producing the events that get appended to the event store. |
|
Package emschema reads EventModeling documents — the format defined by github.com/jamestryand/eventmodelschema — and maps them onto this project's intermediate domain model.
|
Package emschema reads EventModeling documents — the format defined by github.com/jamestryand/eventmodelschema — and maps them onto this project's intermediate domain model. |
|
Package events implements the PocketCQRS append-only event store.
|
Package events implements the PocketCQRS append-only event store. |
|
Package extcaller implements the external-service-caller: a consumers.Consumer that matches committed events against configured rules, calls a third-party REST API through a bounded outbound.Client, and dispatches the response as a follow-up command through a pocketcqrs gateway — never appends a raw event, so the target deployment's decider keeps authority to accept or reject the result.
|
Package extcaller implements the external-service-caller: a consumers.Consumer that matches committed events against configured rules, calls a third-party REST API through a bounded outbound.Client, and dispatches the response as a follow-up command through a pocketcqrs gateway — never appends a raw event, so the target deployment's decider keeps authority to accept or reject the result. |
|
Package functions provides the PocketCQRS functions-as-a-service layer: user-defined functions triggered by domain events, HTTP requests, or a cron schedule.
|
Package functions provides the PocketCQRS functions-as-a-service layer: user-defined functions triggered by domain events, HTTP requests, or a cron schedule. |
|
Package gateway exposes the write side over HTTP: commands in, events out.
|
Package gateway exposes the write side over HTTP: commands in, events out. |
|
Package idempotency lets the command gateway recognize a retried command and replay its original outcome instead of re-deciding it — the fix for F-4 (a client that retries after an ambiguous timeout can double-apply a command).
|
Package idempotency lets the command gateway recognize a retried command and replay its original outcome instead of re-deciding it — the fix for F-4 (a client that retries after an ambiguous timeout can double-apply a command). |
|
internal
|
|
|
gatewayclient
Package gatewayclient is a small HTTP client for the pocketcqrs command gateway (POST /api/cqrs/{aggregate}/{id}/{command}), for use by out-of-process components in this repo that need to dispatch a follow-up command.
|
Package gatewayclient is a small HTTP client for the pocketcqrs command gateway (POST /api/cqrs/{aggregate}/{id}/{command}), for use by out-of-process components in this repo that need to dispatch a follow-up command. |
|
localstore
Package localstore wires the two event.Store shapes every out-of-process component in this repo needs: a read-only poll source over the upstream pocketcqrs deployment's events.db, and a separate, locally-writable store for this component's own checkpoints and dead letters.
|
Package localstore wires the two event.Store shapes every out-of-process component in this repo needs: a read-only poll source over the upstream pocketcqrs deployment's events.db, and a separate, locally-writable store for this component's own checkpoints and dead letters. |
|
Package migrations holds this repo's EXAMPLE PocketBase migrations.
|
Package migrations holds this repo's EXAMPLE PocketBase migrations. |
|
Package outbound is a hard-bounded HTTP client for the effect and reactor tiers: the one sanctioned way for pocketcqrs to call a third party.
|
Package outbound is a hard-bounded HTTP client for the effect and reactor tiers: the one sanctioned way for pocketcqrs to call a third party. |
|
Package packs implements domain packs: portable bundles of a domain's function files (pb_functions) plus any plain (non-projection-owned) collection schemas, with a manifest.
|
Package packs implements domain packs: portable bundles of a domain's function files (pb_functions) plus any plain (non-projection-owned) collection schemas, with a manifest. |
|
Command pocketcqrs-dashboard is the CQRS ops dashboard: a separate, self-contained binary that consumes a pocketcqrs instance over its public API only (never internals, never the event store).
|
Command pocketcqrs-dashboard is the CQRS ops dashboard: a separate, self-contained binary that consumes a pocketcqrs instance over its public API only (never internals, never the event store). |
|
Package projections folds events from the event store into ordinary PocketBase collections, so the stock PocketBase REST/realtime/auth API serves the query side unchanged.
|
Package projections folds events from the event store into ordinary PocketBase collections, so the stock PocketBase REST/realtime/auth API serves the query side unchanged. |
|
Package reactors implements cross-aggregate reactions (sagas/process managers): durable consumers that map committed events to new commands, dispatched in-process through the decider registry — so reactions become events like everything else, never out-of-band state changes.
|
Package reactors implements cross-aggregate reactions (sagas/process managers): durable consumers that map committed events to new commands, dispatched in-process through the decider registry — so reactions become events like everything else, never out-of-band state changes. |
|
Package roles provisions the roles PocketBase collection: the auth collection Item 11's capability-based ops/dashboard access model checks, alongside a genuine PocketBase superuser.
|
Package roles provisions the roles PocketBase collection: the auth collection Item 11's capability-based ops/dashboard access model checks, alongside a genuine PocketBase superuser. |
|
Package scaffold generates a working vertical slice — a JS decider, JS projections and JS reactors — from a small description of a domain.
|
Package scaffold generates a working vertical slice — a JS decider, JS projections and JS reactors — from a small description of a domain. |
|
Package users provisions the users PocketBase collection: a genuinely generic, app-level end-user auth collection, distinct from every other collection this project provisions:
|
Package users provisions the users PocketBase collection: a genuinely generic, app-level end-user auth collection, distinct from every other collection this project provisions: |
|
Package writeguard rejects out-of-band record writes on guarded (projection-owned) collections.
|
Package writeguard rejects out-of-band record writes on guarded (projection-owned) collections. |
Click to show internal directories.
Click to hide internal directories.