@reventlessdev/reventless-core
v3.0.0-alpha.160
Published
Core package for Reventless framework
Readme
@reventlessdev/reventless-core
⚠️ Alpha. APIs and on-disk formats can change without notice between releases. Pin exact versions and expect breaking changes.
The provider-agnostic core of Reventless — a spec-driven, event-sourced CQRS framework written in ReScript. This package is the runtime you model your domain against: the type-safe building blocks for commands, events, projections, and the behaviors that evolve state — with no cloud or storage dependency. The provider-specific adapters live in separate packages (see Where it fits).
What it provides
ReScript modules, consumed by adding the package to your rescript.json dependencies:
Message— command / event message contracts and their service interface.Behavior— the write-side behavior spec: event-sourced state transitions (evolve(state, event) => state).Projection/ProjectionMapper— read models projected from event streams.Mapper/Mapper1toN/MapperNto1— cross-component event translation (encode/decode between a source and a target contract).ComponentType— the hierarchical component-kind vocabulary.PluginRuntimeOperations— the provider-agnostic interface a runtime adapter implements.RequestContext— per-invocation context threaded through the effect pipeline.Env— environment access.
Domain code written against these modules is provider-agnostic: the same components run unchanged on any adapter.
Where it fits
reventless-core is one package in the Reventless framework. It builds on
@reventlessdev/reventless-spec
(type specifications) and is paired at runtime with a storage/cloud adapter:
@reventlessdev/reventless-aws— AWS (DynamoDB, Lambda, SQS, SNS, S3)@reventlessdev/reventless-postgres— Postgres event log + query DB@reventlessdev/reventless-local— in-memory / SQLite platform for local dev and tests
You normally obtain reventless-core transitively by scaffolding an app rather than
installing it on its own.
Install
pnpm add @reventlessdev/reventless-coreThen register it as a ReScript dependency in rescript.json:
{
"dependencies": ["@reventlessdev/reventless-core"]
}Requires ReScript ^12.3.0 (peer dependency).
Links
- 📚 Documentation — docs.reventless.dev
- 📦 Repository — ReventlessDev/reventless-core
- 📋 Changelog
