ADR-001 — React SPA and Python exit (Phase 1)
- Status: Accepted (2026-07-31); Phase 2 cutover completed 2026-08-01
(React sole product UI — see
PHASE_2_QUALIFICATION.md) - Program:
tools/open-fdd-modernization/ - Tracking:
docs/migration/react-rust/ - Phase 3: outlook only (
PHASE_3_EDGE_STREAMING_OUTLOOK.md); not started.
Context
The operator UI is a React SPA (frontend/web → openfdd-web). Production FDD
runs in DataFusion SQL on central. Several checked-in instructions historically
forbade recreating a React UI during Milestone A convergence; that lock is
superseded by this ADR.
Decision
- Product UI: React + TypeScript SPA (
frontend/web). - Browser backend: existing central Rust service (
services/central/). No FastAPI (or other Python) compatibility sidecar. - Deterministic analytics / FDD: DataFusion SQL (
sql_rules/,crates/fdd_*). Never move fault math into React or TypeScript. - Delivery:
openfdd-webnginx container with same-origin/apiproxy to central. - Auth / browser security direction: JWT (or equivalent) already used by
central; SPA must carry request IDs; document CSRF/CORS/CSP and safe
artifact Content-Disposition in the contract milestone (P1-M2). Prefer
same-origin
/apito simplify cookies/CORS. - Python during Phase 1: frozen for product features. Allowed: oracle / characterization / fixtures. Disallowed: new production Python services, silent pandas FDD fallback, new persistence formats React must later consume.
- BACnet / fieldbus / MQTTS: ownership and write-safety rules are unchanged. React never owns UDP 47808 or protocol writes.
Consequences
- Instruction files that said “do not recreate React” are superseded by this ADR for Phase 1+ work.
- New production packages under a React app must not depend on pandas for runtime FDD.
- Policy CI rejects a production React client aimed at a Python service URL.
- Pandas cookbooks and
open_fdd.rulesremain the oracle until an explicit product decision relocates or archives them (not this ADR).
Non-goals (this ADR)
- Changing live BACnet write policy.
- Choosing a large UI component library (deferred to P1-M2/M3 evaluation).
- Byte-identical HTML/report formats (semantic parity is the default).
Related
- DataFusion-first — computation boundary (kept, tightened).
- Job workspaces — durable Jobs remain central SoT.
- Phase docs:
tools/open-fdd-modernization/PHASE_1_PREP_AND_REACT_PARITY.md.