| title | Visual architecture |
|---|---|
| description | Mermaid diagrams for Renderify data flow, package boundaries, security, and browser execution. |
This document provides visual diagrams for the main Renderify architecture paths.
flowchart LR
A[Prompt or RuntimePlan] --> B[CodeGen]
B --> C[RuntimePlan IR]
C --> D[Security Checker]
D --> E[Runtime Manager]
E --> F[UI Renderer]
F --> G[DOM Output]
E --> H[JSPM Module Loader]
H --> I[Primary CDN]
H --> J[Fallback CDNs]
graph TD
R["renderify"] --> C["@renderify/core"]
R --> IR["@renderify/ir"]
R --> RT["@renderify/runtime"]
R --> S["@renderify/security"]
R --> L["@renderify/llm"]
C --> IR
C --> RT
C --> S
RT --> IR
RT --> S
S --> IR
CLI["@renderify/cli"] --> R
CLI --> C
CLI --> L
CLI --> RT
flowchart TD
A[plan.source code] --> B[Transpile TSX or JSX]
B --> C[Extract imports]
C --> D[Resolve specifiers]
D --> E[Fetch remote modules]
E --> F[Rewrite nested imports]
F --> G[Create blob URLs]
G --> H[dynamic import]
H --> I[Export function or node]
I --> J[Render artifact or RuntimeNode]
flowchart TD
A[Source execution requested] --> B{Sandbox mode}
B -->|none| C[Main thread execution]
B -->|worker| D{Worker available?}
B -->|iframe compatibility name| D
B -->|shadowrealm compatibility name| D
D -->|yes| E[Execute in terminable Worker]
D -->|no| F[Fail closed]
E --> G{Timeout or abort?}
G -->|yes| H[Terminate Worker]
E --> J
H --> J
J -->|no| K[Return result]
J -->|yes| L[AbortError or timeout error]
flowchart TB
A[Layer 1: Policy pre-check]
B[Layer 2: Module host and manifest constraints]
C[Layer 3: Runtime sandbox isolation]
D[Layer 4: UI sanitization]
A --> B --> C --> D
- The diagrams intentionally show control flow, not every internal helper.
- For type-level details, see
docs/api-reference.md. - For execution semantics, see
docs/runtime-execution.md.