Introduction to relatix
relatix makes it easy to create and manipulate relational data in TypeScript.
Create, link, and query your tables effortlessly without compromising type safety. Its clear, intuitive syntax lets you define interconnected tables and populate them with consistent data thanks to strong typing of the initial state.
Why choose relatix?
✅ Declarative modelling
- Define your tables and their relationships in just a few lines using Typers (
Text,Number,SelfRef,Ref). - References are verified at compile‑time.
✅ Strong, automatic typing
- Table schemas, refs, selectors, and commits are all generated by inference.
- Zero hidden
any: your IDE and CI catch inconsistencies before runtime.
✅ Smooth, fluent workflow
- Build your tables step by step:
.addTables()accepts refs to tables already defined. .populate()injects coherent, type‑checked data with ease.
✅ "Batteries‑included" utilities
select,deepSelect,create,commit… everything you need to read, mutate, or navigate your data is ready out of the box.- Customise id and label generation with
TableOptionsfor clearer debugging.
✅ Performance and maintainability
- Memoised selectors: recalculated only when the target table changes.
