Skip to main content

System Overview

Last verified: 2026-02-21 | Sources: All repository package.json files, deployment configs, and server entry points cited inline below

Integrated Equa Vision

Equa is a commercial equity management platform spanning multiple repositories that are all modules of a single integrated application. The repositories are not independent products — they are components in different stages of integration building toward one seamless Equa App experience. The build path is: local development (all services on one machine) → Mac/iOS Desktop App (native container) → equa.cc production deployment (cloud hosting, TBD).

Component Diagram


Service Inventory

ComponentRepositoryFrameworkPortPurposeStatus
Equa WebEQUAStart/equa-webReact 16.11, Webpack 4, Redux 4, TypeScript 3.78080Equity management SPA (cap table, ESOP, agreements, documents, finance, admin)Active — 24 frontend modules
Equa ServerEQUAStart/equa-serverExpress 4, TypeORM 0.2, PostgreSQL, Node 183000Backend API — authentication, data persistence, business logic, file storageActive — 20 backend modules
Equa PatternlibEQUAStart/equa-patternlib-nextjsReact 18, Next.js 14, Storybook 8.43333 (Next.js) / 6006 (Storybook)Shared design system — 30+ React components, design tokensActive
Command CenterBalancing-Rock/command-center-soNext.js 16.1, React 19, Tailwind CSS 43001 (next dev -p 3001)AI chat UI, agent monitoring, settings, priority stack managementActive
Equabot GatewayEQUAStart/equabotTypeScript (ESM), Bun, Lit Web Components18789 (WS) / 18791 (Browser Ctrl)Local-first AI agent — LLM orchestration, channel routing, tool execution, session managementActive
Comet-BridgeBalancing-Rock/Comet-BridgeNode.js (ESM), MCP server, Playwright9222 (CDP)Persistent browser automation — Perplexity Comet, tab-group isolation, multi-agent safety, audit trailsActive
Equa Docsequa-docsMintlify3333Platform documentation site (this repo)Active
Desktop Appequa-desktop-app-mac-iosPlanned: SwiftUI (Mac/iOS)Native Mac/iOS app container wrapping Equa web + gateway integrationPlanned (repo empty)
Priority StackBalancing-Rock/stacks-ranking-prioritiesTask management and priority ranking systemActive
Source: Each repository’s package.json for framework versions; port numbers from dev server configs and server.ts entry points.

Frontend Modules (equa-web)

24 modules in equa-web/src/modules/:
ModulePurpose
actionsOrganization actions and workflows
adminSite administration, user management
agreementsGoverning documents management
authLogin, register, password reset, email verification
captableCap table management, shareholdings, certificates
convertiblesConvertible instruments/notes
documentsData room and document management
equanautAI assistant integration
esopEquity plans, option pools, vesting schedules
google-driveGoogle Drive file sync
guestPublic-facing pages for unauthenticated users
hh-financeFinance dashboard and transactions
landingPublic landing page
organizationOrganization management, securities, legends
organization-dashboardOrganization-level dashboard
paymentsBilling, payment profiles
profileUser profile, wallet, portfolio, account settings
referralsReferral system, Equa Cash transfers
reportsHolder, holdings, and pool reports
rolesRole management and permissions
subscriptionsSubscription management
team-membersTeam member management, invitations
user-dashboardUser-level dashboard
welcomeOnboarding flow
Source: equa-web/src/modules/ directory listing.

Backend Modules (equa-server)

20 Yarn workspace packages in equa-server/modules/:
ModulePurpose
apiExpress server entry, endpoint registration, request handlers
api-helperCommon HTTP handler utilities
activityEvent logging and activity tracking
adminAdmin-specific business logic
agentAI agent endpoints (Equanaut onboarding, context)
authAuthentication (Google OAuth, email/password, magic links, 2FA), authorization (RBAC)
billingChargify subscription management
captableCap table business logic
commonShared types, interfaces, logging (Winston)
data-roomData room functionality
doc-genDocument generation
file-storageAWS S3 file upload/download/sync
google-driveGoogle Drive file sync (endpoints currently commented out)
microsoftMicrosoft Azure AD OAuth, Graph API integration
notificationsEmail via AWS SES (primary) / SMTP (fallback)
organizationsOrganization management logic
persistenceTypeORM schema (92+ entities), database helpers, migrations
ravenRaven address service integration
referralReferral system logic
walletWallet and payment method management
Source: equa-server/modules/ directory listing and each module’s package.json.

