# vishalsundara-hue/echo architecture

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

- Interactive diagram: https://gitdiagram.com/vishalsundara-hue/echo
- Repository: https://github.com/vishalsundara-hue/echo

## Overview

Project Echo is an organisational-intelligence product for capturing knowledge and decisions, exploring evidence, replaying incidents, and surfacing risks. The principal user workflow is to enter through the routed application, use a domain workspace (such as documents, decisions, or assistant), and receive knowledge views or grounded answers; the backend exposes corresponding API capabilities. The README documents broader ingestion, analytics, governance, and integrations. Several frontend-to-backend and infrastructure links are not demonstrated in the excerpts, so those are omitted or marked unverified rather than asserted as implemented calls.

Main entry points: [`frontend/src/App.tsx`](https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/App.tsx) (Application routes), [`backend/app/api/v1/routes.py`](https://github.com/vishalsundara-hue/echo/blob/main/backend/app/api/v1/routes.py) (Versioned API), [`backend/app/services/rag/assistant.py`](https://github.com/vishalsundara-hue/echo/blob/main/backend/app/services/rag/assistant.py) (Grounded assistant), [`frontend/src/pages/KnowledgeGraphPage.tsx`](https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/KnowledgeGraphPage.tsx) (Knowledge map)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_app["Application routes<br/>[App.tsx]"]
  node_shell["App shell<br/>[AppShell.tsx]"]
  node_dashboards["Role dashboards"]
  node_projects["Project workspace<br/>[ProjectsPage.tsx]"]
  node_settings["Governance settings<br/>[SettingsPage.tsx]"]
end

subgraph group_knowledge["Knowledge workflows"]
  node_documents["Knowledge documents<br/>[DocumentsPage.tsx]"]
  node_graphpage["Knowledge map"]
  node_graphviews["2D and 3D views"]
  node_decisions["Decision DNA<br/>[DecisionsPage.tsx]"]
end

subgraph group_intelligence["Intelligence workflows"]
  node_assistantpage["Assistant workspace<br/>[AssistantPage.tsx]"]
  node_citations["Citation evidence<br/>[CitationDrawer.tsx]"]
  node_incidents["Incident replay<br/>[IncidentsPage.tsx]"]
  node_timeline["Memory timeline"]
  node_foresight["Foresight engine<br/>[engine.py]"]
  node_alerts["Alerts and discovery<br/>[AlertsPage.tsx]"]
  node_analytics["Analytics reports<br/>[AnalyticsPage.tsx]"]
end

subgraph group_platform["API and security"]
  node_api["Versioned API<br/>[routes.py]"]
  node_security["RBAC permissions<br/>[security.py]"]
  node_rag["Grounded assistant<br/>[assistant.py]"]
  node_contracts["API contracts<br/>[contracts.py]"]
  node_entities["Tenant data model<br/>[entities.py]"]
  node_database[("PostgreSQL and pgvector")]
end

node_user(("Organisation user"))
node_github(("GitHub events"))
node_azurequeue["Azure Service Bus"]

node_user -->|"opens"| node_app
node_app -->|"wraps routes"| node_shell
node_app -->|"routes to"| node_dashboards
node_app -->|"routes to"| node_projects
node_app -->|"routes to"| node_settings
node_app -->|"routes to"| node_documents
node_app -->|"routes to"| node_graphpage
node_app -->|"routes to"| node_decisions
node_app -->|"routes to"| node_assistantpage
node_app -->|"routes to"| node_incidents
node_app -->|"routes to"| node_alerts
node_app -->|"routes to"| node_analytics
node_graphpage -->|"renders views"| node_graphviews
node_incidents -->|"replays timeline"| node_timeline
node_api -->|"checks permissions"| node_security
node_api -->|"uses contracts"| node_contracts
node_rag -->|"filters and rechecks"| node_security
node_rag -->|"returns answer"| node_contracts
node_api -.->|"may delegate"| node_rag
node_entities -.->|"models data for"| node_database
node_api -.->|"queues uploads"| node_azurequeue
node_github -.->|"sends webhook"| node_api
node_api -.->|"may trigger scan"| node_foresight
node_foresight -.->|"surfaces matches"| node_alerts
node_assistantpage -->|"opens citations"| node_citations

click node_app "https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/App.tsx"
click node_shell "https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/components/layout/AppShell.tsx"
click node_dashboards "https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/EmployeeDashboardPage.tsx"
click node_projects "https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/ProjectsPage.tsx"
click node_settings "https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/SettingsPage.tsx"
click node_documents "https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/DocumentsPage.tsx"
click node_graphpage "https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/KnowledgeGraphPage.tsx"
click node_graphviews "https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/components/knowledge/KnowledgeGraph3D.tsx"
click node_decisions "https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/DecisionsPage.tsx"
click node_assistantpage "https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/AssistantPage.tsx"
click node_citations "https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/components/knowledge/CitationDrawer.tsx"
click node_incidents "https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/IncidentsPage.tsx"
click node_timeline "https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/components/knowledge/MemoryReplayTimeline.tsx"
click node_foresight "https://github.com/vishalsundara-hue/echo/blob/main/backend/app/services/foresight/engine.py"
click node_alerts "https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/AlertsPage.tsx"
click node_analytics "https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/AnalyticsPage.tsx"
click node_api "https://github.com/vishalsundara-hue/echo/blob/main/backend/app/api/v1/routes.py"
click node_security "https://github.com/vishalsundara-hue/echo/blob/main/backend/app/core/security.py"
click node_rag "https://github.com/vishalsundara-hue/echo/blob/main/backend/app/services/rag/assistant.py"
click node_contracts "https://github.com/vishalsundara-hue/echo/blob/main/backend/app/schemas/contracts.py"
click node_entities "https://github.com/vishalsundara-hue/echo/blob/main/backend/app/models/entities.py"

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_app,node_shell,node_dashboards,node_projects,node_settings,node_user toneBlue
class node_documents,node_graphpage,node_graphviews,node_decisions toneAmber
class node_assistantpage,node_citations,node_incidents,node_timeline,node_foresight,node_alerts,node_analytics toneMint
class node_api,node_security,node_rag,node_contracts,node_entities,node_database toneRose
class node_github,node_azurequeue toneIndigo
```

## Components

### User experience

- [Application routes](https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [App shell](https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/components/layout/AppShell.tsx): `frontend/src/components/layout/AppShell.tsx`
- [Role dashboards](https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/EmployeeDashboardPage.tsx): `frontend/src/pages/EmployeeDashboardPage.tsx`
- [Project workspace](https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/ProjectsPage.tsx): `frontend/src/pages/ProjectsPage.tsx`
- [Governance settings](https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/SettingsPage.tsx): `frontend/src/pages/SettingsPage.tsx`

### Knowledge workflows

- [Knowledge documents](https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/DocumentsPage.tsx): `frontend/src/pages/DocumentsPage.tsx`
- [Knowledge map](https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/KnowledgeGraphPage.tsx): `frontend/src/pages/KnowledgeGraphPage.tsx`
- [2D and 3D views](https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/components/knowledge/KnowledgeGraph3D.tsx): `frontend/src/components/knowledge/KnowledgeGraph3D.tsx`
- [Decision DNA](https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/DecisionsPage.tsx): `frontend/src/pages/DecisionsPage.tsx`

### Intelligence workflows

- [Assistant workspace](https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/AssistantPage.tsx): `frontend/src/pages/AssistantPage.tsx`
- [Citation evidence](https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/components/knowledge/CitationDrawer.tsx): `frontend/src/components/knowledge/CitationDrawer.tsx`
- [Incident replay](https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/IncidentsPage.tsx): `frontend/src/pages/IncidentsPage.tsx`
- [Memory timeline](https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/components/knowledge/MemoryReplayTimeline.tsx): `frontend/src/components/knowledge/MemoryReplayTimeline.tsx`
- [Foresight engine](https://github.com/vishalsundara-hue/echo/blob/main/backend/app/services/foresight/engine.py): `backend/app/services/foresight/engine.py`
- [Alerts and discovery](https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/AlertsPage.tsx): `frontend/src/pages/AlertsPage.tsx`
- [Analytics reports](https://github.com/vishalsundara-hue/echo/blob/main/frontend/src/pages/AnalyticsPage.tsx): `frontend/src/pages/AnalyticsPage.tsx`

### API and security

- [Versioned API](https://github.com/vishalsundara-hue/echo/blob/main/backend/app/api/v1/routes.py): `backend/app/api/v1/routes.py`
- [RBAC permissions](https://github.com/vishalsundara-hue/echo/blob/main/backend/app/core/security.py): `backend/app/core/security.py`
- [Grounded assistant](https://github.com/vishalsundara-hue/echo/blob/main/backend/app/services/rag/assistant.py): `backend/app/services/rag/assistant.py`
- [API contracts](https://github.com/vishalsundara-hue/echo/blob/main/backend/app/schemas/contracts.py): `backend/app/schemas/contracts.py`
- [Tenant data model](https://github.com/vishalsundara-hue/echo/blob/main/backend/app/models/entities.py): `backend/app/models/entities.py`
- **PostgreSQL and pgvector**

### Other components

- **Organisation user**
- **GitHub events**
- **Azure Service Bus**

## Connections

- Organisation user → Application routes: opens
- Application routes → App shell: wraps routes (evidence: `frontend/src/App.tsx`)
- Application routes → Role dashboards: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Project workspace: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Governance settings: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Knowledge documents: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Knowledge map: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Decision DNA: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Assistant workspace: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Incident replay: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Alerts and discovery: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Analytics reports: routes to (evidence: `frontend/src/App.tsx`)
- Knowledge map → 2D and 3D views: renders views
- Incident replay → Memory timeline: replays timeline
- Versioned API → RBAC permissions: checks permissions (evidence: `backend/app/api/v1/routes.py`)
- Versioned API → API contracts: uses contracts (evidence: `backend/app/api/v1/routes.py`)
- Grounded assistant → RBAC permissions: filters and rechecks (evidence: `backend/app/services/rag/assistant.py`)
- Grounded assistant → API contracts: returns answer (evidence: `backend/app/services/rag/assistant.py`)
- Versioned API → Grounded assistant: may delegate
- Tenant data model → PostgreSQL and pgvector: models data for
- Versioned API → Azure Service Bus: queues uploads
- GitHub events → Versioned API: sends webhook
- Versioned API → Foresight engine: may trigger scan
- Foresight engine → Alerts and discovery: surfaces matches
- Assistant workspace → Citation evidence: opens citations
