English
Architecture
ReliaForge runs as a single Python process (FastAPI + Uvicorn) that hosts both plugin APIs and the static React console. You put one authenticating reverse proxy in front of it, and everything (HTML, REST APIs, SSE log streams, and WebSocket terminals) flows over one origin.
text
Auth reverse proxy (Envoy / Nginx / Caddy / Cloudflare Access)
-> ReliaForge backend (single container)
-> static React console (RELIAFORGE_CONSOLE_DIR)
-> /api/v1/* management API & plugin lifecycle
-> /api/v1/plugins/* plugin REST, SSE logs, WebSocket exec, ESM UI bundlesStartup and failure isolation
Before importing any plugin code, the loader scans RELIAFORGE_PLUGIN_PATHS and Python entry_points (reliaforge.plugins), applies enabled_plugins / disabled_plugins, and validates every manifest.json.
- Fail fast on bad structure: Invalid JSON, duplicate IDs, missing required dependencies, or dependency cycles stop the backend from starting so broken configuration never slips into production silently.
- Isolate runtime faults: Once manifests pass validation, if a single plugin fails to import or connect upstream, the manager marks that plugin (and its required dependents) as
errorordegradedwhile keeping all unrelated plugins and management endpoints online.
Lifecycle and shutdown
State transitions (start, stop, restart) are serialized by the plugin manager under bounded timeouts. Stopping a plugin always invokes its cleanup hook, even after partial initialization, to close async HTTP clients, database connections, and background tasks before clearing service registrations.
Health checks return current in-memory snapshots rather than probing or mutating external systems on every scrape.
Runtime console loading
The React console shell ships the shared layout, navigation, authentication awareness, and @reliaforge/plugin-sdk components (DataTable, Sheet, LogViewer, TerminalPane, StatGrid, ConfirmActionDialog). At runtime it fetches /api/v1/plugins and dynamically imports ESM bundles from plugins that declare frontend.ui_mode = "esm", wrapping each plugin view in its own error boundary.
text
Console shell -> live /api/v1 backend + runtime ESM plugin bundles
\-> static fixture dataset (demo.reliaforge.dev)For internal state machine diagrams and recovery edge cases, read the backend's architecture reference.