Integration Points

equa-web ↔ equa-server

The frontend communicates with the backend via a reverse proxy:
  • Development: Webpack dev server proxies /api to http://localhost:3000 (equa-server)
  • Production: Nginx proxies /api/ to https://equa-server-333648330110.us-central1.run.app/
  • API base URL: /api/v1 (configurable via API_URL env var)
  • Authentication: Session-based — cookies with credentials: 'include' on all fetch requests
  • Endpoint framework: vineyard-lawn (custom Express routing layer)
Source: equa-web/nginx.conf lines 13-19 (proxy config), equa-server/modules/api/src/server.ts line 180 (startApi function).

equa-web ↔ equa-patternlib

The design system is consumed as a direct GitHub dependency:
"equa-patternlib": "github:EQUAStart/equa-patternlib-nextjs#master"
Webpack is configured with a special babel-loader rule to transpile the patternlib’s TypeScript/TSX source. Equa-web re-exports patternlib components through wrappers in equa-web/src/shared/components/ (tooltip, toggle, toast, tabs, tables, switch). Source: equa-web/package.json (dependency), equa-web/webpack.config.js (babel-loader rules for patternlib).

Command Center ↔ Equabot Gateway

The Command Center connects to the gateway for AI chat and agent management:
  • Gateway URL: EQUABOT_GATEWAY_URL env var (default: http://localhost:18789)
  • Authentication: Bearer token via EQUABOT_GATEWAY_TOKEN env var
  • Chat endpoint: Gateway’s /v1/responses (OpenResponses API)
  • Fallback routes: Command Center can call OpenAI API and Ollama directly, bypassing the gateway
  • System prompt: Built from workspace files (SOUL.md, USER.md, IDENTITY.md, AGENTS.md, TOOLS.md, MEMORY.md, etc.) cached for 5 minutes
Source: command-center-so/src/app/api/chat/route.ts lines 14-17 (gateway config), command-center-so/railway.toml lines 11-14 (env vars).

Attachment Support by Route

The Command Center chat supports file and image attachments, but behavior varies by routing path:
RouteImagesNon-image filesNotes
Local (Ollama) — vision modelSent via Ollama images array (base64)Not processed; descriptive note appended to messageVision models: names matching llava, bakllava, or vision
Local (Ollama) — non-vision modelAttach buttons disabled in UIAttach buttons disabled in UITooltip: “Attachments not supported for this model. Switch to OpenAI or gateway.”
OpenAI directInline base64 (input_image)Uploaded to /v1/files, sent as input_file (fallback: error text on upload failure)Full attachment support
GatewayInline base64 (input_image)Inline base64 (input_file)Actual support depends on gateway upstream model
Fallback (gateway error → local)Same as local visionSame as local (note only)Triggered on gateway 429/5xx or streaming errors
Source: command-center-so/src/app/api/chat/route.ts (attachment routing logic), command-center-so/src/app/page.tsx line 1046 (capability detection).

Command Center ↔ GitHub Projects

The Command Center ingests Task Thread data from a GitHub Project (24-field schema) through the /api/tasks/stack canonical normalization adapter. Priority, Status, Stack Rank, and Urgency values from the project are authoritative — the UI computes display-only decorations but does not override the normalized API payload. See Command Center — Task Stack Contract for the full field inventory, identity model, blocker convention, and runtime mapping. Source: command-center-so/src/app/api/tasks/stack/route.ts (stack adapter), command-center-so/src/lib/types.ts (TaskThread type).

Gateway ↔ Equa Platform (Future Integration)

The Equabot gateway is currently a self-contained local-first system with no direct connection to equa-server or equa-web. The gateway manages its own messaging channels (Telegram, Google Chat, Discord, etc.), AI providers, and tool execution independently. Integration between the gateway and the Equa platform is planned but not yet implemented. The desktop app will serve as the native container that unifies both systems.

Data Flow: User Request Lifecycle

Source: equa-server/modules/api/src/server.ts lines 180-198 (startApi initialization order: sessions → Google auth redirect → endpoints → file serving → health → root ping → 404).

Data Flow: Authentication

Source: equa-server/modules/api/src/server.ts lines 142-178 (initializeGoogleAuthRedirect), equa-server/modules/auth/src/google-auth.ts.

External Services Map

ServiceProviderPurposeModuleStatus
S3AWSFile storage (uploads, data room documents)equa-server/modules/file-storage/Active
SESAWSTransactional email (verification, notifications)equa-server/modules/notifications/Active (SMTP fallback)
OAuthGooglePrimary user authenticationequa-server/modules/auth/Active
Drive APIGoogleFile sync with Google Driveequa-server/modules/google-drive/Module exists, endpoints commented out
Azure AD + GraphMicrosoftSecondary auth, file uploads, group drivesequa-server/modules/microsoft/Conditional (requires MS_AUTH_CLIENT_ID env var)
ChargifyMaxioBilling, subscriptions, payment managementequa-server/modules/billing/Active
OllamaLocalLLM inference (Qwen 72B, Llama 70B, DeepSeek)Command Center direct + GatewayActive (port 11434)
TailscaleTailscaleRemote access to gateway via Serve/FunnelGateway configActive
reCAPTCHAGoogleBot protection on auth formsequa-web/Active
FullStoryFullStorySession recording/analyticsequa-web/Configurable
Google AnalyticsGoogleUsage analyticsequa-web/ (react-ga)Active
Source: Each service verified from import statements and configuration in the respective modules.

Build Path

Phase 1: Local Development (Current)

All services run on a single development machine:
ServiceCommandPort
PostgreSQLDocker container5432
equa-serveryarn start:dev3000
equa-webyarn start (Webpack dev server)8080
equa-patternlibnpm run storybook6006
command-center-sonpm run dev (Next.js)3001
equabot-gatewayequabot gateway start18789
OllamaSystem service11434
The Webpack dev server proxies /api to localhost:3000. The Command Center reads EQUABOT_GATEWAY_URL=http://localhost:18789 from .env.local.

Phase 2: Mac/iOS Desktop App (Planned)

A native SwiftUI container app (equa-desktop-app-mac-ios) that integrates:
  • The Equa web app (embedded WebView or rebuilt in SwiftUI)
  • The Equabot gateway (local service)
  • The Command Center (agent management UI)
This repo is currently empty. The target is a fully integrated local experience before any cloud deployment.

Phase 3: Production Cloud Deployment (Future)

Redeployment to equa.cc (or alternative hosting) once the integrated local version is perfected. Hosting platform TBD — options include GCP Cloud Run (prior deployment), Railway (configs already exist), or alternative. Redeployment triggers: Feature-complete local version, paying customer pipeline ready, funding available for hosting, hosting platform decision finalized. Source: Wind-down context from equabot/threads/wind-down-equa-cc-public-instance/CONTEXT.md.

Key Technical Decisions

DecisionChoiceSource
Frontend frameworkReact 16.11 + Redux 4 + Redux Loopequa-web/package.json
Frontend routingReact Router v5 + connected-react-routerequa-web/package.json
State managementRedux + redux-thunk + redux-loopequa-web/src/logic/store.ts
Stylingstyled-components 4 + design tokens from patternlibequa-web/package.json, equa-patternlib-nextjs/src/tokens/
FormsReact Final Form 6.4equa-web/package.json
Backend frameworkExpress + vineyard-lawn (custom routing)equa-server/modules/api/src/server.ts
ORMTypeORM 0.2 (PostgreSQL)equa-server/modules/persistence/
AuthenticationSession-based (express-session + TypeORM store)equa-server/modules/auth/
Process managerPM2 (production)equa-server/ecosystem.config.js
File storageAWS S3 (aws-sdk)equa-server/modules/file-storage/src/s3.d.ts
EmailAWS SES (primary), SMTP (fallback)equa-server/modules/notifications/
AI integrationEquabot gateway (local-first, multi-provider)equabot-gateway/src/gateway/server-http.ts
Command CenterNext.js 16.1 + React 19 + Tailwind CSS 4command-center-so/package.json
Container runtimeNode 18 Alpine (backend), Nginx Alpine (frontend)equa-server/Dockerfile, equa-web/Dockerfile