spaceapp.devDocsGitHub ↗Get SpaceApp ↗

Architecture

How the client, application services and provider runtimes fit together.

System boundaries#

SpaceApp separates the viewing client, application services, agent processes, persistent state and upstream providers:

text
Browser / available native client
    | authenticated HTTP + realtime connections
    v
SpaceApp web UI and application API
    | application state, routing and authorized operations
    +--> PostgreSQL and application data
    +--> memory storage, indexing and visualization data
    +--> protected CLI-host channel --> provider CLI sessions --> configured AI services
    +--> optional managed browser service --> authorized websites
    +--> optional background workflow / integration services
    +--> configured chat / Live voice / external connectors

The host executes tools and stores state. A phone, tablet or second laptop displays/control surfaces connected to the host; it does not automatically duplicate the backend or run the same containers locally. Loss of a client connection and loss of a host process are different failures.

Provider requests cross their own network/trust boundary. Self-hosting does not force local inference. Depending on the configured model and tools, prompts, selected files, images, audio and results may reach third parties.

Public runtime packaging#

The public launcher manages versioned Docker Compose services. Its small npm package runs on the host and prepares configuration, secrets, workspace mounts and lifecycle operations. It is not itself the complete application server or a model engine.

Component Responsibility Important boundary
Web interface / application core Rooms, UI state, authenticated API and application behavior Browser authentication is separate from CLI/provider authentication.
CLI runtime service Provider executables, process/session hosting and project access Mounts authorized projects and protected provider state.
PostgreSQL Structured persistent application state Data and migrations must be preserved during maintenance.
Application data / owner memory Durable content and mutable knowledge Separate from immutable generic starter memory and provider secrets.
Background workflow/integration services Supported asynchronous integrations and jobs Availability depends on profile and configuration.
Managed browser service Hosted browser sessions and automation Optional; profile must include it and targets remain permission-scoped.
Host launcher Install, diagnose, start/stop, upgrade, repair and recovery Run as the same OS user with the same installation root.

The current small profile supplies core application, CLI/OpenCode and PostgreSQL; medium adds background workflow/integration workers; large adds managed Chromium and larger limits. Legacy light/standard profiles remain compatibility options. These profiles affect service composition and resources, not permission to mount the entire host or a different room policy.

The production application's source contains additional modules and operational integrations. Do not assume an internal deployment's service names, host paths, optional plugins or administrative capabilities are present in every public image.

Source map for developers#

The public monorepo separates application surfaces and reusable packages:

  • apps/web: React/TypeScript browser UI, pane presentation and workspace features.
  • apps/api: authenticated application API and coordination logic.
  • apps/worker: background application work where enabled.
  • packages/contracts: shared data contracts, pane catalog and validation schemas.
  • packages/db: PostgreSQL access and schema migrations.
  • packages/cli-host: CLI process/session handling.
  • packages/browser-host: managed browser infrastructure.
  • packages/memory-graph: memory graph functionality.
  • packages/runtime and packages/streaming: supporting runtime/streaming modules.
  • packages/run-spaceapp: public npm launcher, platform prerequisites, templates and maintenance commands.

Discover exact entry points in the checked-out release. Source directory names are not public HTTP endpoints or service discovery addresses, and they do not show that every module is active in a profile.

Rooms, panes and workspaces#

A room groups panes and their layout/context. A pane is one interactive surface. A registered workspace is a host filesystem directory available to agent runtimes. These concepts should not be collapsed into one another.

The current catalog includes 16 CLI types plus Chat, YouTube, VNC, Browser, DeepSeek Harness, Live, Files and Demo Projects. Up to 16 panes can occupy a room. CLI identity selects an adapter; runtime readiness is observed independently.

A project may be referenced from multiple panes. That does not clone its files or create isolated Git branches. Two tools with write access can still conflict unless ownership and integration are coordinated. Browser state, provider-native session state and room layout are also different forms of state.

CLI process, terminal and conversation layers#

A terminal pane combines presentation, transport, a hosted process and often a provider-native conversation. Each layer can fail independently:

  • Presentation: xterm geometry, rendering, selection, viewport and scrollback.
  • Transport: browser-to-server connections and attachment state.
  • Process: shell/CLI lifecycle on the execution host.
  • Conversation: provider-native task/session identity and continuation semantics.
  • Persistence: application history and retained metadata.

A disconnected WebSocket does not establish that the CLI process died. A visible history record does not establish native resumability. A process exit does not establish successful task completion. Recovery must identify the failing layer and use the supported adapter.

Terminal control ownership/leases help prevent conflicting input where implemented. They do not grant a new user permission to read another user's session. Preserve current input and active work when testing reconnects or resizing terminals.

Evidence for resumed work should include the correct native task reference and real continuing output, not just replayed transcript text. Evidence for a code task should include actual file/result changes and appropriate checks.

Client synchronization and multiple devices#

Clients connect to the same host and authorized application state. Responsive shells adapt presentation for desktop, tablet and phone; available desktop review/window features can expose more of that host across displays.

Opening another client is not a backup, server failover or new execution environment. Host reachability, authentication, TLS and network policy still govern access. Loopback on a phone refers to the phone, not the machine running SpaceApp.

Do not infer offline multi-device synchronization, unrestricted concurrent editing or equal native-window capabilities on every platform. Verify the installed client's behavior and release assets. A wrapper version and backend runtime version can differ.

Background work and integrations#

Supported integration/streaming features can connect additional services and channels. They require their own credentials, scopes, setup and background workers. A small profile can deliberately omit workers even when related UI or source modules exist.

Integration availability, successful authentication, connection health and actual delivery are separate facts. A queued operation or saved draft does not establish external delivery. Sending a message, publishing content or changing another service requires the appropriate user authorization.

Treat external messages and fetched content as untrusted input. Connector access should not broaden filesystem or administrative authority. Only report a delivery when the authorized tool returns evidence consistent with it.

Native clients and distribution boundaries#

Desktop/mobile clients can provide a convenient connection to a running SpaceApp host. Platform package availability is release-dependent; inspect official release assets before naming a downloadable AppImage, deb, Windows installer/archive or Android APK.

The universal Docker host installer supports Linux, macOS and Windows 11 paths. That fact does not establish native wrapper availability on every OS, equal updater behavior or that a mobile wrapper runs the backend locally.

Client releases, backend images and npm launcher versions are separate identities. Verify the actual package name, version and update instructions. Prefer dynamic version reporting and avoid copying a stale download filename into long-lived agent instructions.

Reviewed October 27, 2026 · Commands checked against launcher 1.2.3. Read the source reference ↗