Awesome
<p align="center"> <img src="assets/logo.svg" height="128"> <h1 style="border-bottom:none;font-size:60px;margin-bottom:0;" align="center" >Castore</h1> </p> <p align="center"> <a aria-label="NPM version" href="https://www.npmjs.com/package/@castore/core"> <img alt="" src="https://img.shields.io/npm/v/@castore/core?color=935e0e&style=for-the-badge"> </a> <a aria-label="License" href="https://github.com/castore-dev/castore/blob/main/LICENSE"> <img alt="" src="https://img.shields.io/github/license/castore-dev/castore?color=%23F8A11C&style=for-the-badge"> </a> <img alt="" src=https://img.shields.io/npm/dt/@castore/core?color=%23B7612E&style=for-the-badge> <br/> <br/> </p>💖 Huge thanks to the sponsors who help me maintain this repo:
<p align="center"> <a href="https://www.theodo.fr/"><img src="https://github.com/theodo.png" width="50px" alt="Theodo" title="Theodo"/></a></td> <!-- sponsors --><a href="https://github.com/featherscloud"><img src="https://github.com/featherscloud.png" width="50px" alt="Feathers Cloud" title="Feathers Cloud"/></a> <a href="https://github.com/li-jia-nan"><img src="https://github.com/li-jia-nan.png" width="50px" alt="lijianan" title="lijianan"/></a> <a href="https://github.com/RaeesBhatti"><img src="https://github.com/RaeesBhatti.png" width="50px" alt="Raees Iqbal" title="Raees Iqbal"/></a> <a href="https://github.com/getsentry"><img src="https://github.com/getsentry.png" width="50px" alt="Sentry" title="Sentry"/></a> <a href="https://github.com/lucas-subli"><img src="https://github.com/lucas-subli.png" width="50px" alt="Lucas Saldanha Ferreira" title="Lucas Saldanha Ferreira"/></a> <!-- sponsors --> <a href="https://github.com/sponsors/ThomasAribart"><img src="assets/plus-sign.png" width="50px" alt="Plus sign" title="Your brand here!"/></a> </p>Making Event Sourcing easy 😎
Event Sourcing is a data storage paradigm that saves changes in your application state rather than the state itself.
It is powerful as it enables rewinding to a previous state and exploring audit trails for debugging or business/legal purposes. It also integrates very well with event-driven architectures.
However, it is tricky to implement 😅
After years of using it at Theodo, we have grown to love it, but also experienced first-hand the lack of consensus and tooling around it. That's where Castore comes from!
<p align="center"> Castore is a TypeScript library that <b>makes Event Sourcing easy</b> 😎 </p>
Features
🙈 Stack agnostic: Can be used in any JS context (web apps, containers, lambdas... you name it 🙌)
🕊️ Light-weight: opt-in packages only
🏋️ Type-safety pushed to the limit
📐 Validation library agnostic (Zod, JSON schema...) with support for type inference
😍 On-the-shelf adapters for Redux, DynamoDB, SQS, EventBridge and more
🎯 Test tools included
🔧 Migration & maintenance utils available
🎨 React components to visualize and model your event stores
And much more to come 🙌: Admin, snapshots, read models...