Fact-streams is a TypeScript library for building event-sourced applications with Node.js and MongoDB. Current stable version is 0.3.0. It offers an alternative to the CRUD paradigm by providing a toolkit for event sourcing and CQRS patterns. The library ships with TypeScript types and focuses on simplicity and developer experience, with documented concepts and example models.
npm install fact-streamsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to connect to MongoDB, define a command, execute it, and store an event.
Update constructor to include { url: '...' }.Run ensureIndexes() after connecting.
Replace emit() with execute().
Ensure commands are idempotent or use unique constraints.
Use import { FactStream } from 'fact-streams'.