@biglogic/rgs 3.7.2 β†’ 3.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/COPYRIGHT.md +4 -0
  2. package/FUNDING.yml +12 -0
  3. package/SECURITY.md +13 -0
  4. package/advanced.d.ts +9 -0
  5. package/core/advanced.d.ts +5 -0
  6. package/core/async.d.ts +8 -0
  7. package/core/env.d.ts +4 -0
  8. package/core/hooks.d.ts +17 -0
  9. package/core/minimal.d.ts +8 -0
  10. package/core/minimal.js +19 -0
  11. package/core/persistence.d.ts +23 -0
  12. package/core/plugins.d.ts +8 -0
  13. package/core/reactivity.d.ts +19 -0
  14. package/core/security.d.ts +56 -0
  15. package/core/store.d.ts +7 -0
  16. package/core/sync.d.ts +76 -0
  17. package/core/types.d.ts +164 -0
  18. package/core/utils.d.ts +2 -0
  19. package/docs/README.md +470 -0
  20. package/docs/SUMMARY.md +64 -0
  21. package/docs/_config.yml +1 -0
  22. package/docs/api.md +381 -0
  23. package/docs/chapters/01-philosophy.md +54 -0
  24. package/docs/chapters/02-getting-started.md +68 -0
  25. package/docs/chapters/03-the-magnetar-way.md +69 -0
  26. package/docs/chapters/04-persistence-and-safety.md +125 -0
  27. package/docs/chapters/05-plugin-sdk.md +290 -0
  28. package/docs/chapters/05-plugins-and-extensibility.md +190 -0
  29. package/docs/chapters/06-case-studies.md +69 -0
  30. package/docs/chapters/07-faq.md +53 -0
  31. package/docs/chapters/08-migration-guide.md +284 -0
  32. package/docs/chapters/09-security-architecture.md +50 -0
  33. package/docs/chapters/10-local-first-sync.md +146 -0
  34. package/docs/qa.md +47 -0
  35. package/index.d.ts +41 -0
  36. package/index.js +2100 -0
  37. package/package.json +74 -105
  38. package/plugins/index.d.ts +15 -0
  39. package/plugins/official/analytics.plugin.d.ts +9 -0
  40. package/plugins/official/cloud-sync.plugin.d.ts +22 -0
  41. package/plugins/official/debug.plugin.d.ts +2 -0
  42. package/plugins/official/devtools.plugin.d.ts +4 -0
  43. package/plugins/official/guard.plugin.d.ts +2 -0
  44. package/plugins/official/immer.plugin.d.ts +2 -0
  45. package/plugins/official/indexeddb.plugin.d.ts +7 -0
  46. package/plugins/official/schema.plugin.d.ts +2 -0
  47. package/plugins/official/snapshot.plugin.d.ts +2 -0
  48. package/plugins/official/sync.plugin.d.ts +4 -0
  49. package/plugins/official/undo-redo.plugin.d.ts +4 -0
  50. package/rgs-extension.vsix +0 -0
