Skip to main content

Component Relationships

This document outlines how Sigilweaver Loom's three main components-Studio, Server, and Hub-interact across different deployment scenarios.

Component Overview

ComponentPurposeTech StackDefault Port
StudioVisual workflow designer (desktop app)React, Xyflow, Electron or Tauri25810
ServerWorkflow execution enginePython, FastAPI, Polars25811
HubMulti-user orchestration platformFastAPI + React25802/25803

Execution Modes

Studio supports three execution modes, configured in Settings > Connection:

ModeDescriptionUse Case
bundledServer runs inside desktop shellSingle user, desktop
externalDirect connection to standalone ServerDevelopment, self-hosted
hubHub mediates all Server communicationTeams, multi-server

Mode 1: Bundled Server (Desktop)

Scenario: Single user running the full desktop application.

Desktop Shell Options

Sigilweaver Loom Studio supports two desktop shells:

  • Electron (Full build): Bundles the Server executable and manages its lifecycle
  • Tauri (Client build): Lightweight shell that connects to an external Server

The bundled server mode is only available with Electron. Tauri builds operate in external mode.

How It Works

  1. Startup: Desktop shell spawns the bundled Server executable
  2. Authentication: Ephemeral token generated per session
  3. Execution: Studio sends workflows directly to localhost:25811
  4. Shutdown: Server terminates when Studio closes

Key Characteristics

  • Self-contained: No external dependencies
  • Ephemeral auth: Random UUID token generated each launch
  • Auto-start: Controlled by backend.autoStart setting
  • Credentials local: Database connections stored in OS secure storage (Keychain, DPAPI, Secret Service)

Configuration

// Studio settings (default for bundled)
{
executionMode: 'bundled',
backend: {
url: 'http://localhost:25811',
autoStart: true
}
}
# Server environment (set by desktop shell)
AUTH_MODE=ephemeral
SESSION_TOKEN=<generated-uuid>

Mode 2: External Server (Direct Connection)

Scenario: Developer running Server separately, or connecting to a remote Server.

How It Works

  1. User configures: Server URL in Studio settings
  2. Direct connection: Studio calls Server API directly
  3. Auth options: Token-based or disabled (development)
  4. Credentials: Managed on Server via connections.json

Key Characteristics

  • Flexible deployment: Server can run anywhere (local, VM, cloud)
  • Direct API access: No intermediary
  • Manual credential management: Server admin manages connections.json
  • Multiple auth modes: disabled, static (env token), or ephemeral

Configuration

// Studio settings
{
executionMode: 'external',
backend: {
url: 'https://server.example.com',
autoStart: false // Irrelevant for external
}
}
# Server environment options

# Development (no auth)
AUTH_MODE=disabled

# Static token (shared secret)
AUTH_MODE=static
SESSION_TOKEN=your-shared-secret

# Ephemeral (for automated deployment)
AUTH_MODE=ephemeral
SESSION_TOKEN=<generated-at-deploy>

Mode 3: Hub-Mediated

Scenario: Team environment with centralized access control and multiple servers.

Authentication Flow

Key Characteristics

  • Centralized auth: Users authenticate with Hub, not Server
  • RBAC: Role-based access control (Owner, Admin, Auditor, User)
  • Credential isolation: Credentials never leave Hub → Server path
  • Multi-server: Hub routes to multiple Servers (dev, staging, prod)
  • One-time tokens: Server tokens are consumed on authorize
  • Audit trail: All operations logged in Hub

Server Token Flow

  1. Studio → Hub: Request token (user must be logged in)
  2. Hub: Validates session, picks healthy server, issues token
  3. Hub → Studio: Returns opaque token + server endpoint
  4. Studio → Server: Sends request with token in Authorization header
  5. Server → Hub: Calls /internal/authorize with token
  6. Hub: Validates token, checks permissions, returns credentials
  7. Hub → Server: Credentials for hub-owned connections
  8. Server: Executes workflow with resolved credentials

Configuration

// Studio settings
{
executionMode: 'hub',
hub: {
url: 'https://hub.example.com',
rememberLogin: true,
sessionToken: '<persisted-if-remember>'
}
}
# Server environment (Hub-connected)
AUTH_MODE=hub
HUB_URL=https://hub.example.com
HUB_SERVER_TOKEN=<token-from-hub-registration>
HUB_REGISTRATION_SECRET=<shared-secret>
# Hub environment
DATABASE_URL=postgresql://...
SECRET_KEY=<jwt-secret>
SERVER_REGISTRATION_SECRET=<shared-secret>

Connection Ownership

Connections (database credentials, file paths) can be owned by different components:

OwnerLocationManaged ByVisible To
ClientOS secure storageUser (Studio settings)This Studio instance only
Serverconnections.json on ServerServer adminAll Studio users of that Server
HubHub database (encrypted)Hub adminUsers with granted access

In Hub Mode

  • Client connections: Sent with each request (encrypted in transit)
  • Server connections: Looked up locally by ID
  • Hub connections: Server calls Hub to get credentials just-in-time

Port Scheme

All Sigilweaver Loom ports follow the 258xx pattern (founding date: 2025-08-01):

PortComponentNotes
25802Hub BackendAPI server
25803Hub FrontendWeb UI (dev)
25810StudioVite dev server
25811ServerDefault backend

Security Model by Mode

AspectBundledExternalHub
Auth TypeEphemeral (per-session)Static/DisabledSession + Server tokens
Token LifetimeApp lifetimePermanentConfigurable (e.g., 5 min)
Credential StorageOS secure storageServer filesystemHub database (encrypted)
Access ControlSingle userManualRBAC
AuditLocal onlyServer-side optionalHub-centralized

When to Use Each Mode

ModeBest For
BundledIndividual users, desktop workflows, offline work
ExternalDevelopers testing, simple single-server deployments
HubTeams, multiple environments, compliance requirements

See Also