Skip to content
powerhouse-incPublic

About

A collection of small, standalone, runnable projects. Each one isolates a single Reactor pattern for reference.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

249 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Powerhouse Recipes

Example integrations and utilities for Powerhouse Reactor. Run pnpm install and pnpm build at the repo root before running any recipe.

Document models

Project Description
code-first-model A document model declared in TypeScript with defineDocumentModel, with global only: an omitted local scope is the empty one
document-versioning Document model schema migration from v1 to v2 with an UpgradeManifest and a pure upgradeReducer
drive-override Custom container document that tracks children via the reactor's ADD_RELATIONSHIP action instead of document-drive's ADD_FILE
positional-delete Deletion as a position in the merged operation order. Pre-delete operations survive sync
undo-retract Undo on a base-reducer 3 document as a signed RETRACT that names the undone action by id; redo retracts the retraction

Packages and Connect

Project Description
package-styles A package ships only its own CSS; a host's theme lives in hosts/<host>/style.css, which ph build never reads
staged-build ph build staging its output so a failure leaves dist/ intact, and ph build --release recording an approval that ph publish --require-approval verifies
connect-routes Project file routes that add a page with a sidebar link, a settings tab and a full-page route to Connect
editor-props An editor that receives its document and dispatch as props, typed for its document model, instead of useSelected<Model>Document()

Host configs

Project Description
host-output-tokens hosts/*/host.js consuming another host's runtime values (bound port, drive URL) through plain-JSON $output, $concat and $env tokens
host-check checkHost and ph host check: every load, declared, resolve, resolved and boot issue a host would hit under ph run, reported at once against an injected env
spawn-host spawnHost launching ph run <host> as a child with a clean env, its own PH_USER_DATA_DIR and PH_NO_DOTENV, ready when its run record appears
compound-switchboards Two switchboards in one ph run compound, each with its own reactor block and config.switchboard, the operator's env over both, and no env written between them

Authorization

Project Description
anonymous-subscriptions A tokenless WebSocket subscription admitted at onConnect, then filtered per document, and refused with a retryable 4403
auth-preflight Asking the reactor what it would decide before submitting. One evaluateActions call answers a batch of candidate operations
document-acl Platform-enforced document ACLs via the auth scope, with zero authorization code in reducers
group-principals A reactor-group roster document decides who may approve via a { group } grant
rate-limiter Reactor processor and auth gate that throttles users by signer address using a sliding window
revocation-race Convergent authorization: a grant revocation races an approval across two reactors
role-based-auth Custom document model with creator-as-admin RBAC enforced inside the reducer via action.context.signer
scoped-reads The read path of the auth scope: one policy decides what every read returns, on the client rather than in the reactor

Processors and read models

Project Description
analytics-processor Maps expense-report operations into the analytics-engine time-series store
audit-trail Builds an immutable audit log from ActionSigner context
code-first-subgraph A Subgraph class whose schema is typed ph entries, served by reactor-api beside its schema-first twin with the same schema, answers and subscriptions
custom-read-model Custom IReadModel with ReactorBuilder for a document-count-per-type materialized view
full-text-search Maintains a PostgreSQL full-text search index over document state
relational-db-subgraph RelationalDbProcessor recipe with Kysely migrations, typed schema, and a GraphQL subgraph for document catalog
replay-state ProcessorRecord.replayState: what a replayed operation carries (latest, collapse, exact, operations), shown side by side
saga Saga pattern via Reactor processor: operations on one document trigger operations on others
semantic-search Embeds document state in-process (Transformers.js) into PGlite + pgvector and answers cosine-similarity queries

External systems

Project Description
discord-webhook-processor Reactor processor that forwards document operations to a Discord webhook as rich embeds
external-feed-ingest Polling worker that ingests an external feed into a ledger document idempotently
hosted-webhooks subgraph.http routes under the package's npm name, and a per-document Stripe webhook at a token URL the reactor hosts
inbound-webhook-bridge Standalone endpoint that verifies signed external webhooks against the raw bytes and dispatches them as payment-document actions

Workflows

Project Description
workflow-flow-control A workflow engine run with a Core router nested in a loop: each item takes its own branch, journaled per iteration

Events and subscriptions

Project Description
batch-progress Batch document creation with per-job progress tracked through Reactor EventBus job events
cross-document-reactor Event-driven cross-document automation using ReactorClient subscriptions to dispatch actions across related documents
sync-health-monitor Sync health dashboard via EventBus subscriptions with GraphQL subgraph

Command-line tools

Project Description
db-migrate PostgreSQL database export, import, and migration scripts using Docker (no local pg tools required)
document-snapshot-exporter Read-after-write export of document state to JSON using IReactor consistency tokens
signed-operations-verifier Standalone script that signs a document operation history with RenownCryptoSigner, then verifies each operation with the checks a reactor runs, for v2 and legacy tuples
subscription-cli Monitors Reactor GraphQL subscriptions in real time

About

A collection of small, standalone, runnable projects. Each one isolates a single Reactor pattern for reference.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages