Skip to content

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)
  1. The browser talks to nginx over HTTPS. nginx serves the web app and proxies /api/ to the API; /api/internal/ is blocked.
  2. The API authenticates the request (session or personal access token), checks the role and site access, and writes an audit entry for privileged actions.
  3. 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.
  4. 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.