# mauricebarksdale/roundtable architecture

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

- Interactive diagram: https://gitdiagram.com/mauricebarksdale/roundtable
- Repository: https://github.com/mauricebarksdale/roundtable

## Overview

Roundtable is a multi-agent chat application. Users authenticate, configure sessions and participating agents, send messages, and receive orchestrated model responses; the interface also supports streamed conversations, search, file tools, and image generation. The backend exposes API routes, coordinates agent/model execution, and persists conversation state through Supabase. The graph preserves documented and indexed product areas, but several implementation details—especially frontend-to-API calls and some orchestration stages—were not excerpted, so uncertain links are omitted or marked unverified.

Main entry points: [`backend/main.py`](https://github.com/mauricebarksdale/roundtable/blob/main/backend/main.py) (FastAPI application), [`backend/storage/supabase.py`](https://github.com/mauricebarksdale/roundtable/blob/main/backend/storage/supabase.py) (Supabase client), [`backend/orchestrator/runner.py`](https://github.com/mauricebarksdale/roundtable/blob/main/backend/orchestrator/runner.py) (Agent orchestrator), [`backend/model_client/client.py`](https://github.com/mauricebarksdale/roundtable/blob/main/backend/model_client/client.py) (Model client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_web["Chat interface"]
  node_frontend_data["Frontend API client<br/>[api-client.ts]"]
  node_frontend_stream["Stream client<br/>[sse-client.ts]"]
  node_frontend_store["Client state<br/>[store.ts]"]
end

subgraph group_api["API and identity"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_auth["Authentication<br/>[dependencies.py]"]
  node_session_routes["Session routes<br/>[sessions.py]"]
  node_agent_routes["Agent routes<br/>[agents.py]"]
  node_message_routes["Message routes<br/>[messages.py]"]
  node_stream_routes["Streaming routes<br/>[streaming.py]"]
end

subgraph group_conversation["Conversation runtime"]
  node_orchestrator["Agent orchestrator<br/>[runner.py]"]
  node_agent_context["Agent context<br/>[context.py]"]
  node_tool_executor["Tool executor<br/>[tool_executor.py]"]
end

subgraph group_capabilities["Chat capabilities"]
  node_image_routes["Image routes<br/>[images.py]"]
  node_search_routes["Search routes<br/>[search.py]"]
  node_tool_routes["Tool routes<br/>[tools.py]"]
  node_tool_registry["Tool registry<br/>[registry.py]"]
  node_file_tools["File tools"]
  node_web_search["Web search tool<br/>[web_search.py]"]
  node_file_processor["File processing<br/>[file_processor.py]"]
end

subgraph group_persistence["Persistence and models"]
  node_chat_messages["Message history<br/>[chat_messages.py]"]
  node_supabase[("Supabase client<br/>[supabase.py]")]
  node_model_client["Model client<br/>[client.py]"]
  node_providers["Provider catalog<br/>[providers.py]"]
  node_settings["Runtime settings<br/>[settings.py]"]
end

node_user(("User"))
node_model_service(("Model providers"))
node_supabase_service[("Supabase service")]

node_user -.->|"uses"| node_web
node_web -.->|"requests"| node_frontend_data
node_frontend_stream -->|"uses"| node_frontend_data
node_api_app -->|"installs"| node_auth
node_api_app -->|"registers"| node_session_routes
node_api_app -->|"registers"| node_agent_routes
node_api_app -->|"registers"| node_message_routes
node_api_app -->|"registers"| node_stream_routes
node_api_app -->|"registers"| node_image_routes
node_api_app -->|"registers"| node_search_routes
node_api_app -->|"registers"| node_tool_routes
node_api_app -->|"configures"| node_providers
node_api_app -->|"initializes"| node_supabase
node_auth -->|"verifies ownership"| node_supabase
node_session_routes -->|"fetches history"| node_chat_messages
node_session_routes -->|"reads and writes"| node_supabase
node_message_routes -->|"uses history"| node_chat_messages
node_message_routes -.->|"starts turns"| node_orchestrator
node_stream_routes -.->|"streams runs"| node_orchestrator
node_agent_routes -->|"reads and writes"| node_supabase
node_image_routes -->|"requests generation"| node_model_client
node_image_routes -->|"stores image data"| node_supabase
node_search_routes -->|"searches"| node_supabase
node_orchestrator -->|"loads context"| node_agent_context
node_orchestrator -->|"requests completions"| node_model_client
node_orchestrator -->|"dispatches tools"| node_tool_executor
node_tool_executor -->|"resolves tools"| node_tool_registry
node_tool_registry -.->|"registers"| node_file_tools
node_tool_registry -.->|"registers"| node_web_search
node_file_tools -.->|"processes files"| node_file_processor
node_chat_messages -->|"reads and writes"| node_supabase
node_model_client -->|"uses definitions"| node_providers
node_model_client -.->|"calls"| node_model_service
node_supabase -->|"authenticates and queries"| node_supabase_service
node_api_app -->|"configures"| node_settings

click node_web "https://github.com/mauricebarksdale/roundtable/blob/main/frontend/app/components/conversation-view.tsx"
click node_frontend_data "https://github.com/mauricebarksdale/roundtable/blob/main/frontend/lib/api-client.ts"
click node_frontend_stream "https://github.com/mauricebarksdale/roundtable/blob/main/frontend/lib/sse-client.ts"
click node_frontend_store "https://github.com/mauricebarksdale/roundtable/blob/main/frontend/lib/store.ts"
click node_api_app "https://github.com/mauricebarksdale/roundtable/blob/main/backend/main.py"
click node_auth "https://github.com/mauricebarksdale/roundtable/blob/main/backend/auth/dependencies.py"
click node_session_routes "https://github.com/mauricebarksdale/roundtable/blob/main/backend/routers/sessions.py"
click node_agent_routes "https://github.com/mauricebarksdale/roundtable/blob/main/backend/routers/agents.py"
click node_message_routes "https://github.com/mauricebarksdale/roundtable/blob/main/backend/routers/messages.py"
click node_stream_routes "https://github.com/mauricebarksdale/roundtable/blob/main/backend/routers/streaming.py"
click node_image_routes "https://github.com/mauricebarksdale/roundtable/blob/main/backend/routers/images.py"
click node_search_routes "https://github.com/mauricebarksdale/roundtable/blob/main/backend/routers/search.py"
click node_tool_routes "https://github.com/mauricebarksdale/roundtable/blob/main/backend/routers/tools.py"
click node_orchestrator "https://github.com/mauricebarksdale/roundtable/blob/main/backend/orchestrator/runner.py"
click node_agent_context "https://github.com/mauricebarksdale/roundtable/blob/main/backend/orchestrator/context.py"
click node_tool_executor "https://github.com/mauricebarksdale/roundtable/blob/main/backend/orchestrator/tool_executor.py"
click node_tool_registry "https://github.com/mauricebarksdale/roundtable/blob/main/backend/tool/registry.py"
click node_file_tools "https://github.com/mauricebarksdale/roundtable/tree/main/backend/tool"
click node_web_search "https://github.com/mauricebarksdale/roundtable/blob/main/backend/tool/web_search.py"
click node_file_processor "https://github.com/mauricebarksdale/roundtable/blob/main/backend/processors/file_processor.py"
click node_chat_messages "https://github.com/mauricebarksdale/roundtable/blob/main/backend/chat_messages.py"
click node_supabase "https://github.com/mauricebarksdale/roundtable/blob/main/backend/storage/supabase.py"
click node_model_client "https://github.com/mauricebarksdale/roundtable/blob/main/backend/model_client/client.py"
click node_providers "https://github.com/mauricebarksdale/roundtable/blob/main/backend/schemas/providers.py"
click node_settings "https://github.com/mauricebarksdale/roundtable/blob/main/backend/settings.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_web,node_frontend_data,node_frontend_stream,node_frontend_store,node_user toneBlue
class node_api_app,node_auth,node_session_routes,node_agent_routes,node_message_routes,node_stream_routes,node_supabase_service toneAmber
class node_orchestrator,node_agent_context,node_tool_executor toneMint
class node_image_routes,node_search_routes,node_tool_routes,node_tool_registry,node_file_tools,node_web_search,node_file_processor toneRose
class node_chat_messages,node_supabase,node_model_client,node_providers,node_settings,node_model_service toneIndigo
```

## Components

### Web application

- [Chat interface](https://github.com/mauricebarksdale/roundtable/blob/main/frontend/app/components/conversation-view.tsx): `frontend/app/components/conversation-view.tsx`
- [Frontend API client](https://github.com/mauricebarksdale/roundtable/blob/main/frontend/lib/api-client.ts): `frontend/lib/api-client.ts`
- [Stream client](https://github.com/mauricebarksdale/roundtable/blob/main/frontend/lib/sse-client.ts): `frontend/lib/sse-client.ts`
- [Client state](https://github.com/mauricebarksdale/roundtable/blob/main/frontend/lib/store.ts): `frontend/lib/store.ts`

### API and identity

- [FastAPI application](https://github.com/mauricebarksdale/roundtable/blob/main/backend/main.py): `backend/main.py`
- [Authentication](https://github.com/mauricebarksdale/roundtable/blob/main/backend/auth/dependencies.py): `backend/auth/dependencies.py`
- [Session routes](https://github.com/mauricebarksdale/roundtable/blob/main/backend/routers/sessions.py): `backend/routers/sessions.py`
- [Agent routes](https://github.com/mauricebarksdale/roundtable/blob/main/backend/routers/agents.py): `backend/routers/agents.py`
- [Message routes](https://github.com/mauricebarksdale/roundtable/blob/main/backend/routers/messages.py): `backend/routers/messages.py`
- [Streaming routes](https://github.com/mauricebarksdale/roundtable/blob/main/backend/routers/streaming.py): `backend/routers/streaming.py`

### Conversation runtime

- [Agent orchestrator](https://github.com/mauricebarksdale/roundtable/blob/main/backend/orchestrator/runner.py): `backend/orchestrator/runner.py`
- [Agent context](https://github.com/mauricebarksdale/roundtable/blob/main/backend/orchestrator/context.py): `backend/orchestrator/context.py`
- [Tool executor](https://github.com/mauricebarksdale/roundtable/blob/main/backend/orchestrator/tool_executor.py): `backend/orchestrator/tool_executor.py`

### Chat capabilities

- [Image routes](https://github.com/mauricebarksdale/roundtable/blob/main/backend/routers/images.py): `backend/routers/images.py`
- [Search routes](https://github.com/mauricebarksdale/roundtable/blob/main/backend/routers/search.py): `backend/routers/search.py`
- [Tool routes](https://github.com/mauricebarksdale/roundtable/blob/main/backend/routers/tools.py): `backend/routers/tools.py`
- [Tool registry](https://github.com/mauricebarksdale/roundtable/blob/main/backend/tool/registry.py): `backend/tool/registry.py`
- [File tools](https://github.com/mauricebarksdale/roundtable/tree/main/backend/tool): `backend/tool`
- [Web search tool](https://github.com/mauricebarksdale/roundtable/blob/main/backend/tool/web_search.py): `backend/tool/web_search.py`
- [File processing](https://github.com/mauricebarksdale/roundtable/blob/main/backend/processors/file_processor.py): `backend/processors/file_processor.py`

### Persistence and models

- [Message history](https://github.com/mauricebarksdale/roundtable/blob/main/backend/chat_messages.py): `backend/chat_messages.py`
- [Supabase client](https://github.com/mauricebarksdale/roundtable/blob/main/backend/storage/supabase.py): `backend/storage/supabase.py`
- [Model client](https://github.com/mauricebarksdale/roundtable/blob/main/backend/model_client/client.py): `backend/model_client/client.py`
- [Provider catalog](https://github.com/mauricebarksdale/roundtable/blob/main/backend/schemas/providers.py): `backend/schemas/providers.py`
- [Runtime settings](https://github.com/mauricebarksdale/roundtable/blob/main/backend/settings.py): `backend/settings.py`

### Other components

- **User**
- **Model providers**
- **Supabase service**

## Connections

- User → Chat interface: uses
- Chat interface → Frontend API client: requests
- Stream client → Frontend API client: uses (evidence: `frontend/lib/sse-client.ts`)
- FastAPI application → Authentication: installs (evidence: `backend/main.py`)
- FastAPI application → Session routes: registers (evidence: `backend/main.py`)
- FastAPI application → Agent routes: registers (evidence: `backend/main.py`)
- FastAPI application → Message routes: registers (evidence: `backend/main.py`)
- FastAPI application → Streaming routes: registers (evidence: `backend/main.py`)
- FastAPI application → Image routes: registers (evidence: `backend/main.py`)
- FastAPI application → Search routes: registers (evidence: `backend/main.py`)
- FastAPI application → Tool routes: registers (evidence: `backend/main.py`)
- FastAPI application → Provider catalog: configures (evidence: `backend/main.py`)
- FastAPI application → Supabase client: initializes (evidence: `backend/main.py`)
- Authentication → Supabase client: verifies ownership (evidence: `backend/auth/dependencies.py`)
- Session routes → Message history: fetches history (evidence: `backend/routers/sessions.py`)
- Session routes → Supabase client: reads and writes (evidence: `backend/routers/sessions.py`)
- Message routes → Message history: uses history (evidence: `backend/routers/messages.py`)
- Message routes → Agent orchestrator: starts turns
- Streaming routes → Agent orchestrator: streams runs
- Agent routes → Supabase client: reads and writes (evidence: `backend/routers/agents.py`)
- Image routes → Model client: requests generation (evidence: `backend/routers/images.py`)
- Image routes → Supabase client: stores image data (evidence: `backend/routers/images.py`)
- Search routes → Supabase client: searches (evidence: `backend/routers/search.py`)
- Agent orchestrator → Agent context: loads context (evidence: `backend/orchestrator/runner.py`)
- Agent orchestrator → Model client: requests completions (evidence: `backend/orchestrator/runner.py`)
- Agent orchestrator → Tool executor: dispatches tools (evidence: `backend/orchestrator/runner.py`)
- Tool executor → Tool registry: resolves tools (evidence: `backend/orchestrator/tool_executor.py`)
- Tool registry → File tools: registers
- Tool registry → Web search tool: registers
- File tools → File processing: processes files
- Message history → Supabase client: reads and writes (evidence: `backend/chat_messages.py`)
- Model client → Provider catalog: uses definitions (evidence: `backend/model_client/client.py`)
- Model client → Model providers: calls
- Supabase client → Supabase service: authenticates and queries (evidence: `backend/storage/supabase.py`)
- FastAPI application → Runtime settings: configures (evidence: `backend/main.py`)
