Skip to content

Architecture ​

Ossiframe has three layers: Apps compose modules, and modules use Core. Dependencies point one way: App → Modules → Core. Rationale: decisions. Trust boundaries and guarantees: security.md. Build, CLI and module development: developer-guide.md.

System overview ​

The app runs on your computer and talks to your servers over SSH. Outside services: Trust boundaries.

  • The dotted arrow exists only in apps that include ai-assistant, and only when you click.
  • The UI sends typed commands only. Rust builds each remote command. Nothing is installed on the server.

Layers ​

  • Modules are modules/* crates (ossiframe-mod-<name>) with optional UI folders. Apps are apps/doctor, apps/deploy and apps generated from templates/starter.
  • Core never depends on a module or an app, and has no Laravel, PHP, NGINX or MySQL knowledge. Doctor and Deploy never depend on each other.
  • A module is a trusted Rust crate that an app registers at compile time. There are no dynamic plugins. Its manifest (id, version, dependencies, capability text) is metadata, not a sandbox. The registry rejects missing dependencies and cycles.

Crates and cargo features ​

CrateContents
ossiframe-coreValidated identifiers, Executor trait, CommandSpec, quoting, redaction, operation records and states, module manifests, registry
ossiframe-sshThe only crate that uses russh: authentication, host keys, sessions, command execution, optional PTY, SFTP and forwarding channels
ossiframe-desktopTauri integration, SQLite, keychain, IPC helpers, sessions, operation engine, opt-in terminal, files and tunnels support

Optional code is behind cargo features. An app that does not enable a feature does not compile that code.

Source: [features] tables of crates/ossiframe-ssh/Cargo.toml, crates/ossiframe-desktop/Cargo.toml and modules/*/Cargo.toml, read with cargo metadata.

Notes:

  • ubuntu-provisioning has no cargo feature. Its provision_* commands live in ossiframe-desktop behind provisioning, which an app enables itself.
  • linux-inventory, linux-monitoring and the example module have no features or IPC commands. Without write, Files is read-only.
  • Doctor enables none of provisioning, terminal, files and tunnels. CI checks this (security.md).

Modules ​

