> ## Documentation Index
> Fetch the complete documentation index at: https://docs.equa.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Repository Map

> Which repo owns what, branch conventions, and deployment pipelines

# Repository Map

## Repositories

```mermaid theme={null}
graph TD
    subgraph core [Core Platform]
        EquaWeb["equa-web\n(Frontend SPA)"]
        EquaServer["equa-server\n(Backend API)"]
        PatternLib["equa-patternlib-nextjs\n(Design System)"]
    end

    subgraph ai [AI Infrastructure]
        Equabot["equabot\n(Gateway + CLI)"]
        EquabotGateway["equabot-gateway\n(Gateway source)"]
        CometBridge["Comet-Bridge\n(Browser Automation)"]
    end

    subgraph ops [Operations]
        CommandCenter["command-center-so\n(Ops Dashboard)"]
        Stacks["stacks-ranking-priorities\n(Task Tracking)"]
    end

    subgraph docs [Documentation]
        EquaDocs["equa-docs\n(This repo)"]
    end

    subgraph planned [Planned]
        DesktopApp["equa-desktop-app-mac-ios\n(Empty)"]
    end

    EquaWeb -->|"consumes"| PatternLib
    EquaWeb -->|"/api proxy"| EquaServer
    CommandCenter -->|"gateway API"| Equabot
    CommandCenter -->|"browser tasks"| CometBridge
    EquaWeb -->|"/equanaut-api"| EquaServer
    Equabot -->|"CDP sessions"| CometBridge
```

## Repository Details

| Repository                  | Owner            | Purpose                                                                                 | Stack                                          | Branch Strategy                                                            | Deploy Target                                                                                         |
| --------------------------- | ---------------- | --------------------------------------------------------------------------------------- | ---------------------------------------------- | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `equa-web`                  | `EQUAStart`      | Frontend SPA                                                                            | React 18.2, TypeScript 5.3, Webpack 4, Redux 4 | Feature branches + `main`                                                  | Railway (current app edge)                                                                            |
| `equa-server`               | `EQUAStart`      | Backend API                                                                             | Express 4, TypeORM, PostgreSQL, Node 18        | Feature branches + `staging`; legacy `prod-deploy` path still exists in CI | Railway service config for current runtime target; legacy Cloud Run path remains in `cloudbuild.yaml` |
| `equa-patternlib-nextjs`    | `EQUAStart`      | Design system + Storybook                                                               | React 18, Next.js 14, Storybook 8.4            | staging → main                                                             | Railway (Storybook static)                                                                            |
| `equabot`                   | `EQUAStart`      | AI gateway CLI + source                                                                 | TypeScript (ESM), Bun                          | Feature branches → main                                                    | npm publish / macOS app                                                                               |
| `equabot-gateway`           | `equabot`        | Gateway development                                                                     | TypeScript, Lit Web Components                 | Feature branches → main                                                    | Bundled in equabot                                                                                    |
| `Comet-Bridge`              | `Balancing-Rock` | Persistent browser automation (Comet/Perplexity)                                        | Node.js (ESM), MCP server, Playwright          | main                                                                       | npm (comet-mcp) / local tooling                                                                       |
| `command-center-so`         | `EQUAStart`      | Full-screen Equanaut Command Center                                                     | Next.js 16, React 19, Tailwind 4               | Feature branches → main                                                    | `/command-center` app namespace; local dev on port 3001                                               |
| `stacks-ranking-priorities` | `Balancing-Rock` | Task/priority tracking (includes auto-add flowchart and project-sync architecture docs) | Python scripts, JSON data                      | main                                                                       | GitHub Actions                                                                                        |
| `equa-desktop-app-mac-ios`  | —                | Desktop/mobile app                                                                      | Planned: SwiftUI                               | —                                                                          | — (empty)                                                                                             |
| `equa-docs`                 | —                | Platform documentation                                                                  | Mintlify                                       | main                                                                       | docs.equa.cc                                                                                          |

## What Lives Where

### equa-web (Frontend)

| Path                     | Contents                                     |
| ------------------------ | -------------------------------------------- |
| `src/modules/`           | Feature modules (auth, captable, esop, etc.) |
| `src/shared/components/` | Pattern library re-exports                   |
| `src/shared/helpers/`    | Utility functions, validators, constants     |
| `src/service/`           | HTTP client and API service layer            |
| `src/logic/`             | Redux store, reducers, types                 |
| `src/styles/`            | Styled Components theme, global styles       |
| `src/app/`               | App shell, routing, error boundary           |
| `e2e/`                   | Playwright E2E tests                         |
| `lab/`                   | Production entry point                       |

