Skip to content

Latest commit

 

History

History
103 lines (70 loc) · 3.71 KB

File metadata and controls

103 lines (70 loc) · 3.71 KB

@beyond-js/reactive

TypeScript JavaScript NodeJS Browser

@beyond-js/reactive is a powerful TypeScript library designed to provide a Data Intelligence Layer for your application. By centralizing business logic, validation, and reactivity within your data structures, it enables developers to build scalable, framework-agnostic applications that are incredibly easy for AI agents to understand and maintain.


🧭 Documentation Journey

Choose your path to master @beyond-js/reactive:

1. Vision and Basics

2. Fundamentals

3. Domain Entities

  • Items: Managing individual entities with IDs and lifecycle.
  • Collections: Groups of items with filtering and pagination.
  • Nested Properties: Modeling complex relationships.

4. Reactive Structures

5. Advanced & Architecture


✨ Why Choose This Library?

🎯 Data-First Logic

Stop leaking validation and business rules into your React components. Define them once in your models and use them anywhere (Frontend, Backend, Mobile).

🤖 AI-Native Development

AI agents (Cursor, Copilot) perform best when code has explicit structure. This library's use of Zod and encapsulated logic makes it self-documenting for AI.

🔌 Framework Agnostic

Compatible with React, Vue, Svelte, or Node.js. It doesn't replace Zustand or Redux—it handles the data layer while they handle the UI state.

✅ Built-in Intelligence

  • Zod Validation: Native schema integration.
  • Change Tracking: Automatically detect unpublished changes.
  • Event System: Fine-grained reactivity.

🚀 Quick Start Snippet

import { Item } from '@beyond-js/reactive/entities/item';

class Product extends Item<IProduct> {
	constructor(data) {
		super({
			entity: 'products',
			properties: ['name', 'price'],
			...data,
		});
	}
}

const myProduct = new Product({ name: 'Laptop', price: 999 });
myProduct.on('change', () => console.log('Updated!'));
myProduct.name = 'Pro Laptop'; // Triggers event

🤝 Community & Support