Source: dependencies in each module manifest (modules/*/src/lib.rs, examples/custom-module), as printed by cargo run -p ossiframe-cli -- list --json.

ModuleWhat it provides
linux-inventory8 read-only operations: server-info, services, listening-sockets, software, service-status, service-logs, nginx-error-log, http-check
linux-audit8 scan steps, reports (audit_build_report, audit_save_report)
linux-monitoringLive CPU, memory, disk, network and process metrics
linux-logsJournal and log reads with live tail, logs_save
ai-assistantOptional bring-your-own-key assistant, 11 ai_* commands
ubuntu-provisioningPreflight, plan and install of a base stack, as root through sudo -n
app-deploy19 app_* commands: create, deploy, roll back, remove, HTTPS, environment, releases
ssh-terminalInteractive terminal, 6 terminal_* commands
ssh-filesystemSFTP browsing and transfers, 8 read and 5 write files_* commands
ssh-tunnelLocal port forwarding on 127.0.0.1, 6 tunnel_* commands
ports (example)Listening TCP sockets, in examples/custom-module

Opt-in modules need a generator flag: developer guide.

Apps ​

Source: .register(...) calls in apps/doctor/src-tauri/src/lib.rs and apps/deploy/src-tauri/src/lib.rs; cargo tree -p ossiframe-doctor -e features and -p ossiframe-deploy; apps/*/src/modules.ts; opt-in flags from cargo run -p ossiframe-cli -- list --json.

  • Doctor registers five modules, enables only ossiframe-desktop/tauri and has no mutating or privileged command. linux-audit's Overview replaces the inventory page.
  • Deploy registers eight modules and uses app-deploy through its commands and setup, not .register. That dependency's tauri feature enables ossiframe-desktop/provisioning.
  • Generated apps get only the modules you select. Presets never enable an opt-in flag. Flags and presets: developer guide.
  • Each app has a React frontend in src/, a Tauri backend in src-tauri/ and its own SQLite file (doctor.sqlite3, deploy.sqlite3).

Request path ​

Source: crates/ossiframe-desktop/src/dispatch.rs (run_operation, poll_operation), service.rs, provisioning/engine.rs, crates/ossiframe-core/src/executor.rs, crates/ossiframe-ssh/src/{exec,shell,sftp,forward}.rs.

  • Module operations go through run_operation, which wraps the connection in ReadOnly. It refuses every privilege except Privilege::User before the SSH executor is called. It guards only code handed the wrapper.
  • Commands are a program, argv, timeout, privilege and optional stdin (up to 1 MiB, never in argv or logs). Core quotes every word. Privilege::Root renders as /usr/bin/sudo -n -- <program> ... and Privilege::RunAs as sudo -n -u <user>, never root.
  • Results are bounded and redacted, and not streamed to the frontend.
  • Separate channels (PTY, SFTP, direct-tcpip) exist only in builds that enable them and live inside ossiframe-ssh. Modules, the operation engine and the assistant never use them (security.md).

Operation engine ​

One engine in ossiframe-desktop runs provisioning and deployment. It needs the provisioning feature, so Doctor does not contain it. It calls a Provisioner trait defined in Core, which ubuntu-provisioning implements and app-deploy reuses.

Source: crates/ossiframe-desktop/src/provisioning/, remote_lock.rs, activity.rs, modules/app-deploy/src/commands.rs.

  • Plan and approval. A deterministic plan is held in memory with its SHA-256 digest. A newer plan for the same server replaces it, and approval consumes it. Approval checks the plan id, expiry, digest, server identity (host, port, user, pinned host key), the connection, and that no operation is active or UnknownOutcome. The module then rechecks for drift. Only the plan store can produce an ApprovedPlan.
  • Steps. Long steps run as transient systemd units under sudo -n, independent of the SSH session. The engine stores the unit name first and polls systemctl show.
  • States. Pending, Running, Verifying, Succeeded, Failed, Cancelled, UnknownOutcome. A disconnect, deadline, identity mismatch or crash gives UnknownOutcome. Nothing is retried, and the remote process is not stopped. Cancel is honoured between steps. Settling an UnknownOutcome (provision_reconcile, provision_mark_resolved): user guide.
  • Remote lock. The transient unit ossiframe-provision-lock is taken at approval and kept until a terminal state other than UnknownOutcome. systemd refuses a second unit with that name. The lock is cooperative (limits). A reboot clears it.
  • ServerActivity. One in-process registry per app. Under one mutex, an operation claim fails while file writes run on that server, and a file write fails while a claim is held. At most one claim exists per server.
  • Verification. A component is verified only when all its essential checks pass.
  • History. Operations keep an identity snapshot, so history survives profile removal. A profile with an unresolved operation cannot be removed, re-pointed or have its host key replaced. At startup, in-flight rows become UnknownOutcome.

Evidence: verification/. Open checks: known-limitations.md.

Storage ​

DataLocation
Profiles, pinned host keys, operations, events and steps, applications, releases, saved tunnels, installation idSQLite in the OS app-data directory, one file per app
Passwords, key passphrases, AI provider keysOS keychain, service name per app (credentials)
Doctor reportsExported through a save dialog
Hosted application dataThe server only
  • Tables: servers, host_keys, operations, operation_events, operation_steps, meta, apps, releases (shared migrations, applied in every app), and tunnel_configs (its own migration list, applied only with the tunnels feature).
  • Observed server state is the source of truth. Cached data shows its age. SQLite and keychain code lives only in ossiframe-desktop.

Module UI composition ​

A module's ui/ folder exports a ModuleUi (or several) and optional lifecycle hooks. The app lists the pages in src/modules.ts and passes them to ServerWorkspace from @ossiframe/ui. linux-audit replaces linux-inventory's page so Doctor's Overview shows both. Duplicate page ids are an error. Fields and exports: Module UI contract. Navigation: design-system.md.

Project generation ​

tools/ossiframe-cli resolves modules with the same registry code, renders templates/starter/, and writes a standalone project with a project record, ossiframe.json. Commands, flags and presets: developer guide. ADR-0007 decides how generated projects reference Core.

Runtime independence ​

A server is a set of observed facts and installed capabilities, not a "PHP server". NGINX and the database are shared. Each application has its own Linux user, directory, .env and logs. Managed config files use an ossiframe- prefix. Other files are never overwritten.

Released under the MIT License.