# reventeam/reven architecture

> Architecture diagram of the GitHub repository reventeam/reven, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/reventeam/reven
- Repository: https://github.com/reventeam/reven

## Overview

REVEN is a local-demo operations command center with security-monitoring and orchestration views. The user enters through a demo login, then the app routes to a command dashboard, campaign analytics, Kanban orchestration, or system configuration. The sampled pages present local UI state and sample data; no operational API calls from them are shown. The server provides health endpoints and static app delivery, with readiness checking a PostgreSQL connection. Several page details and integrations are unsampled, so the graph limits links to documented routes and visible component use.

Main entry points: [`client/src/App.tsx`](https://github.com/reventeam/reven/blob/main/client/src/App.tsx) (App Router), [`client/src/pages/Home.tsx`](https://github.com/reventeam/reven/blob/main/client/src/pages/Home.tsx) (Command Dashboard), [`client/src/pages/CampaignDashboard.tsx`](https://github.com/reventeam/reven/blob/main/client/src/pages/CampaignDashboard.tsx) (Campaign Analytics), [`client/src/pages/KanbanOrchestrator.tsx`](https://github.com/reventeam/reven/blob/main/client/src/pages/KanbanOrchestrator.tsx) (Task Orchestration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application Shell"]
  node_entry["React Entry<br/>[main.tsx]"]
  node_app_router["App Router<br/>[App.tsx]"]
  node_login["Demo Login<br/>[Login.tsx]"]
  node_theme["Theme Provider<br/>[ThemeContext.tsx]"]
  node_error_boundary["Error Boundary<br/>[ErrorBoundary.tsx]"]
end

subgraph group_ops["Operations Workspace"]
  node_home["Command Dashboard<br/>[Home.tsx]"]
  node_campaign["Campaign Analytics"]
  node_kanban["Task Orchestration"]
  node_config["System Configuration<br/>[SystemConfig.tsx]"]
  node_sidebar["Workspace Sidebar<br/>[Sidebar.tsx]"]
  node_header["Workspace Header<br/>[Header.tsx]"]
  node_map["Map View<br/>[Map.tsx]"]
  node_manus["Manus Dialog<br/>[ManusDialog.tsx]"]
end

subgraph group_infra["Service Infrastructure"]
  node_api["Express Service<br/>[index.ts]"]
  node_db_pool[("PostgreSQL Pool<br/>[pool.ts]")]
end

node_user(("Workspace User"))
node_postgres[("PostgreSQL")]

node_user -->|"opens demo"| node_login
node_entry -->|"renders"| node_app_router
node_app_router -->|"wraps"| node_error_boundary
node_app_router -->|"provides theme"| node_theme
node_app_router -->|"shows unauthenticated"| node_login
node_login -->|"signals demo entry"| node_app_router
node_app_router -->|"routes to"| node_home
node_app_router -->|"routes to"| node_campaign
node_app_router -->|"routes to"| node_kanban
node_app_router -->|"routes to"| node_config
node_home -->|"renders"| node_sidebar
node_home -->|"renders"| node_header
node_campaign -->|"renders"| node_sidebar
node_campaign -->|"renders"| node_header
node_kanban -->|"renders"| node_sidebar
node_kanban -->|"renders"| node_header
node_api -->|"checks readiness"| node_db_pool
node_db_pool -->|"queries"| node_postgres

click node_entry "https://github.com/reventeam/reven/blob/main/client/src/main.tsx"
click node_app_router "https://github.com/reventeam/reven/blob/main/client/src/App.tsx"
click node_login "https://github.com/reventeam/reven/blob/main/client/src/pages/Login.tsx"
click node_theme "https://github.com/reventeam/reven/blob/main/client/src/contexts/ThemeContext.tsx"
click node_error_boundary "https://github.com/reventeam/reven/blob/main/client/src/components/ErrorBoundary.tsx"
click node_home "https://github.com/reventeam/reven/blob/main/client/src/pages/Home.tsx"
click node_campaign "https://github.com/reventeam/reven/blob/main/client/src/pages/CampaignDashboard.tsx"
click node_kanban "https://github.com/reventeam/reven/blob/main/client/src/pages/KanbanOrchestrator.tsx"
click node_config "https://github.com/reventeam/reven/blob/main/client/src/pages/SystemConfig.tsx"
click node_sidebar "https://github.com/reventeam/reven/blob/main/client/src/components/Sidebar.tsx"
click node_header "https://github.com/reventeam/reven/blob/main/client/src/components/Header.tsx"
click node_map "https://github.com/reventeam/reven/blob/main/client/src/components/Map.tsx"
click node_manus "https://github.com/reventeam/reven/blob/main/client/src/components/ManusDialog.tsx"
click node_api "https://github.com/reventeam/reven/blob/main/server/index.ts"
click node_db_pool "https://github.com/reventeam/reven/blob/main/server/infrastructure/database/pool.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_app_router,node_login,node_theme,node_error_boundary,node_user toneBlue
class node_home,node_campaign,node_kanban,node_config,node_sidebar,node_header,node_map,node_manus,node_postgres toneAmber
class node_api,node_db_pool toneMint
```

## Components

### Application Shell

- [React Entry](https://github.com/reventeam/reven/blob/main/client/src/main.tsx): `client/src/main.tsx`
- [App Router](https://github.com/reventeam/reven/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Demo Login](https://github.com/reventeam/reven/blob/main/client/src/pages/Login.tsx): `client/src/pages/Login.tsx`
- [Theme Provider](https://github.com/reventeam/reven/blob/main/client/src/contexts/ThemeContext.tsx): `client/src/contexts/ThemeContext.tsx`
- [Error Boundary](https://github.com/reventeam/reven/blob/main/client/src/components/ErrorBoundary.tsx): `client/src/components/ErrorBoundary.tsx`

### Operations Workspace

- [Command Dashboard](https://github.com/reventeam/reven/blob/main/client/src/pages/Home.tsx): `client/src/pages/Home.tsx`
- [Campaign Analytics](https://github.com/reventeam/reven/blob/main/client/src/pages/CampaignDashboard.tsx): `client/src/pages/CampaignDashboard.tsx`
- [Task Orchestration](https://github.com/reventeam/reven/blob/main/client/src/pages/KanbanOrchestrator.tsx): `client/src/pages/KanbanOrchestrator.tsx`
- [System Configuration](https://github.com/reventeam/reven/blob/main/client/src/pages/SystemConfig.tsx): `client/src/pages/SystemConfig.tsx`
- [Workspace Sidebar](https://github.com/reventeam/reven/blob/main/client/src/components/Sidebar.tsx): `client/src/components/Sidebar.tsx`
- [Workspace Header](https://github.com/reventeam/reven/blob/main/client/src/components/Header.tsx): `client/src/components/Header.tsx`
- [Map View](https://github.com/reventeam/reven/blob/main/client/src/components/Map.tsx): `client/src/components/Map.tsx`
- [Manus Dialog](https://github.com/reventeam/reven/blob/main/client/src/components/ManusDialog.tsx): `client/src/components/ManusDialog.tsx`

### Service Infrastructure

- [Express Service](https://github.com/reventeam/reven/blob/main/server/index.ts): `server/index.ts`
- [PostgreSQL Pool](https://github.com/reventeam/reven/blob/main/server/infrastructure/database/pool.ts): `server/infrastructure/database/pool.ts`

### Other components

- **Workspace User**
- **PostgreSQL**

## Connections

- Workspace User → Demo Login: opens demo (evidence: `client/src/pages/Login.tsx`)
- React Entry → App Router: renders (evidence: `client/src/main.tsx`)
- App Router → Error Boundary: wraps (evidence: `client/src/App.tsx`)
- App Router → Theme Provider: provides theme (evidence: `client/src/App.tsx`)
- App Router → Demo Login: shows unauthenticated (evidence: `client/src/App.tsx`)
- Demo Login → App Router: signals demo entry (evidence: `client/src/pages/Login.tsx`)
- App Router → Command Dashboard: routes to (evidence: `client/src/App.tsx`)
- App Router → Campaign Analytics: routes to (evidence: `client/src/App.tsx`)
- App Router → Task Orchestration: routes to (evidence: `client/src/App.tsx`)
- App Router → System Configuration: routes to (evidence: `client/src/App.tsx`)
- Command Dashboard → Workspace Sidebar: renders (evidence: `client/src/pages/Home.tsx`)
- Command Dashboard → Workspace Header: renders (evidence: `client/src/pages/Home.tsx`)
- Campaign Analytics → Workspace Sidebar: renders (evidence: `client/src/pages/CampaignDashboard.tsx`)
- Campaign Analytics → Workspace Header: renders (evidence: `client/src/pages/CampaignDashboard.tsx`)
- Task Orchestration → Workspace Sidebar: renders (evidence: `client/src/pages/KanbanOrchestrator.tsx`)
- Task Orchestration → Workspace Header: renders (evidence: `client/src/pages/KanbanOrchestrator.tsx`)
- Express Service → PostgreSQL Pool: checks readiness (evidence: `server/index.ts`)
- PostgreSQL Pool → PostgreSQL: queries (evidence: `server/infrastructure/database/pool.ts`)
