From d6041c1048b815858739ccc9a8287c3807393cef Mon Sep 17 00:00:00 2001 From: Jon Date: Thu, 4 Jun 2026 12:45:49 +0100 Subject: [PATCH] Add web management front end (served by the supervisor) Single-page UI styled after simplex-manager/web/index.html (palette, header, section-tabs, cards). Talks to the supervisor over REST (control) + WebSocket (/events live stream): - Profiles tab: create cli/directory/broadcast, list with status, stop - Console tab: send raw chat commands to a cli profile, see the response - Events tab: live event feed from all profiles server.py serves webui/index.html at /. Validated end to end with curl: GET / , GET /profiles, start-cli, cmd /user (activeUser), stop. Co-Authored-By: Claude Opus 4.8 --- supervisor/server.py | 10 +- webui/index.html | 299 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 308 insertions(+), 1 deletion(-) create mode 100644 webui/index.html diff --git a/supervisor/server.py b/supervisor/server.py index 022101c..207d3c5 100644 --- a/supervisor/server.py +++ b/supervisor/server.py @@ -9,15 +9,23 @@ This process sits between the website and the SimpleX binaries; it is the only thing that touches the binaries. Run: uvicorn supervisor.server:app """ -import asyncio import contextlib +from pathlib import Path from fastapi import FastAPI, WebSocket, WebSocketDisconnect +from fastapi.responses import FileResponse from .supervisor import Supervisor app = FastAPI(title="SimpleX Orchestrate") +WEBUI = Path(__file__).resolve().parent.parent / "webui" / "index.html" + + +@app.get("/") +async def index() -> FileResponse: + return FileResponse(WEBUI) + _browser_clients: set[WebSocket] = set() diff --git a/webui/index.html b/webui/index.html new file mode 100644 index 0000000..c9fa29f --- /dev/null +++ b/webui/index.html @@ -0,0 +1,299 @@ + + + + + +SimpleX Orchestrate + + + +
+
+ ◆ SimpleX Orchestrate + connecting… +
+
+ +
+

Manager

+
+ + + +
+ + +
+
+

New profile

+
+ + +
+
+ + + + +
+ +
+
+ + +
+
+

Send command (cli profiles)

+
+ + + +
+

Raw chat commands — same as the app's Chat Console (e.g. /user, /_contacts 1, /_groups 1).

+ +
+
+ + +
+
+
+

Live events

+ +
+
+
+
+
+ + + +