Steadybase
Introduction

Architecture Overview

System architecture, component breakdown, and data flow for the Steadybase platform.

Architecture Overview

Steadybase is a full-stack application built on TypeScript, Express, and Temporal Cloud. This page covers the high-level architecture, key components, and how data flows through the system.

System Diagram

┌─────────────────────────────────────────────────────────────┐
│                        Client Layer                         │
│  ┌─────────────┐  ┌─────────────┐  ┌────────────────────┐  │
│  │  React SPA  │  │  iOS App    │  │  Slack Bot         │  │
│  │  Dashboard  │  │  Capacitor  │  │  Notifications     │  │
│  └──────┬──────┘  └──────┬──────┘  └─────────┬──────────┘  │
├─────────┼────────────────┼───────────────────┼──────────────┤
│         │         API Layer                  │              │
│         ▼                ▼                   ▼              │
│  ┌─────────────────────────────────────────────────────┐    │
│  │            Express Server (Port 3000)               │    │
│  │  ┌────────┐ ┌────────┐ ┌──────┐ ┌──────┐ ┌──────┐  │    │
│  │  │ Brain  │ │Workers │ │Deals │ │Memory│ │Metrics│  │    │
│  │  │  API   │ │  API   │ │ API  │ │ API  │ │  API  │  │    │
│  │  └────┬───┘ └───┬────┘ └──┬───┘ └──┬───┘ └──┬───┘  │    │
│  │       │         │         │        │        │       │    │
│  │  ┌────┴─────────┴─────────┴────────┴────────┴───┐   │    │
│  │  │          WebSocket Server (/ws)              │   │    │
│  │  └──────────────────┬───────────────────────────┘   │    │
│  └─────────────────────┼───────────────────────────────┘    │
├─────────────────────────┼───────────────────────────────────┤
│                         │  Temporal Layer                    │
│                         ▼                                   │
│  ┌─────────────────────────────────────────────────────┐    │
│  │          Temporal Cloud (mTLS, us-west-2)           │    │
│  │  Namespace: quickstart-steadybase                   │    │
│  │                                                     │    │
│  │  ┌──────────────┐  ┌──────────────┐                 │    │
│  │  │   Client     │  │   Ticket     │                 │    │
│  │  │  Onboarding  │  │  Resolution  │                 │    │
│  │  └──────────────┘  └──────────────┘                 │    │
│  │  ┌──────────────┐  ┌──────────────┐                 │    │
│  │  │    Lead      │  │   Content    │                 │    │
│  │  │Qualification │  │  Generation  │                 │    │
│  │  └──────────────┘  └──────────────┘                 │    │
│  │  ┌──────────────┐  ┌──────────────────────────────┐ │    │
│  │  │   Memory     │  │   Drew Coordinator           │ │    │
│  │  │   Store      │  │   (9-step orchestration)     │ │    │
│  │  └──────────────┘  └──────────────────────────────┘ │    │
│  └─────────────────────────────────────────────────────┘    │
├─────────────────────────────────────────────────────────────┤
│                      External Services                      │
│  ┌────────┐  ┌────────┐  ┌────────┐  ┌──────┐  ┌────────┐  │
│  │ Claude │  │ GPT-4o │  │Gemini  │  │ VAPI │  │ Slack  │  │
│  │  API   │  │  API   │  │  API   │  │ Voice│  │  API   │  │
│  └────────┘  └────────┘  └────────┘  └──────┘  └────────┘  │
└─────────────────────────────────────────────────────────────┘

Component Breakdown

Client Layer

ComponentTechnologyPurpose
DashboardReact SPAPrimary interface for managing workers, viewing deals, monitoring health
iOS AppCapacitor 8.1Native mobile interface wrapping the web dashboard
Slack BotSlack APINotifications and alerts delivered to team channels

API Layer

The Express server (TypeScript) exposes five API routers and a WebSocket server:

Brain API (/api/brain)

Chat interface powered by Claude CLI. Maintains conversation history, injects context from memory and active workflows.

  • POST /api/brain/chat — Send a message, receive AI response
  • GET /api/brain/history — Retrieve conversation history
  • DELETE /api/brain/history — Clear conversation

Workers API (/api/workers)

Manage and interact with AI workers.

  • GET /api/workers — List all workers with status
  • GET /api/workers/:id — Get worker details
  • POST /api/workers/:id/start — Start a workflow for a worker

Deals API (/api/deals)

Pipeline and deal management.

  • GET /api/deals — List deals (filterable by stage, type, rep)
  • GET /api/deals/:id — Get deal details
  • GET /api/deals/summary/pipeline — Pipeline summary metrics

Memory API (/api/memory)

Hierarchical durable memory access.

  • GET /api/memory/tree — Full memory hierarchy
  • GET /api/memory/:scope/:key — Read specific entry
  • POST /api/memory — Write memory entry
  • GET /api/memory/health/:workerId — Memory health metrics

Metrics API (/api/metrics)

Platform-wide analytics and dashboards.

  • GET /api/metrics/pipeline — Pipeline value, win rate, deal counts
  • GET /api/metrics/tokens — LLM token usage and costs by worker
  • GET /api/metrics/consumption — Revenue forecasts (EBAM, EAR, headroom)
  • GET /api/metrics/workers — Worker performance metrics

Temporal Layer

All workflows execute on Temporal Cloud with mTLS authentication:

  • Namespace: quickstart-steadybase (us-west-2)
  • Task Queue: steadybase-gtm
  • Connection: mTLS with client certificate/key pair
  • Workflows: 6 registered workflow types (see Workflows)

External Services

ServiceUsageModel/Version
Anthropic ClaudeResearch, planning, analysisclaude-sonnet-4-5
OpenAI GPT-4oContent generation, outreach draftinggpt-4o
Google GeminiFast classification, quick tasksgemini-2.0-flash
VAPIVoice call analysis and recording
SlackTeam notifications and alertsBot API

Data Flow

Typical Request Flow

Client sends request Dashboard or API client makes an HTTP request to the Express server.

Auth middleware validates JWT token is verified. Rate limiting is checked (300 req/15min global, 10 req/15min for auth endpoints).

API router processes Request is routed to the appropriate handler (Brain, Workers, Deals, Memory, or Metrics).

Temporal workflow starts (if needed) For operations requiring durable execution, a Temporal workflow is started or signaled.

LLM calls execute Workflow activities make calls to Claude, GPT-4o, or Gemini based on the task type.

Memory is updated Results are stored in the hierarchical memory system via the Memory Store workflow.

WebSocket broadcasts Real-time updates are pushed to connected clients via WebSocket.

Tech Stack Summary

LayerTechnology
LanguageTypeScript 5.3
ServerExpress 4.18
OrchestrationTemporal Cloud SDK 1.11
AIAnthropic SDK 0.39, Claude CLI, GPT-4o, Gemini
AuthJWT (aws-jwt-verify 4.0)
RealtimeWebSocket (ws 8.16)
MobileCapacitor 8.1 (iOS)
Process ManagerPM2
Reverse ProxyNginx with Let's Encrypt TLS
InfrastructureAWS EC2 (t4g.medium, us-west-2)

On this page