# alextum207/radj architecture

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

- Interactive diagram: https://gitdiagram.com/alextum207/radj
- Repository: https://github.com/alextum207/radj

## Overview

This repository presents a fictional knowledge-exchange product for helping sales colleagues turn an RfP into a draft proposal using policy-controlled knowledge bundles. The principal workflow is identity selection, bundle selection, agent-assisted exploration and response generation, with access checks and logging enforced by the platform. The graph includes the sampled frontend composition and backend modules, plus documented MCP and proposal capabilities. The frontend-to-backend wiring and several server internals were not shown, so those links are omitted rather than inferred.

Main entry points: [`solution/platform/server.py`](https://github.com/alextum207/radj/blob/main/solution/platform/server.py) (Web and MCP server), [`frontend/src/components/kx/Workspace.tsx`](https://github.com/alextum207/radj/blob/main/frontend/src/components/kx/Workspace.tsx) (Workspace), [`frontend/src/components/kx/App.tsx`](https://github.com/alextum207/radj/blob/main/frontend/src/components/kx/App.tsx) (App shell), [`solution/platform/chat.py`](https://github.com/alextum207/radj/blob/main/solution/platform/chat.py) (Agent chat loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Sales workspace"]
  node_app["App shell<br/>[App.tsx]"]
  node_login["Persona login<br/>[LoginScreen.tsx]"]
  node_workspace["Workspace<br/>[Workspace.tsx]"]
  node_bundle_picker["Bundle picker<br/>[BundlePicker.tsx]"]
  node_chat_panel["Chat panel<br/>[ChatPanel.tsx]"]
  node_access_log["Access log view<br/>[AccessLogPanel.tsx]"]
  node_proposal_views["Proposal views<br/>[ResultOnePager.tsx]"]
end

subgraph group_platform["Exchange platform"]
  node_server["Web and MCP server<br/>[server.py]"]
  node_user_auth["User authentication<br/>[users.py]"]
end

subgraph group_knowledge["Knowledge services"]
  node_core["Bundle policy and index<br/>[core.py]"]
  node_leakcheck["Citation and leak check<br/>[leakcheck.py]"]
end

subgraph group_generation["Response generation"]
  node_chat_agent["Agent chat loop<br/>[chat.py]"]
  node_estimation["Offer estimation<br/>[estimate.py]"]
end

node_sales_user(("Sales colleague"))
node_agent_client(("MCP agent"))
node_llm{{"OpenRouter model"}}

node_sales_user -.->|"uses"| node_app
node_app -->|"renders"| node_login
node_app -->|"renders"| node_workspace
node_workspace -->|"renders"| node_bundle_picker
node_workspace -->|"renders"| node_chat_panel
node_workspace -->|"renders"| node_access_log
node_chat_panel -->|"renders"| node_proposal_views
node_sales_user -.->|"uses web UI"| node_server
node_agent_client -->|"connects via MCP"| node_server
node_server -->|"authenticates users"| node_user_auth
node_server -->|"checks access"| node_core
node_server -->|"runs chat"| node_chat_agent
node_server -->|"requests estimate"| node_estimation
node_chat_agent -->|"sends prompts"| node_llm
node_estimation -->|"uses chat logic"| node_chat_agent
node_leakcheck -->|"checks visibility"| node_core

click node_app "https://github.com/alextum207/radj/blob/main/frontend/src/components/kx/App.tsx"
click node_login "https://github.com/alextum207/radj/blob/main/frontend/src/components/kx/LoginScreen.tsx"
click node_workspace "https://github.com/alextum207/radj/blob/main/frontend/src/components/kx/Workspace.tsx"
click node_bundle_picker "https://github.com/alextum207/radj/blob/main/frontend/src/components/kx/BundlePicker.tsx"
click node_chat_panel "https://github.com/alextum207/radj/blob/main/frontend/src/components/kx/ChatPanel.tsx"
click node_access_log "https://github.com/alextum207/radj/blob/main/frontend/src/components/kx/AccessLogPanel.tsx"
click node_proposal_views "https://github.com/alextum207/radj/blob/main/frontend/src/components/kx/ResultOnePager.tsx"
click node_server "https://github.com/alextum207/radj/blob/main/solution/platform/server.py"
click node_user_auth "https://github.com/alextum207/radj/blob/main/solution/platform/users.py"
click node_core "https://github.com/alextum207/radj/blob/main/solution/platform/core.py"
click node_leakcheck "https://github.com/alextum207/radj/blob/main/solution/evidence/T5/leakcheck.py"
click node_chat_agent "https://github.com/alextum207/radj/blob/main/solution/platform/chat.py"
click node_estimation "https://github.com/alextum207/radj/blob/main/solution/platform/estimate.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_login,node_workspace,node_bundle_picker,node_chat_panel,node_access_log,node_proposal_views toneBlue
class node_server,node_user_auth toneAmber
class node_core,node_leakcheck,node_llm toneMint
class node_chat_agent,node_estimation toneRose
class node_sales_user,node_agent_client toneIndigo
```

## Components

### Sales workspace

- [App shell](https://github.com/alextum207/radj/blob/main/frontend/src/components/kx/App.tsx): `frontend/src/components/kx/App.tsx`
- [Persona login](https://github.com/alextum207/radj/blob/main/frontend/src/components/kx/LoginScreen.tsx): `frontend/src/components/kx/LoginScreen.tsx`
- [Workspace](https://github.com/alextum207/radj/blob/main/frontend/src/components/kx/Workspace.tsx): `frontend/src/components/kx/Workspace.tsx`
- [Bundle picker](https://github.com/alextum207/radj/blob/main/frontend/src/components/kx/BundlePicker.tsx): `frontend/src/components/kx/BundlePicker.tsx`
- [Chat panel](https://github.com/alextum207/radj/blob/main/frontend/src/components/kx/ChatPanel.tsx): `frontend/src/components/kx/ChatPanel.tsx`
- [Access log view](https://github.com/alextum207/radj/blob/main/frontend/src/components/kx/AccessLogPanel.tsx): `frontend/src/components/kx/AccessLogPanel.tsx`
- [Proposal views](https://github.com/alextum207/radj/blob/main/frontend/src/components/kx/ResultOnePager.tsx): `frontend/src/components/kx/ResultOnePager.tsx`

### Exchange platform

- [Web and MCP server](https://github.com/alextum207/radj/blob/main/solution/platform/server.py): `solution/platform/server.py`
- [User authentication](https://github.com/alextum207/radj/blob/main/solution/platform/users.py): `solution/platform/users.py`

### Knowledge services

- [Bundle policy and index](https://github.com/alextum207/radj/blob/main/solution/platform/core.py): `solution/platform/core.py`
- [Citation and leak check](https://github.com/alextum207/radj/blob/main/solution/evidence/T5/leakcheck.py): `solution/evidence/T5/leakcheck.py`

### Response generation

- [Agent chat loop](https://github.com/alextum207/radj/blob/main/solution/platform/chat.py): `solution/platform/chat.py`
- [Offer estimation](https://github.com/alextum207/radj/blob/main/solution/platform/estimate.py): `solution/platform/estimate.py`

### Other components

- **Sales colleague**
- **MCP agent**
- **OpenRouter model**

## Connections

- Sales colleague → App shell: uses (evidence: `README.md`)
- App shell → Persona login: renders (evidence: `frontend/src/components/kx/App.tsx`)
- App shell → Workspace: renders (evidence: `frontend/src/components/kx/App.tsx`)
- Workspace → Bundle picker: renders (evidence: `frontend/src/components/kx/Workspace.tsx`)
- Workspace → Chat panel: renders (evidence: `frontend/src/components/kx/Workspace.tsx`)
- Workspace → Access log view: renders (evidence: `frontend/src/components/kx/Workspace.tsx`)
- Chat panel → Proposal views: renders (evidence: `frontend/src/components/kx/ChatPanel.tsx`)
- Sales colleague → Web and MCP server: uses web UI (evidence: `solution/platform/server.py`)
- MCP agent → Web and MCP server: connects via MCP (evidence: `solution/platform/server.py`)
- Web and MCP server → User authentication: authenticates users (evidence: `solution/platform/server.py`)
- Web and MCP server → Bundle policy and index: checks access (evidence: `solution/platform/server.py`)
- Web and MCP server → Agent chat loop: runs chat (evidence: `solution/platform/server.py`)
- Web and MCP server → Offer estimation: requests estimate (evidence: `solution/platform/server.py`)
- Agent chat loop → OpenRouter model: sends prompts (evidence: `solution/platform/chat.py`)
- Offer estimation → Agent chat loop: uses chat logic (evidence: `solution/platform/estimate.py`)
- Citation and leak check → Bundle policy and index: checks visibility (evidence: `solution/evidence/T5/leakcheck.py`)
