# youssefamdouni/rde architecture

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

- Interactive diagram: https://gitdiagram.com/youssefamdouni/rde
- Repository: https://github.com/youssefamdouni/rde

## Overview

Smart Backlog Assistant is a web UI and FastAPI service for turning meeting notes into reviewed backlog changes. Users authenticate, submit notes or questions, and receive streamed results: safety checks and intent routing send meeting notes through topic extraction, story matching, and proposal drafting, while general questions use web search. Users approve, reject, or edit proposals; approved changes update Pinecone and the backlog can be downloaded. The README documents these capabilities; some internal calls and frontend endpoint wiring were not excerpted, so those relationships are omitted or attributed to the README.

Main entry points: [`backend/main.py`](https://github.com/youssefamdouni/rde/blob/main/backend/main.py) (FastAPI routes), [`backend/agent.py`](https://github.com/youssefamdouni/rde/blob/main/backend/agent.py) (Backlog pipeline adapter), [`backend/llm_config.py`](https://github.com/youssefamdouni/rde/blob/main/backend/llm_config.py) (LLM configuration), [`backend/router_agent.py`](https://github.com/youssefamdouni/rde/blob/main/backend/router_agent.py) (Intent router)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_frontend["Chat and review UI<br/>[script.js]"]
end

subgraph group_service["API and sessions"]
  node_api["FastAPI routes<br/>[main.py]"]
  node_auth["JWT authentication<br/>[auth.py]"]
end

subgraph group_backlog["Backlog workflow"]
  node_pipeline["Backlog pipeline adapter<br/>[agent.py]"]
  node_extract["Topic extraction<br/>[agent.py]"]
  node_match["Story matching<br/>[agent.py]"]
  node_draft["Proposal drafting<br/>[agent.py]"]
  node_review["Proposal review<br/>[main.py]"]
  node_sync["Approved-story sync<br/>[agent.py]"]
  node_export["Backlog download<br/>[main.py]"]
  node_ingest["Backlog ingestion<br/>[ingest_backlog.py]"]
end

subgraph group_assist["Assistant capabilities"]
  node_guard["Input safety guard<br/>[guard.py]"]
  node_router["Intent router<br/>[router_agent.py]"]
  node_webagent["Web-search agent"]
  node_memory["History compression<br/>[memory_manager.py]"]
  node_tavily["Tavily search"]
end

subgraph group_platform["Persistence and configuration"]
  node_llm["LLM configuration<br/>[llm_config.py]"]
  node_db[("Application database<br/>[database.py]")]
  node_pinecone[("Pinecone index")]
  node_logger["Structured logging<br/>[logger.py]"]
end

node_user(("User"))

node_user -->|"submits input"| node_frontend
node_frontend -->|"uses API"| node_api
node_api -->|"requires identity"| node_auth
node_auth -->|"reads and writes"| node_db
node_api -->|"stores sessions"| node_db
node_api -->|"checks input"| node_guard
node_api -->|"classifies input"| node_router
node_router -->|"routes meeting notes"| node_pipeline
node_router -->|"routes questions"| node_webagent
node_api -->|"streams pipeline"| node_pipeline
node_pipeline -->|"runs step one"| node_extract
node_pipeline -->|"runs step two"| node_match
node_pipeline -->|"runs step three"| node_draft
node_api -->|"accepts decisions"| node_review
node_review -->|"syncs approvals"| node_sync
node_sync -->|"upserts stories"| node_pinecone
node_api -->|"serves download"| node_export
node_webagent -->|"searches web"| node_tavily
node_webagent -->|"compresses history"| node_memory
node_ingest -->|"seeds vectors"| node_pinecone
node_guard -->|"configures classifier"| node_llm
node_router -->|"configures classifier"| node_llm
node_pipeline -->|"configures models"| node_llm
node_webagent -->|"configures synthesis"| node_llm
node_memory -->|"configures summarizer"| node_llm
node_pipeline -->|"logs activity"| node_logger

click node_frontend "https://github.com/youssefamdouni/rde/blob/main/frontend/script.js"
click node_api "https://github.com/youssefamdouni/rde/blob/main/backend/main.py"
click node_auth "https://github.com/youssefamdouni/rde/blob/main/backend/auth.py"
click node_guard "https://github.com/youssefamdouni/rde/blob/main/backend/guard.py"
click node_router "https://github.com/youssefamdouni/rde/blob/main/backend/router_agent.py"
click node_pipeline "https://github.com/youssefamdouni/rde/blob/main/backend/agent.py"
click node_extract "https://github.com/youssefamdouni/rde/blob/main/backend/agent.py"
click node_match "https://github.com/youssefamdouni/rde/blob/main/backend/agent.py"
click node_draft "https://github.com/youssefamdouni/rde/blob/main/backend/agent.py"
click node_review "https://github.com/youssefamdouni/rde/blob/main/backend/main.py"
click node_sync "https://github.com/youssefamdouni/rde/blob/main/backend/agent.py"
click node_export "https://github.com/youssefamdouni/rde/blob/main/backend/main.py"
click node_webagent "https://github.com/youssefamdouni/rde/blob/main/backend/web_search_agent.py"
click node_memory "https://github.com/youssefamdouni/rde/blob/main/backend/memory_manager.py"
click node_llm "https://github.com/youssefamdouni/rde/blob/main/backend/llm_config.py"
click node_db "https://github.com/youssefamdouni/rde/blob/main/backend/database.py"
click node_ingest "https://github.com/youssefamdouni/rde/blob/main/sample_data/ingest_backlog.py"
click node_logger "https://github.com/youssefamdouni/rde/blob/main/backend/logger.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_frontend,node_user toneBlue
class node_api,node_auth toneAmber
class node_pipeline,node_extract,node_match,node_draft,node_review,node_sync,node_export,node_ingest toneMint
class node_guard,node_router,node_webagent,node_memory,node_tavily toneRose
class node_llm,node_db,node_pinecone,node_logger toneIndigo
```

## Components

### Web interface

- [Chat and review UI](https://github.com/youssefamdouni/rde/blob/main/frontend/script.js): `frontend/script.js`

### API and sessions

- [FastAPI routes](https://github.com/youssefamdouni/rde/blob/main/backend/main.py): `backend/main.py`
- [JWT authentication](https://github.com/youssefamdouni/rde/blob/main/backend/auth.py): `backend/auth.py`

### Backlog workflow

- [Backlog pipeline adapter](https://github.com/youssefamdouni/rde/blob/main/backend/agent.py): `backend/agent.py`
- [Topic extraction](https://github.com/youssefamdouni/rde/blob/main/backend/agent.py): `backend/agent.py`
- [Story matching](https://github.com/youssefamdouni/rde/blob/main/backend/agent.py): `backend/agent.py`
- [Proposal drafting](https://github.com/youssefamdouni/rde/blob/main/backend/agent.py): `backend/agent.py`
- [Proposal review](https://github.com/youssefamdouni/rde/blob/main/backend/main.py): `backend/main.py`
- [Approved-story sync](https://github.com/youssefamdouni/rde/blob/main/backend/agent.py): `backend/agent.py`
- [Backlog download](https://github.com/youssefamdouni/rde/blob/main/backend/main.py): `backend/main.py`
- [Backlog ingestion](https://github.com/youssefamdouni/rde/blob/main/sample_data/ingest_backlog.py): `sample_data/ingest_backlog.py`

### Assistant capabilities

- [Input safety guard](https://github.com/youssefamdouni/rde/blob/main/backend/guard.py): `backend/guard.py`
- [Intent router](https://github.com/youssefamdouni/rde/blob/main/backend/router_agent.py): `backend/router_agent.py`
- [Web-search agent](https://github.com/youssefamdouni/rde/blob/main/backend/web_search_agent.py): `backend/web_search_agent.py`
- [History compression](https://github.com/youssefamdouni/rde/blob/main/backend/memory_manager.py): `backend/memory_manager.py`
- **Tavily search**

### Persistence and configuration

- [LLM configuration](https://github.com/youssefamdouni/rde/blob/main/backend/llm_config.py): `backend/llm_config.py`
- [Application database](https://github.com/youssefamdouni/rde/blob/main/backend/database.py): `backend/database.py`
- **Pinecone index**
- [Structured logging](https://github.com/youssefamdouni/rde/blob/main/backend/logger.py): `backend/logger.py`

### Other components

- **User**

## Connections

- User → Chat and review UI: submits input (evidence: `README.md`)
- Chat and review UI → FastAPI routes: uses API (evidence: `README.md`)
- FastAPI routes → JWT authentication: requires identity (evidence: `backend/main.py`)
- JWT authentication → Application database: reads and writes (evidence: `backend/auth.py`)
- FastAPI routes → Application database: stores sessions (evidence: `backend/main.py`)
- FastAPI routes → Input safety guard: checks input (evidence: `README.md`)
- FastAPI routes → Intent router: classifies input (evidence: `README.md`)
- Intent router → Backlog pipeline adapter: routes meeting notes (evidence: `README.md`)
- Intent router → Web-search agent: routes questions (evidence: `README.md`)
- FastAPI routes → Backlog pipeline adapter: streams pipeline (evidence: `backend/main.py`)
- Backlog pipeline adapter → Topic extraction: runs step one (evidence: `README.md`)
- Backlog pipeline adapter → Story matching: runs step two (evidence: `README.md`)
- Backlog pipeline adapter → Proposal drafting: runs step three (evidence: `README.md`)
- FastAPI routes → Proposal review: accepts decisions (evidence: `README.md`)
- Proposal review → Approved-story sync: syncs approvals (evidence: `README.md`)
- Approved-story sync → Pinecone index: upserts stories (evidence: `README.md`)
- FastAPI routes → Backlog download: serves download (evidence: `README.md`)
- Web-search agent → Tavily search: searches web (evidence: `backend/web_search_agent.py`)
- Web-search agent → History compression: compresses history (evidence: `backend/web_search_agent.py`)
- Backlog ingestion → Pinecone index: seeds vectors (evidence: `sample_data/ingest_backlog.py`)
- Input safety guard → LLM configuration: configures classifier (evidence: `backend/guard.py`)
- Intent router → LLM configuration: configures classifier (evidence: `backend/router_agent.py`)
- Backlog pipeline adapter → LLM configuration: configures models (evidence: `backend/agent.py`)
- Web-search agent → LLM configuration: configures synthesis (evidence: `backend/web_search_agent.py`)
- History compression → LLM configuration: configures summarizer (evidence: `backend/memory_manager.py`)
- Backlog pipeline adapter → Structured logging: logs activity (evidence: `backend/agent.py`)
