STANDARDS_GUIDE.md • ARCHITECTURAL SHOWCASE

Standards-First Web Architecture

A living showcase evaluating modern web platform primitives and lightweight custom elements against heavyweight framework abstractions.

Philosophy: Standards Over Framework Lock-In

Core Thesis

Can modern web standards reproduce the clean separation of concerns and robust testability historically sought through proprietary application frameworks, while eliminating runtime bloat and fragile hydration hierarchies? This showcase demonstrates that native platform APIs provide production-grade answers for every architectural requirement.

1. Component Model & Lit

Custom Elements + Shadow DOM

Standard custom elements registered natively via customElements.define(). Lit is adopted purely as a minimal reactive view layer (~5KB gzipped), eliminating proprietary virtual DOM reconcilers or runtime lock-in.

2. Form-Associated Custom Elements

ElementInternals

Built using this.attachInternals() with static formAssociated = true. Participates directly in native <form> lifecycle, setValidity() constraint validation, and browser password autofill without external form libraries.

3. Native HTML <dialog>

Top Layer & Backdrop

Employs .showModal() for native top-layer stacking, automatic focus trapping, <Esc> dismissal, and ::backdrop styling. Clean submission and dismissal via standard <form method="dialog">.

4. HTML Popover API

Zero-JS Overlays

Replaces bulky floating/overlay libraries (Popper, Floating UI). Utilizes declarative popover="auto" and popovertarget for light-dismiss, top-layer placement, and built-in accessibility.

5. View Transitions API

Native Morphing

Employs document.startViewTransition() to smoothly interpolate multi-page HTML updates without hard page flashes, retaining audio context and persistent application shell state.

6. Web Audio API & Threshold Overlay

Dynamic Soundscape

Synthesizes background drone audio indicating listening mode. Dynamically overlays alert beeps when nodes exceed thresholds: WARNING (2.0s interval) and CRITICAL (0.5s interval), continuing seamlessly across page transitions.

7. CSS @layer & @container Queries

Modern Cascade

Cascades structured deterministically with CSS @layer (reset, tokens, base, layout, components). Grid elements respond to container dimensions using @container queries rather than global viewport media queries.

8. Native Virtualization & IntersectionObserver Paging

content-visibility + Sentinel Paging

Rather than importing heavy virtual-scroller libraries that disrupt screen readers and break native in-page search (Ctrl+F), this showcase pairs content-visibility: auto with a native IntersectionObserver sentinel. The browser engine skips layout/paint for offscreen items, while the sentinel seamlessly triggers on-demand data chunking as users scroll.

9. State Decoupling, Storage DI & Multi-Tab Isolation

EventTarget + StorageLike

Domain stores (AuthStore, TelemetryStore, AudioStore) extend standard browser EventTarget, completely decoupled from UI components and distributed via W3C DOM Context. Storage is threaded via constructor dependency injection with an in-memory fallback for test isolation, while tab duplication is handled natively via sessionStorage cloning.

← Return to Gateway Login