High-level architecture, core design philosophy, and system-wide concepts of the Strvct framework.
Strvct is an open-source, local-first Naked Objects framework built in client-side JavaScript. Instead of requiring developers to manually author and maintain separate domain models, UI component trees, form layouts, validators, client-side state stores, persistence mappings, localization dictionaries, and AI agent tool specifications, Strvct derives the complete application interface and operational infrastructure automatically from an annotated domain model.
Applications built with Strvct operate as single-page web applications (SPAs) executing natively in the browser. The system is designed from the ground up for local-first execution: application state is stored locally in IndexedDB object pools, enabling instant, zero-latency user interaction and full offline functionality. When online, local object pools synchronize transparently with versioned cloud stores.
Unlike traditional component frameworks (React, Vue, Svelte, Flutter) or compile-time code generators:
SvNodeView.Strvct organizes applications into three distinct layers connected by an asymmetric notification architecture:
SvNode Graph):SvNode (or SvStorableNode).SvNodeView Tree):SvStackView, SvNavView, SvTilesView, SvTile).SvPersistentObjectPool):The cornerstone of Strvct's architecture is the Slot Annotation System. Instead of raw instance variables, domain properties are declared as slots with metadata annotations.
Slot annotations act as a multi-reader decoupling bridge. Each framework subsystem reads slot metadata independently to perform its job without cross-system dependencies:
+---> UI Generation (Property Tiles & Control Types)
|
+---> Local Storage & Cloud Sync (IndexedDB Records)
|
[ Slot Metadata Bridge ] -+---> Notification Engine (Coalesced Sync Passes)
|
+---> Native AI Tool Surface (JSON Patch Validation)
|
+---> Accessibility & i18n (ARIA Roles & Translation)| Annotation Settor | Purpose & Subsystem Consumer |
|---|---|
setSlotType("String") | Selects tile UI input control type, runtime type validation, and AI JSON schema generation. |
setShouldStoreSlot(true) | Directs SvPersistentObjectPool to include property in serialized storage records. |
setSyncsToView(true) | Instructs model setter to post notification triggers to active observing views. |
setCanEditInspection(true) | Exposes property in the modifier-click (Option+Click) live Property Inspector. |
setIsSubnodeField(true) | Exposes complex properties as navigable child nodes in the UI inspector hierarchy. |
setFinalInitProto(ClassName) | Auto-instantiates default child objects during initialization if absent from storage. |
Strvct enforces an asymmetric, notification-driven synchronization architecture:
character.setName("Thorin")).SvNotificationCenter.SvSyncScheduler.SvSyncScheduler deduplicates multiple mutations within the same event loop, executing a single UI re-render pass at the end of the loop. If setter values have converged, sync halts automatically, preventing infinite update loops.Strvct combines local-first speed with seamless cloud synchronization:
poolId and puuid (persistent UUID).{ "*": puuid }.{ "**": poolId }.SvBlobPool.Real-world Naked Objects applications load hundreds of domain classes, view handlers, and style assets into the browser. Traditional ES module loading (hundreds of individual HTTP requests) creates severe network latency, while standard Webpack/Vite bundlers invalidate full chunks on minor file edits.
Strvct solves this with a Content-Addressable Memory (CAM) build and delivery pipeline:
[ Build Stage: ImportsIndexer ]
Scan _imports.json tree ---> Compute SHA-256 for each file
---> Produce _index.json (path -> hash) & _cam.json.zip (compressed content)
[ Runtime Stage: SvResourceManager & SvHashCache ]
Fetch _index.json ---> Compare against IndexedDB SvHashCache
---> If delta ratio > 30%: Download _cam.json.zip in 1 request
---> If delta ratio <= 30%: Download only missing hash fileseval() with embedded sourceURL annotations, providing complete DevTools debugger capabilities (breakpoints, stack traces, step execution).Because Strvct centralizes the pipeline from slot annotations to runtime views, several high-value capabilities fall out of the architecture automatically:
schema-fetch + apply-patch). AI agents inspect schemas and patch live object graphs directly with automatic schema validation.SvStackView) automatically collapse into mobile push/pop stacks with interactive breadcrumb headers on narrow viewports.