Three-Layer Web Architecture

DOM-First 3-Layer Web Application Architecture

Ashlar divides web applications into three clean layers: a decoupled Presentation Layer (Ashlar’s semantic SCSS design system, or any CSS framework you prefer such as Tailwind or Bootstrap), autonomous DOM Runtime components controlled through data-ln-* attributes, and a local-first Application Runtime with IndexedDB storage, FIFO offline queues, and client routing.

Stratified State Management

What lives where in an Ashlar application

Rather than mirroring every bit of state in JavaScript memory, Ashlar stratifies state by observability requirements so DevTools always shows the real truth.

State Tier Lives In Examples Inspectable Via
Control State DOM attributes (data-ln-*) Open/closed, active tab, sort direction, filter, mode DevTools Elements Inspector
Application Data ln-data-store + IndexedDB Records, row caches, offline write outbox DevTools → Application → IndexedDB
Operational Mechanics Private JS memory AbortController, MutationObserver, queryGen, batchers Private runtime internals by design
Three layered smoked-glass and aluminum planes illustrating Ashlar’s Design System, DOM Runtime, and Application layers
Autonomous Components

Zero sibling imports, initialized by one MutationObserver

Components bind via data-ln-* attributes, dispatch bubbling ln-{name}:{action} CustomEvents, and remain teleport-safe anywhere in the DOM.

  • Overlays & Interaction

    ln-modal, ln-popover, ln-tooltip, ln-confirm, ln-dropdown, ln-toast, ln-key, and ln-scroll built on native <dialog> and the Popover API.

  • Data Display & Virtualization

    ln-table, ln-list, ln-chart, ln-progress, ln-circular-progress, ln-stat, and sliding-window server virtualization via window-cache.

  • Forms, Validation & I18n

    ln-form, ln-validate, ln-upload, ln-autosave, ln-picklist, ln-repeater, ln-translations, ln-date, ln-number, ln-editor, and ln-slug.

  • Local-First Data & Sync

    ln-data-store, ln-data-coordinator, ln-api-queue, ln-api-connector, ln-couchdb-connector, ln-websocket-connector, ln-filter, ln-search, and ln-sort.

  • Routing & State Primitives

    ln-router, ln-nav, ln-tabs, ln-toggle, ln-accordion, ln-sortable, ln-ajax, ln-include, ln-link, and ln-external-links.

  • Security, Crypto & Diagnostics

    ln-crypto (Web Crypto AES-GCM), ln-obfuscator, ln-icon sprite caching, ln-time, ln-persist, ln-reactive, and ln-debug contract verifier.

3-Axis Orthogonal Theming

Nest arbitrary theme islands anywhere in the DOM

Separate polarity (data-mode), brand palette (data-theme), and surface skin (data-skin). Any container overrides scope locally via the CSS cascade with zero specificity wars.

  • Independent polarity (light, dark), brand palettes, and physical skins

  • Every token, border, shadow, and focus ring re-derives automatically

  • WCAG 2.2 AA target with 1.4.6 Contrast (Enhanced) met across shipped pairs

Explore Scoped Themes in Demo
Live Scoped Island

Independent Theme Scope

This card isolates its own data-mode="dark" and data-theme from the rest of the document. Switch its local palette below without affecting the page:

Theming Docs
Decoupled Presentation & Domain Coordinators

Bring Ashlar’s SCSS design system — or any CSS framework

CSS is completely independent of JS logic. Use Ashlar’s semantic SCSS mixins and 3-axis theme tokens, opt into the Tailwind CSS v4 @theme adapter, or drop the visual theme altogether and style with Tailwind, Bootstrap, or custom CSS on top of the minimal functional core (ln-ashlar-core.css).

  • Zero CSS Lock-In (SCSS, Tailwind, Bootstrap, or Custom)

    JavaScript components only mutate data-ln-* and native ARIA/hidden attributes — never styling classes or inline styles. Choose Ashlar’s compiled SCSS design system, its Tailwind v4 @theme adapter, or pair ln-ashlar-core.css with Tailwind, Bootstrap, or your own stylesheet.

  • Production Case Study: ln-mixer

    Custom Layer 2 coordinators extend Ashlar beyond CRUD portals. ln-mixer is a 2-deck DJ audio workstation featuring real-time waveforms, loop cues, and offline PWA support built on Ashlar primitives and one audio waveform library with zero Virtual DOM.

Quick Start

Install and run in under two minutes

1. Install via npm
npm install @livenetworks/ashlar
2. Import prebuilt bundles (JS + CSS)
import '@livenetworks/ashlar';
import '@livenetworks/ashlar/full.css'; // or ./landing.css, ./core.css (for Tailwind, Bootstrap, or custom CSS)
3. Or load compiled IIFE assets in static HTML
<link rel="stylesheet" href="ln-ashlar-landing.css">
<script src="ln-ashlar.iife.js" defer></script>

Interactive Ashlar Modal & Validation

This dialog runs on native <dialog> via ln-modal and validates inputs using native browser ValidityState via ln-validate. Try submitting empty fields to see it in action.

Commercial Licensing Inquiries

When conveying ln-ashlar inside closed-source commercial web products, proprietary SaaS frontends, or client deliverables where you want unambiguous proprietary distribution rights without GPLv3 copyleft obligations, organizations obtain a commercial license from Live Networks.

Licensing Contact (Protected by ln-obfuscator) yvprafvat@yvirargjbexf.zx

Include your organization name, target product or project count, and whether you need dedicated architecture review or integration guidance.