### equa-server (Backend)

| Path                     | Contents                                                      |
| ------------------------ | ------------------------------------------------------------- |
| `modules/api/`           | Express server, endpoint registration, route definitions      |
| `modules/auth/`          | Authentication (password, OAuth, magic links), sessions, RBAC |
| `modules/persistence/`   | TypeORM entities (92), database connection, schema            |
| `modules/captable/`      | Cap table business logic                                      |
| `modules/organizations/` | Organization management                                       |
| `modules/billing/`       | Chargify billing integration                                  |
| `modules/notifications/` | Email delivery (SES/SMTP)                                     |
| `modules/file-storage/`  | AWS S3 file operations                                        |
| `modules/doc-gen/`       | PDF certificate generation                                    |
| `modules/data-room/`     | Data room access control                                      |
| `modules/google-drive/`  | Google Drive sync                                             |
| `modules/microsoft/`     | Microsoft Graph integration                                   |
| `modules/agent/`         | Equanaut AI assistant                                         |
| `modules/referral/`      | Referral system                                               |
| `modules/activity/`      | Activity/event logging                                        |
| `modules/admin/`         | Admin-only operations                                         |
| `modules/common/`        | Shared types and utilities                                    |
| `modules/raven/`         | Raven blockchain integration                                  |
| `docs/`                  | Cascading permission diagram                                  |

### Comet-Bridge (Browser Automation + MCP Servers)

| Path                                | Contents                                                                                           |
| ----------------------------------- | -------------------------------------------------------------------------------------------------- |
| `scripts/`                          | Core CLI commands (browse, search, scrape, interact, auto, etc.)                                   |
| `scripts/cursor-comet.mjs`          | Unified `comet` wrapper with startup gating                                                        |
| `scripts/comet-bootstrap.mjs`       | Readiness checks (app, CDP, MCP, extension)                                                        |
| `scripts/tab-safety.mjs`            | Tab ownership and multi-agent isolation                                                            |
| `scripts/lifecycle-metadata.mjs`    | Lifecycle envelope creation and transition helpers                                                 |
| `scripts/lifecycle-mcp-adapter.mjs` | MCP-to-lifecycle bridge for tool calls                                                             |
| `comet-mcp/`                        | MCP server for Cursor/Claude browser integration (16 tools)                                        |
| `comet-mcp/extension/`              | Chrome extension for tab group management                                                          |
| `gdrive-mcp/`                       | MCP server for Google Drive file operations (6 tools: list, search, info, mkdir, upload, download) |
| `docs/`                             | Setup, config schema, tab ownership protocol                                                       |

### command-center-so (Ops Dashboard)

| Path                                   | Contents                                                                               |
| -------------------------------------- | -------------------------------------------------------------------------------------- |
| `src/app/`                             | Next.js app router pages                                                               |
| `src/app/api/comet/lifecycle/`         | HTTP endpoint for cross-repo Comet run lifecycle sync                                  |
| `src/components/`                      | React components (chat, settings, monitors)                                            |
| `src/lib/`                             | Utility libraries, gateway client                                                      |
| `src/lib/taskThreads.ts`               | CometRun lifecycle adapter (start/update/complete/abort/fail), atomic file persistence |
| `src/data/comet-runs/`                 | Ephemeral per-run lifecycle state (gitignored)                                         |
| `.specify/specs/`                      | Feature specifications (one directory per spec: `{id}-{slug}/`)                        |
| `.specify/specs/{id}-{slug}/diagrams/` | Mermaid `.mmd` visual diagrams (conditional)                                           |
| `.specify/templates/`                  | Spequa artifact templates (spec, plan, tasks, checklist)                               |
| `.specify/memory/`                     | Project constitution and persistent context                                            |
| `.specify/queue/`                      | Portfolio queue items and session briefs                                               |
| `e2e/`                                 | Playwright E2E tests                                                                   |

## Local Development Ports

See [Environments and Config](/architecture/environments-and-config) for the complete port map.

| Port  | Service                          |
| ----- | -------------------------------- |
| 3000  | equa-server                      |
| 3001  | command-center-so                |
| 3333  | equa-patternlib (Next.js)        |
| 3337  | equa-docs (Mintlify)             |
| 5432  | PostgreSQL                       |
| 6006  | Storybook                        |
| 8080  | equa-web                         |
| 9222  | Comet-Bridge CDP (Comet browser) |
| 18789 | equabot Gateway                  |
| 18791 | equabot Browser Control          |
| 19792 | Equanaut API                     |
