Developers
Architecture
The parts of Orchestrator and how a request becomes a change on a server.
๐งฉ The pieces
| Component | Technology | Role |
|---|---|---|
| Web app | React single-page app, served as static files by nginx | Everything you see in the browser. Installable as a PWA. |
| API | Node.js (TypeScript) with Fastify | Authentication, permissions, the panel's logic and every change to the server. Listens on 127.0.0.1:3001 only. |
| Panel database | SQLite through Prisma | Sites, users, settings, history, billing. Secrets encrypted with AES-256-GCM. |
| Server scripts | Bash | Provisioning, deploys, SSL, cleanup, billing enforcement, security snippets โ run by the API with argument arrays, never through string-built shells. |
| Monitoring agent | Go, a single static binary | Live metrics and safe remote actions on any Linux server. |
| MCP server | Node.js | Lets AI clients use the panel through the REST API. |
๐ How a request becomes a change
Text
Browser โโHTTPSโโโถ nginx โโโถ static web app
โ
โโ /api โโถ API (127.0.0.1:3001) โโโถ SQLite (panel database)
โ
โโโถ scripts on the panel host
โ nginx ยท PHP-FPM ยท MySQL ยท Supervisor ยท Certbot ยท Git
โ
โโ SSH โโถ scripts on remote servers (/opt/orchestrator-scripts)
โ
โโโ WebSocket โโ monitoring agents (outbound from each server)
- The browser talks to nginx over HTTPS. nginx serves the web app and proxies
/api/to the API;/api/internal/is blocked. - The API authenticates the request (session or personal access token), checks the role and site access, and writes an audit entry for privileged actions.
- For a change on a server it runs a script โ locally, or over SSH on the site's server after syncing the scripts there. Long operations stream their output to the browser with Server-Sent Events.
- Monitoring agents keep one outbound WebSocket to the panel; the API sends them metric subscriptions and actions over it.
โฒ๏ธ Background jobs
The API also runs periodic jobs:
| Job | Interval |
|---|---|
| Uptime checks | every 5 minutes |
| Laravel log collection (error intelligence) | every minute |
| Panel host metrics | every minute |
| SSH server metrics | every minute |
| Fleet alert rules | every 30 seconds |
| Panel host alert rules | every 2 minutes |
| SSL expiry check | every 12 hours |
| Billing run | once a day after 03:00 (Asia/Tbilisi) |
| Weekly digest | hourly check, sent once on the chosen day |
๐๏ธ Site layout and releases
Each site lives in /var/www/sites/<domain> with releases/, a current symlink and shared/ for .env and storage โ see Creating sites. Deploys build a new release and switch current atomically; rollbacks switch it back.
๐งฉ Interfaces for developers
- REST API โ everything the web app does, with personal access tokens.
- Webhooks โ push-to-deploy in, signed automation events out.
- MCP server โ tools for AI clients.
- Agent protocol โ how agents and the panel talk.