CORE CONCEPT 01

The Template Registry

We don't write `if/else` statements for every new feature. We maintain a strict dictionary of layouts. The backend sends a key, and the frontend instantly swaps the entire engine.

Live Simulation
Incoming Payload
Renderer.tsx

Infra Template Active

Start Logic: Terraform Analysis
The Pattern
implementation.tsx
// The "One Component" Myth is solved via a Registry. const TEMPLATE_REGISTRY = { INFRA_SIGNAL: <InfraTemplate />, DATA_SIGNAL: <DataStackTemplate />, PAIN_SIGNAL: <PainDetectorTemplate />, }; export default function SignalRenderer({ payload }) { // Identify the Signal Type const Template = TEMPLATE_REGISTRY[payload.type]; // Render the correct "Weapon" return <Template data={payload.data} />; }