Skip to content

Core Features

Avinash-1994 edited this page Jan 5, 2026 · 1 revision

Deep Feature Analysis 🧪

1. Real-time Configuration Synchronization (Module 10)

This feature allows the development environment to stay in sync with the configuration without a "hard" process restart.

Security Architecture

  • Origin Validation: The WebSocket server strictly validates the Origin header to prevent Cross-Site WebSocket Hijacking (CSWSH).
  • Session Handshake: On connection, the server generates a cryptographically secure sessionToken that must be included in every config:update request.
  • Protected Paths: Critical settings (e.g., server.host, plugins, root) are locked in the LiveConfigManager and cannot be modified via the live API to prevent architectural subversion.
  • Rate Limiting: Throttles updates to one per 500ms to prevent browser-side flooding.

2. Universal Framework Adapters

Urja implements a tiered support system for modern frontend frameworks:

  • Tier 1 (Stable): React, Vue, Svelte, Solid, Lit. Includes full HMR and CSS-in-JS support.
  • Tier 2 (Beta): Qwik, Astro, Angular.
  • Metaframeworks: Specialized handlers for Next.js, Nuxt, and Remix via the ssr command.

3. The AI Self-Healing Engine

The engine uses a tiered feedback loop to fix broken builds:

  1. Parsing: Uses ErrorParser to extract file, line, and error type from build failures.
  2. Lookup: Checks the FixStore (local SQLite/JSON DB) for previously recorded successful fixes for that error signature.
  3. Generation: If no known fix exists, the FixGenerator uses heuristics and LLM suggestions to propose a code patch.
  4. Application: The FixApplier attempts to modify the source code, followed by an immediate build re-run to verify the fix.

4. Performance & Parallelism

Urja is built for the "Multi-Core Era":

  • Task Batching: In Stage 7, modules are grouped based on the ExecutionPlan.
  • Worker Isolation: Each transformation runs in a clean context to prevent state leakage between frameworks.
  • Deterministic Hashing: Every artifact filename is exactly canonicalHash(content).substring(0, 16), ensuring perfect browser caching.

5. Module Federation Core

Urja provides a lightweight implementation of Module Federation:

  • Host/Remote Separation: Defined via urja.config.ts.
  • Dynamic Remotes: Allows loading remote modules via internal __urja_require bridges without requiring a global webpack runtime.

Clone this wiki locally