package/docs/README.md ADDED
@@ -0,0 +1,470 @@
1
+ # Argis (RGS) - Reactive Global State
2
+
3
+ > "The Magnetar" **Atomic Precision. Immutable Safety. Zen Simplicity.**
4
+ > The most powerful state management engine for React. Built for those who demand industrial-grade reliability with a zero-boilerplate experience.
5
+
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+ [![version](https://img.shields.io/npm/v/@biglogic/rgs.svg)](https://npmjs.org/package/@biglogic/rgs)
8
+ [![downloads](https://img.shields.io/npm/dm/@biglogic/rgs.svg)](https://npmjs.org/package/@biglogic/rgs)
9
+
10
+ ![Javascript](https://img.shields.io/badge/Javascript-gray?logo=Javascript)
11
+ ![React](https://img.shields.io/badge/React-gray?logo=React)
12
+ ![TypeScript](https://img.shields.io/badge/TypeScript-gray?logo=typescript)
13
+ ![Node.js](https://img.shields.io/badge/Node.js-gray?logo=node.js)
14
+ ![Jest](https://img.shields.io/badge/Jest-gray?logo=jest)
15
+ ![Playwright](https://img.shields.io/badge/Playwright-gray?logo=playwright)
16
+ ![ESLint](https://img.shields.io/badge/Eslint-gray?logo=eslint)
17
+ ![esbuild](https://img.shields.io/badge/esbuild-gray?logo=esbuild)
18
+
19
+ ![Snik](https://img.shields.io/badge/Snyk-gray?logo=Snyk)
20
+ ![Snik](https://img.shields.io/badge/Socket-gray?logo=socket)
21
+
22
+ <!-- [![GitBook](https://img.shields.io/static/v1?message=Documented%20on%20GitBook&logo=gitbook&logoColor=ffffff&label=%20&labelColor=5c5c5c&color=3F89A1)](https://a51.gitbook.io/rgs) -->
23
+
24
+ ---
25
+
26
+ ## 🌟 Why Magnetar?
27
+
28
+ We took the simplicity of **Reactive Global State (RGS)** and fused it with the architecture of a **High-Performance Kernel**. It's the only library that gives you:
29
+
30
+ - **πŸ’Ž Absolute Immutability**: Powered by **Immer**. No more manual spreads. State is frozen by default.
31
+ - **πŸ›‘οΈ Industrial-Grade Safety**: Deep Proxy guards that throw `Forbidden Mutation` errors if you try to bypass the kernel.
32
+ - **πŸ”Œ Enterprise Ecosystem**: A real plugin architecture with 10+ official modules (Sync, Storage, DevTools, etc.).
33
+ - **βš›οΈ Power on Demand**: Advanced async and persistence tools isolated in the `advanced` export.
34
+ - **πŸ—οΈ Stellar Architecture**: Zero circular dependencies. Modular, clean, and 100% type-safe.
35
+
36
+ ---
37
+
38
+ ## ggtate vs useState
39
+
40
+ | Feature | RGS ggtate | React useState |
41
+ |---------|--------|----------|
42
+ | **Global state across components** | βœ… Automatic sharing | ❌ Need Context/props |
43
+ | **Provider wrapper** | βœ… Not needed | ❌ Required |
44
+ | **Persistence (localStorage)** | βœ… Built-in | ❌ Manual |
45
+ | **Data encryption** | βœ… AES-256-GCM | ❌ |
46
+ | **Multiple namespaces/stores** | βœ… | ❌ |
47
+ | **Plugins (Immer, Undo/Redo)** | βœ… | ❌ |
48
+ | **Audit logging** | βœ… | ❌ |
49
+ | **RBAC/GDPR consent** | βœ… | ❌ |
50
+ | **SSR/Hydration** | βœ… Automatic | ❌ Manual |
51
+ | **Computed values** | βœ… | ❌ |
52
+
53
+ ### When to use what?
54
+
55
+ - **useState**: Local UI, single component, temporary state
56
+ - **gstate**:
57
+ - Shared state across multiple components
58
+ - Persistent data (preferences, cart, authentication)
59
+ - Sensitive data (encryption)
60
+ - Advanced features (undo/redo, snapshots)
61
+ - Enterprise (audit, RBAC, GDPR)
62
+
63
+ ---
64
+
65
+ ## βš”οΈ The Arena: RGS vs The World
66
+
67
+ |Feature|**RGS (Argis)**|Zustand|Redux Toolkit|Recoil|
68
+ |:---|:---|:---|:---|:---|
69
+ | **Philosophy** | **Zen State** | Minimalist | Enterprise Flux | Atomic |
70
+ | **API Surface** | **1 Function** | Simple | Complex | Complex |
71
+ | **Mutations** | **Magic (Immer)** | Manual Spreads | Magic (Immer) | Manual |
72
+ | **Selectors** | βœ… **Type-Safe** | βœ… Functional | βœ… Functional | ⚠️ Selectors |
73
+ | **Security** | πŸ›‘οΈ **AES-256 + RBAC** | ❌ None | ❌ Ecosystem | ❌ None |
74
+ | **Persistence** | πŸ’Ύ **First-class** | πŸ”Œ Middleware | πŸ”Œ Middleware | πŸ”Œ Effects |
75
+ | **Async** | βœ… **Atomic** | βœ… Async/Await | βœ… Thunks | βœ… Suspense |
76
+ | **Local-First Sync** | βœ… **Built-in** | ❌ None | ❌ None | ❌ None |
77
+ | **Bundle Size** | **~2kB** | ~1kB | >10kB | >20kB |
78
+
79
+ > **RGS** is the only library on the market that treats **Security** and **Persistence** as first-class citizens.
80
+
81
+ ---
82
+
83
+ ### Installation
84
+
85
+ ```shell
86
+ npm install @biglogic/rgs
87
+ ```
88
+
89
+ ---
90
+
91
+ ### Examples and guide
92
+
93
+ **[github.com/BigLogic-ca/rgs](https://github.com/BigLogic-ca/rgs)**
94
+
95
+ ---
96
+
97
+ ## πŸ—οΈ Architecture
98
+
99
+ ```mermaid
100
+ graph TB
101
+ subgraph API
102
+ A[gstate] --> D[IStore]
103
+ B[useStore] --> D
104
+ C[createStore] --> D
105
+ end
106
+
107
+ D --> E[Storage Adapter]
108
+ D --> F[Immer Proxy]
109
+ D --> G[Plugins]
110
+ D --> H[Security]
111
+ D --> I[Async Store]
112
+
113
+ E --> J[local]
114
+ E --> K[session]
115
+ E --> L[memory]
116
+
117
+ G --> M[UndoRedo]
118
+ G --> N[Sync]
119
+ G --> O[Schema]
120
+ G --> P[Analytics]
121
+ ```
122
+
123
+ ### Core Components
124
+
125
+ | Component | Description |
126
+ |-----------|-------------|
127
+ | **gstate()** | Creates store + hook in one line |
128
+ | **useStore()** | React hook for subscribing to state |
129
+ | **createStore()** | Classic store factory |
130
+ | **IStore** | Core interface with get/set/subscribe |
131
+ | **StorageAdapters** | local, session, memory persistence |
132
+ | **Plugins** | Immer, Undo/Redo, Sync, Schema, etc. |
133
+ | **Security** | Encryption, RBAC, GDPR consent |
134
+
135
+ ---
136
+
137
+ ## Requirements
138
+
139
+ - **React 16.8+** (for hooks support)
140
+ - **React DOM**
141
+
142
+ ## ⚑ Zero-Boilerplate Quickstart
143
+
144
+ ### Path A: The Zen Way (Modular)
145
+
146
+ Best for modern applications. Clean imports, zero global pollution, **Type-Safe**.
147
+
148
+ ```tsx
149
+ import { gstate } from '@biglogic/rgs'
150
+
151
+ // 1. Create a typed store hook
152
+ const useCounter = gstate({ count: 0, user: { name: 'Alice' } })
153
+
154
+ // 2. Use with Type-Safe Selectors (Preferred)
155
+ const count = useCounter(state => state.count)
156
+ const userName = useCounter(state => state.user.name)
157
+
158
+ // OR use string keys (Legacy)
159
+ const [count, setCount] = useCounter('count')
160
+ ```
161
+
162
+ ### Path B: The Classic Way (Global)
163
+
164
+ Best for shared state across the entire application.
165
+
166
+ ```tsx
167
+ // 1. Initialize once
168
+ import { initState, useStore } from '@biglogic/rgs'
169
+ initState({ namespace: 'app' })
170
+
171
+ // 2. Use anywhere
172
+ const [user, setUser] = useStore('user')
173
+ ```
174
+
175
+ ---
176
+
177
+ ## πŸ›‘οΈ Security Architecture
178
+
179
+ RGS includes enterprise-grade security features to protect your application and user data:
180
+
181
+ ### ReDoS Protection
182
+ All regex patterns used in RBAC permission matching include timeout protection (100ms) to prevent Regex Denial of Service attacks.
183
+
184
+ ### Safe UUID Generation
185
+ Falls back to cryptographically secure random UUID generation when native `crypto.randomUUID()` is unavailable.
186
+
187
+ ### Input Validation
188
+ - **Storage Key Validation**: Keys are validated against `/^[a-zA-Z0-9_.-]+$/` to prevent injection attacks
189
+ - **Value Sanitization**: All persisted values are sanitized to prevent XSS attacks
190
+
191
+ ### Encryption
192
+ - **AES-256-GCM**: Industry-standard encryption for sensitive data
193
+ - **Encoded Mode**: Use `{ encoded: true }` option for base64-encoded storage (note: renamed from `secure` for clarity)
194
+
195
+ ### GDPR Compliance
196
+ - Consent management system
197
+ - Data export (`exportData()`)
198
+ - Data deletion (`deleteData()`)
199
+
200
+ ### Development vs Production
201
+ Global `gstate` exposure to window is only enabled in development mode (`NODE_ENV !== 'production'`).
202
+
203
+ ---
204
+
205
+ ## πŸ“š Quick Examples
206
+
207
+ ```tsx
208
+ const store = gstate({ theme: 'dark' }, "my-app")
209
+ ```
210
+
211
+ ### Encryption
212
+
213
+ ```tsx
214
+ const secureStore = gstate({ token: 'xxx' }, { encoded: true })
215
+ ```
216
+
217
+ ### Undo/Redo
218
+
219
+ ```tsx
220
+ const store = gstate({ count: 0 })
221
+ store._addPlugin(undoRedoPlugin({ limit: 50 }))
222
+
223
+ store.undo()
224
+ store.redo()
225
+ ```
226
+
227
+ ### Cross-Tab Sync
228
+
229
+ ```tsx
230
+ const store = gstate({ theme: 'light' })
231
+ store._addPlugin(syncPlugin({ channelName: 'my-app' }))
232
+ ```
233
+
234
+ ```tsx
235
+ const store = gstate({ firstName: 'John', lastName: 'Doe' })
236
+ store.compute('fullName', (get) => `${get('firstName')} ${get('lastName')}`)
237
+
238
+ const [fullName] = store('fullName') // "John Doe"
239
+ ```
240
+
241
+ ### Error Handling with onError
242
+
243
+ Handle errors gracefully with the `onError` callback - perfect for production apps:
244
+
245
+ ```tsx
246
+ const store = gstate({ data: null }, {
247
+ onError: (error, context) => {
248
+ console.error(`Error in ${context.operation}:`, error.message)
249
+ // Send to error tracking service (Sentry, etc.)
250
+ }
251
+ })
252
+ ```
253
+
254
+ ### Size Limits (maxObjectSize & maxTotalSize)
255
+
256
+ Protect your app from memory issues with automatic size warnings:
257
+
258
+ ```tsx
259
+ const store = gstate({ data: {} }, {
260
+ // Warn if single value exceeds 5MB (Default is 0/Disabled for performance)
261
+ maxObjectSize: 5 * 1024 * 1024,
262
+ // Warn if total store exceeds 50MB (Default is 0/Disabled)
263
+ maxTotalSize: 50 * 1024 * 1024
264
+ })
265
+ ```
266
+
267
+ ### Local-First Sync (Offline-by-Default)
268
+
269
+ RGS now includes a powerful Local-First Sync Engine that makes your app work offline by default:
270
+
271
+ ```tsx
272
+ import { gstate, useSyncedState } from '@biglogic/rgs'
273
+
274
+ // Create store with built-in sync
275
+ const store = gstate({
276
+ todos: [],
277
+ user: null
278
+ }, {
279
+ namespace: 'myapp',
280
+ sync: {
281
+ endpoint: 'https://api.example.com/sync',
282
+ // Use a getter function to avoid exposing token in memory
283
+ authToken: () => localStorage.getItem('auth_token'),
284
+ autoSyncInterval: 30000, // Sync every 30s
285
+ syncOnReconnect: true, // Auto-sync when back online
286
+ strategy: 'last-write-wins' // Conflict resolution
287
+ }
288
+ })
289
+
290
+ // Use in React - automatically synced!
291
+ function TodoList() {
292
+ const [todos, setTodos] = useSyncedState('todos')
293
+
294
+ // Works offline automatically
295
+ const addTodo = (text) => {
296
+ setTodos([...todos, { id: Date.now(), text }])
297
+ }
298
+
299
+ return <div>{/* ... */}</div>
300
+ }
301
+ ```
302
+
303
+ ---
304
+
305
+ ## Multiple Stores
306
+
307
+ You can create multiple independent stores using namespaces:
308
+
309
+ ```tsx
310
+ // Option 1: gstate with namespace
311
+ const userStore = gstate({ name: 'John' }, { namespace: 'users' })
312
+ const appStore = gstate({ theme: 'dark' }, { namespace: 'app' })
313
+
314
+ // In components - same key, different stores
315
+ const [name] = userStore('name') // 'John'
316
+ const [theme] = appStore('theme') // 'dark'
317
+
318
+ // Option 2: initState + useStore (global default store)
319
+ initState({ namespace: 'global' })
320
+ const [value, setValue] = useStore('key')
321
+ ```
322
+
323
+ **Tip**: Keys are unique per-namespace, so you can use the same key name in different stores.
324
+
325
+ ## πŸš€ Advanced Superpowers
326
+
327
+ ### πŸ”Œ Official Plugin Ecosystem
328
+
329
+ Extend the core functionality dynamically with specialized modules.
330
+
331
+ 1. **ImmerPlugin**: Adds `setWithProduce` for functional updates.
332
+ 2. **UndoRedoPlugin**: Multi-level history management.
333
+ 3. **PersistencePlugin**: Advanced storage with custom serialization.
334
+ 4. **SyncPlugin**: Cross-tab state synchronization via BroadcastChannel.
335
+ 5. **SchemaPlugin**: Runtime validation (perfect for Zod).
336
+ 6. **DevToolsPlugin**: Redux DevTools integration.
337
+ 7. **TTLPlugin**: Time-to-live management.
338
+ 8. **AnalyticsPlugin**: Tracking bridge for metrics.
339
+ 9. **SnapshotPlugin**: Manual state checkpointing.
340
+ 10. **GuardPlugin**: Data transformation layer.
341
+ 11. **Local-First Sync**: Built-in offline-first with auto-sync (NEW!)
342
+
343
+ ```typescript
344
+ import { createStore, PersistencePlugin, undoRedoPlugin } from '@biglogic/rgs'
345
+
346
+ const store = createStore()
347
+ store._addPlugin(PersistencePlugin({ storage: 'localStorage' }))
348
+ store._addPlugin(undoRedoPlugin({ limit: 50 }))
349
+
350
+ // Undo like a pro
351
+ store.undo()
352
+ ```
353
+
354
+ ### πŸ”¬ Power Tools (Import from `rgs/advanced`)
355
+
356
+ Need the heavy artillery? We've got you covered.
357
+
358
+ - `createAsyncStore(fetcher)`: Atomic async state management.
359
+ - `StorageAdapters`: High-level interfaces for any storage engine.
360
+ - `Middleware / IPlugin`: Build your own extensions.
361
+
362
+ ---
363
+
364
+ ## πŸ›‘οΈ Quality & Testing
365
+
366
+ RGS is built with an obsession for reliability. Our test suite covers multiple layers to ensure zero-regressions:
367
+
368
+ - **Unit Tests (Jest)**: 100+ tests covering core logic, stores, and hooks.
369
+ - **E2E Tests (Playwright)**: Real-world browser testing for cross-tab synchronization and Web Crypto API.
370
+ - **Concurrency Testing**: Verification of race conditions in multi-tab environments.
371
+
372
+ ```bash
373
+ # Run unit tests
374
+ npm run test
375
+
376
+ # Run E2E tests
377
+ npm run test:e2e
378
+ ```
379
+
380
+ ---
381
+
382
+ ## πŸ“¦ Ultra-Minimal Build (< 2KB)
383
+
384
+ RGS provides an **ultra-minimal** version for projects where bundle size is critical. This version includes only the core state management functionality.
385
+
386
+ > [!WARNING]
387
+ > ⚠️ **Not indicated for security and enterprise-level applications.**
388
+ > For production apps requiring AES-256 encryption, RBAC, GDPR compliance, or audit logging, use the full version.
389
+
390
+ ---
391
+
392
+ ### What's Included
393
+
394
+ - `createStore()` - Create a reactive store
395
+ - `get(key)` - Read values
396
+ - `set(key, value)` - Update values with automatic immutability
397
+ - `subscribe(listener)` - Subscribe to changes
398
+
399
+ ### What's NOT Included (Full Features)
400
+
401
+ - ❌ Persistence (localStorage, etc.)
402
+ - ❌ Security (RBAC, encryption)
403
+ - ❌ Sync/Cloud features
404
+ - ❌ Plugin system
405
+ - ❌ Immer integration
406
+ - ❌ Computed values
407
+ - ❌ React hooks
408
+
409
+ ### How to Use
410
+
411
+ #### Minimal Version (~0.16 KB)
412
+
413
+ For maximum performance and minimum bundle size:
414
+
415
+ ```javascript
416
+ // Import minimal version
417
+ import { createStore } from '@biglogic/rgs/core/minimal'
418
+
419
+ const store = createStore({ count: 0 })
420
+
421
+ // Basic operations
422
+ store.get('count') // β†’ 0
423
+ store.set('count', 5) // β†’ true
424
+ store.subscribe(() => console.log('changed!'))
425
+ ```
426
+
427
+ #### Full Version (~32 KB)
428
+
429
+ For production apps with all features:
430
+
431
+ ```javascript
432
+ // Import full version (default)
433
+ import { gstate, createStore } from '@biglogic/rgs'
434
+
435
+ // Zen way - creates hook + store
436
+ const useCounter = gstate({ count: 0 })
437
+ const count = useCounter(s => s.count)
438
+
439
+ // Classic way
440
+ const store = createStore({ count: 0 })
441
+ store.set('count', 5, { persist: true })
442
+ store._addPlugin(undoRedoPlugin())
443
+ ```
444
+
445
+ ### When to Use What?
446
+
447
+ | Scenario | Use | Size |
448
+ |----------|-----|------|
449
+ | Embedded/IoT | Minimal | 0.16 KB |
450
+ | Widgets/Badges | Minimal | 0.16 KB |
451
+ | React Apps | Full | ~32 KB |
452
+ | Enterprise | Full | ~32 KB |
453
+
454
+ ### Size Comparison
455
+
456
+ | Version | Size | Use Case |
457
+ |---------|------|----------|
458
+ | **Minimal** | 0.16 KB | Embedded systems, tiny apps |
459
+ | **Full** | ~32 KB | Production apps |
460
+
461
+ ---
462
+
463
+ ## πŸ“„ License
464
+
465
+ MIT Β© [Dario Passariello](https://github.com/dpassariello)
466
+
467
+ ---
468
+
469
+ **Designed for those who build the future.**
470
+ Made with ❀️ and a lot of caffe' espresso!
@@ -0,0 +1,64 @@
1
+ # 🌌 Argis (RGS) - Reactive Global State: The Final Guide
2
+
3
+ Welcome to the definitive documentation for **Reactive Global State (RGS)**. If you are here, you're likely tired of endless boilerplate, complex configurations, and state management tools that seem to require a PhD in rocket science.
4
+
5
+ This documentation is written for everyone: from **easy setup** for those who just want things to work, to **advanced implementation** for those who want to master the engine.
6
+
7
+ ---
8
+
9
+ ## πŸ—ΊοΈ Summary
10
+
11
+ - **[The Philosophy: Panzer vs. Bicycle](chapters/01-philosophy.md)**
12
+ - Reliability and Security as First-Class Citizens.
13
+ - The "Ironclad" Core: Simplicity meets Power.
14
+
15
+ - **[Quick Start: 30-Second Setup](chapters/02-getting-started.md)**
16
+ - Deploying the RGS Panzer in your React project.
17
+
18
+ - **[The Magnetar Way: One-Liner Power](chapters/03-the-magnetar-way.md)**
19
+ - Creating stores and hooks simultaneously. Types included.
20
+
21
+ - **[Persistence and Safety](chapters/04-persistence-and-safety.md)**
22
+ - Never lose user data again (without localStorage headaches).
23
+ - Native immutability with Immer (Stellar Engine).
24
+
25
+ - **[Ecosystem and Plugins](chapters/05-plugins-and-extensibility.md)**
26
+ - DevTools, Cross-Tab Sync, Analytics, and Typed Plugins.
27
+
28
+ - **[Plugin SDK: Build Your Own Extensions](chapters/05-plugin-sdk.md)**
29
+ - Create custom plugins with lifecycle hooks.
30
+ - Register methods via `store.plugins`.
31
+ - Full API reference and examples.
32
+
33
+ - **[Case Studies: Real World Strategies](chapters/06-case-studies.md)**
34
+ - **E-commerce**: Cart isolation and atomic updates.
35
+ - **Dashboards**: Multi-store strategies and complex flows.
36
+
37
+ - **[Architectural Insights (FAQ)](chapters/07-faq.md)**
38
+ - Honest answers on security, performance, and Proxies.
39
+
40
+ - **[Migration Guide](chapters/08-migration-guide.md)**
41
+ - Upgrading to latest version (Enterprise Isolation)
42
+ - Upgrading to previous version (`secure` β†’ `encoded`)
43
+
44
+ - **[Security Architecture & Hardening](chapters/09-security-architecture.md)**
45
+ - Advanced XSS prevention and deep cloning reliability.
46
+ - AES-256-GCM and RBAC.
47
+
48
+ - **[Local-First Sync Engine](chapters/10-local-first-sync.md)**
49
+ - Offline-by-default with automatic background sync.
50
+ - Conflict resolution strategies (last-write-wins, merge, etc.).
51
+ - `useSyncedState` hook for React components.
52
+
53
+ ---
54
+
55
+ ## Reference
56
+
57
+ - **[API Reference](api.md)**
58
+ - Complete API documentation
59
+ - Type definitions
60
+ - Plugin hooks
61
+
62
+ ---
63
+
64
+ > *"Make things simple, but not simpler than necessary."* – RGS Team
@@ -0,0 +1 @@
1
+ theme: jekyll-theme-modernist