STRVCT

A naked-objects framework for JavaScript

About

You write the domain model. The framework handles the rest.

STRVCT is a JavaScript framework that eliminates manual UI component authoring, state management boilerplate, and API glue code. By declaring your application's domain model once with property metadata annotations, STRVCT automatically derives responsive user interfaces, manages local-first IndexedDB persistence, handles versioned cloud synchronization, and provides a constant-size tool surface for AI agents.

This approach implements the Naked Objects architectural pattern: annotated domain classes (inheriting from SvStorableNode) serve as the single source of truth. Because domain models contain zero DOM or browser dependencies, the exact same application code runs natively in the browser, on the command line, or headlessly in Node.js for ultra-fast unit testing.

Architecture Overview

Annotated Domain Model (SvStorableNode Subclasses) Single source of truth declaring property slots, subnodes, and metadata annotations Auto-Generated UI Miller column views, tabs, & doc flows Local & Cloud Sync IndexedDB pools & SHA-256 CAS store Headless Execution Runs in Node.js with zero DOM dependencies Native AI Tool Surface Constant tool size: schema-fetch & patch

Model-First Syntax

Declare domain models as JavaScript classes. Properties are declared as slots with method-chained metadata annotations that each framework layer reads independently:

(class Task extends SvStorableNode {

    initPrototypeSlots () {
        this.newSlot("title", "New Task")
            .setSlotType("String")
            .setShouldStoreSlot(true)   // Persisted to IndexedDB
            .setSyncsToView(true)       // Live UI updates
            .setCanEditInspection(true); // Editable form tile

        this.newSlot("isCompleted", false)
            .setSlotType("Boolean")
            .setShouldStoreSlot(true)
            .setSyncsToView(true)
            .setCanEditInspection(true);
    }

    initPrototype () {
        this.setTitle("Task");
        this.setShouldStore(true);
    }

}.initThisClass());

A single 5-line slot declaration replaces a custom form component, a validator, an ORM storage schema, and an LLM tool specification.

Key Framework Capabilities

  • Recursive Master-Detail Engine — Derives orientation-flexible Miller columns, side-by-side tabs, and inline document section flows that compose recursively across the object graph and collapse automatically on narrow viewports.
  • Multi-Reader Slot Annotations — Slot metadata drives form generation, type validation, local persistence, notification triggers, Property Inspector fields, and LLM JSON schemas without glue code.
  • Natively AI-Operable (O(1) Tool Surface) — Traditional stacks force AI agents to generate code across 5 separate layers per feature (causing O(N) tool growth). STRVCT flips this: because UI, persistence, and sync are derived from slot metadata, AI agents operate over a constant-size O(1) tool surface (schema-fetch and apply-patch) regardless of scale, and can even mint brand-new model classes at runtime.
  • Local-First & Cloud Sync — Automatic dirty tracking commits modifications to IndexedDB at the end of each event loop. Syncs versioned atomic deltas to cloud stores.
  • Headless Node.js Execution — Domain models hold zero DOM dependencies, running headlessly in Node.js for ultra-fast unit testing and batch processing.
  • Derived Accessibility & Localization — ARIA roles, focus management, keyboard navigation, and AI string translations are handled centrally at the tile primitive boundary.
  • Content-Addressable Memory (CAM) — Scans source imports to build SHA-256 content-hashed bundles for optimal caching and zero-churn redeployments.

Documentation

Guides, architecture, and API reference.

View →

Getting Started

Setup, integration, directory conventions, build pipeline, and running your first Strvct application.

View →

Technical Overview

High-level architecture, core design philosophy, and system-wide concepts of the Strvct framework.

View →

Comparing to React

A technical guide and conceptual "Rosetta Stone" for React developers exploring Strvct.

View →

Implementation Overview

Deep technical specifications for class lifecycle, slots, views, persistence, notifications, and build infrastructure.

View →

Naked Objects

From Domain Models to Complete Applications

View →

AI Services

Framework architecture for multi-provider AI integration, streaming execution, tool calling, and model-first operability.

View →

Project Timeline

Key milestones from the first commit through present day

View →

Example App

A complete contacts application in four classes, with zero view code.

View →

FAQ

Frequently asked questions about STRVCT.

View →

GitHub Repository

Source code, issues, and contributions.

View →

For AI agents: llms.txt (curated index) and llms-full.txt (full content).