# roxigroups/ria-agent architecture

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

- Interactive diagram: https://gitdiagram.com/roxigroups/ria-agent
- Repository: https://github.com/roxigroups/ria-agent

## Overview

This repository is the RIA/Roxy product website and live voice-demo application. A visitor explores the product and its capabilities, can review FAQs or request deployment, and can start a voice demo that obtains a token and connects through LiveKit. The backend contains agent, API, prompt, and database-driver modules. The graph includes the major website and voice-demo areas named in the source index; backend and token-route wiring is limited where source excerpts do not establish runtime calls.

Main entry points: [`src/app/page.tsx`](https://github.com/roxigroups/ria-agent/blob/main/src/app/page.tsx) (Home experience), [`src/app/contact/page.tsx`](https://github.com/roxigroups/ria-agent/blob/main/src/app/contact/page.tsx) (Contact inquiry), [`src/app/qa/page.tsx`](https://github.com/roxigroups/ria-agent/blob/main/src/app/qa/page.tsx) (FAQ page), [`src/components/ParticleCanvas.tsx`](https://github.com/roxigroups/ria-agent/blob/main/src/components/ParticleCanvas.tsx) (Particle canvas)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Website experience"]
  node_home["Home experience<br/>[page.tsx]"]
  node_about["About page<br/>[page.tsx]"]
  node_insights["Insights page<br/>[page.tsx]"]
  node_services["Services page<br/>[page.tsx]"]
  node_contact["Contact inquiry<br/>[page.tsx]"]
  node_qa["FAQ page<br/>[page.tsx]"]
  node_capabilities["Capabilities section"]
  node_hero["Hero section<br/>[HeroSection.tsx]"]
  node_synergy["Synergy section<br/>[SynergySection.tsx]"]
  node_deployment["Deployment section"]
  node_faqcontent["FAQ content<br/>[DemoFaqSection.tsx]"]
end

subgraph group_voice["Voice demo"]
  node_livecard["Homepage demo card<br/>[LiveDemoCard.jsx]"]
  node_modal["LiveKit modal<br/>[LiveKitModal.jsx]"]
  node_assistant["Voice assistant"]
  node_avatar["Robot avatar<br/>[RobotAvatar.jsx]"]
  node_icons["Call icons<br/>[Icons.jsx]"]
  node_session["Demo session logic<br/>[demoSession.js]"]
  node_tokenroute["Token route<br/>[route.ts]"]
end

subgraph group_backend["Agent backend"]
  node_api["Backend API<br/>[api.py]"]
  node_agent["RIA agent<br/>[agent.py]"]
  node_prompts["Agent prompts<br/>[prompts.py]"]
  node_db[("Database driver<br/>[db_driver.py]")]
end

subgraph group_shared["Shared presentation"]
  node_nav["Header navigation<br/>[HeaderNav.tsx]"]
  node_dock["Navigation dock<br/>[NavigationDock.tsx]"]
  node_particles["Particle canvas<br/>[ParticleCanvas.tsx]"]
  node_footer["Footer<br/>[Footer.tsx]"]
  node_tilt["Tilt card<br/>[TiltCard.tsx]"]
end

node_visitor(("Visitor"))

node_visitor -->|"visits"| node_home
node_visitor -->|"visits"| node_about
node_visitor -->|"visits"| node_insights
node_visitor -->|"visits"| node_services
node_visitor -->|"submits inquiry"| node_contact
node_visitor -->|"visits"| node_qa
node_home -->|"renders"| node_hero
node_home -->|"renders"| node_capabilities
node_home -->|"renders"| node_synergy
node_home -->|"renders"| node_deployment
node_home -->|"renders"| node_dock
node_home -->|"renders"| node_particles
node_hero -->|"renders"| node_livecard
node_qa -->|"renders"| node_faqcontent
node_qa -->|"renders"| node_nav
node_qa -->|"renders"| node_particles
node_qa -->|"renders"| node_footer
node_about -->|"renders"| node_nav
node_about -->|"renders"| node_particles
node_about -->|"renders"| node_footer
node_insights -->|"renders"| node_nav
node_insights -->|"renders"| node_particles
node_insights -->|"renders"| node_footer
node_contact -->|"renders"| node_nav
node_contact -->|"renders"| node_particles
node_contact -->|"renders"| node_tilt
node_contact -->|"renders"| node_footer
node_deployment -->|"renders"| node_tilt
node_deployment -->|"renders"| node_footer
node_livecard -->|"uses"| node_session
node_livecard -->|"requests token"| node_tokenroute
node_modal -->|"uses"| node_assistant
node_modal -->|"uses"| node_icons
node_modal -->|"uses"| node_session
node_assistant -->|"uses"| node_avatar
node_assistant -->|"uses"| node_icons
node_assistant -->|"uses"| node_session
node_tokenroute -.->|"forwards token request"| node_api
node_agent -.->|"references"| node_api
node_agent -.->|"uses"| node_prompts
node_api -.->|"uses"| node_db

click node_home "https://github.com/roxigroups/ria-agent/blob/main/src/app/page.tsx"
click node_about "https://github.com/roxigroups/ria-agent/blob/main/src/app/about/page.tsx"
click node_insights "https://github.com/roxigroups/ria-agent/blob/main/src/app/insights/page.tsx"
click node_services "https://github.com/roxigroups/ria-agent/blob/main/src/app/services/page.tsx"
click node_contact "https://github.com/roxigroups/ria-agent/blob/main/src/app/contact/page.tsx"
click node_qa "https://github.com/roxigroups/ria-agent/blob/main/src/app/qa/page.tsx"
click node_capabilities "https://github.com/roxigroups/ria-agent/blob/main/src/components/sections/CapabilitiesSection.tsx"
click node_hero "https://github.com/roxigroups/ria-agent/blob/main/src/components/sections/HeroSection.tsx"
click node_synergy "https://github.com/roxigroups/ria-agent/blob/main/src/components/sections/SynergySection.tsx"
click node_deployment "https://github.com/roxigroups/ria-agent/blob/main/src/components/sections/DeploymentSection.tsx"
click node_faqcontent "https://github.com/roxigroups/ria-agent/blob/main/src/components/demo/DemoFaqSection.tsx"
click node_nav "https://github.com/roxigroups/ria-agent/blob/main/src/components/HeaderNav.tsx"
click node_dock "https://github.com/roxigroups/ria-agent/blob/main/src/components/NavigationDock.tsx"
click node_particles "https://github.com/roxigroups/ria-agent/blob/main/src/components/ParticleCanvas.tsx"
click node_footer "https://github.com/roxigroups/ria-agent/blob/main/src/components/Footer.tsx"
click node_tilt "https://github.com/roxigroups/ria-agent/blob/main/src/components/TiltCard.tsx"
click node_livecard "https://github.com/roxigroups/ria-agent/blob/main/src/components/livedemo/LiveDemoCard.jsx"
click node_modal "https://github.com/roxigroups/ria-agent/blob/main/src/components/calling/LiveKitModal.jsx"
click node_assistant "https://github.com/roxigroups/ria-agent/blob/main/src/components/calling/SimpleVoiceAssistant.jsx"
click node_avatar "https://github.com/roxigroups/ria-agent/blob/main/src/components/calling/RobotAvatar.jsx"
click node_icons "https://github.com/roxigroups/ria-agent/blob/main/src/components/calling/Icons.jsx"
click node_session "https://github.com/roxigroups/ria-agent/blob/main/src/components/calling/demoSession.js"
click node_tokenroute "https://github.com/roxigroups/ria-agent/blob/main/src/app/api/getToken/route.ts"
click node_api "https://github.com/roxigroups/ria-agent/blob/main/backend/api.py"
click node_agent "https://github.com/roxigroups/ria-agent/blob/main/backend/agent.py"
click node_prompts "https://github.com/roxigroups/ria-agent/blob/main/backend/prompts.py"
click node_db "https://github.com/roxigroups/ria-agent/blob/main/backend/db_driver.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_home,node_about,node_insights,node_services,node_contact,node_qa,node_capabilities,node_hero,node_synergy,node_deployment,node_faqcontent toneBlue
class node_livecard,node_modal,node_assistant,node_avatar,node_icons,node_session,node_tokenroute toneAmber
class node_api,node_agent,node_prompts,node_db toneMint
class node_nav,node_dock,node_particles,node_footer,node_tilt toneRose
class node_visitor toneIndigo
```

## Components

### Website experience

- [Home experience](https://github.com/roxigroups/ria-agent/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [About page](https://github.com/roxigroups/ria-agent/blob/main/src/app/about/page.tsx): `src/app/about/page.tsx`
- [Insights page](https://github.com/roxigroups/ria-agent/blob/main/src/app/insights/page.tsx): `src/app/insights/page.tsx`
- [Services page](https://github.com/roxigroups/ria-agent/blob/main/src/app/services/page.tsx): `src/app/services/page.tsx`
- [Contact inquiry](https://github.com/roxigroups/ria-agent/blob/main/src/app/contact/page.tsx): `src/app/contact/page.tsx`
- [FAQ page](https://github.com/roxigroups/ria-agent/blob/main/src/app/qa/page.tsx): `src/app/qa/page.tsx`
- [Capabilities section](https://github.com/roxigroups/ria-agent/blob/main/src/components/sections/CapabilitiesSection.tsx): `src/components/sections/CapabilitiesSection.tsx`
- [Hero section](https://github.com/roxigroups/ria-agent/blob/main/src/components/sections/HeroSection.tsx): `src/components/sections/HeroSection.tsx`
- [Synergy section](https://github.com/roxigroups/ria-agent/blob/main/src/components/sections/SynergySection.tsx): `src/components/sections/SynergySection.tsx`
- [Deployment section](https://github.com/roxigroups/ria-agent/blob/main/src/components/sections/DeploymentSection.tsx): `src/components/sections/DeploymentSection.tsx`
- [FAQ content](https://github.com/roxigroups/ria-agent/blob/main/src/components/demo/DemoFaqSection.tsx): `src/components/demo/DemoFaqSection.tsx`

### Voice demo

- [Homepage demo card](https://github.com/roxigroups/ria-agent/blob/main/src/components/livedemo/LiveDemoCard.jsx): `src/components/livedemo/LiveDemoCard.jsx`
- [LiveKit modal](https://github.com/roxigroups/ria-agent/blob/main/src/components/calling/LiveKitModal.jsx): `src/components/calling/LiveKitModal.jsx`
- [Voice assistant](https://github.com/roxigroups/ria-agent/blob/main/src/components/calling/SimpleVoiceAssistant.jsx): `src/components/calling/SimpleVoiceAssistant.jsx`
- [Robot avatar](https://github.com/roxigroups/ria-agent/blob/main/src/components/calling/RobotAvatar.jsx): `src/components/calling/RobotAvatar.jsx`
- [Call icons](https://github.com/roxigroups/ria-agent/blob/main/src/components/calling/Icons.jsx): `src/components/calling/Icons.jsx`
- [Demo session logic](https://github.com/roxigroups/ria-agent/blob/main/src/components/calling/demoSession.js): `src/components/calling/demoSession.js`
- [Token route](https://github.com/roxigroups/ria-agent/blob/main/src/app/api/getToken/route.ts): `src/app/api/getToken/route.ts`

### Agent backend

- [Backend API](https://github.com/roxigroups/ria-agent/blob/main/backend/api.py): `backend/api.py`
- [RIA agent](https://github.com/roxigroups/ria-agent/blob/main/backend/agent.py): `backend/agent.py`
- [Agent prompts](https://github.com/roxigroups/ria-agent/blob/main/backend/prompts.py): `backend/prompts.py`
- [Database driver](https://github.com/roxigroups/ria-agent/blob/main/backend/db_driver.py): `backend/db_driver.py`

### Shared presentation

- [Header navigation](https://github.com/roxigroups/ria-agent/blob/main/src/components/HeaderNav.tsx): `src/components/HeaderNav.tsx`
- [Navigation dock](https://github.com/roxigroups/ria-agent/blob/main/src/components/NavigationDock.tsx): `src/components/NavigationDock.tsx`
- [Particle canvas](https://github.com/roxigroups/ria-agent/blob/main/src/components/ParticleCanvas.tsx): `src/components/ParticleCanvas.tsx`
- [Footer](https://github.com/roxigroups/ria-agent/blob/main/src/components/Footer.tsx): `src/components/Footer.tsx`
- [Tilt card](https://github.com/roxigroups/ria-agent/blob/main/src/components/TiltCard.tsx): `src/components/TiltCard.tsx`

### Other components

- **Visitor**

## Connections

- Visitor → Home experience: visits
- Visitor → About page: visits
- Visitor → Insights page: visits
- Visitor → Services page: visits
- Visitor → Contact inquiry: submits inquiry
- Visitor → FAQ page: visits
- Home experience → Hero section: renders (evidence: `src/app/page.tsx`)
- Home experience → Capabilities section: renders (evidence: `src/app/page.tsx`)
- Home experience → Synergy section: renders (evidence: `src/app/page.tsx`)
- Home experience → Deployment section: renders (evidence: `src/app/page.tsx`)
- Home experience → Navigation dock: renders (evidence: `src/app/page.tsx`)
- Home experience → Particle canvas: renders (evidence: `src/app/page.tsx`)
- Hero section → Homepage demo card: renders (evidence: `src/components/sections/HeroSection.tsx`)
- FAQ page → FAQ content: renders (evidence: `src/app/qa/page.tsx`)
- FAQ page → Header navigation: renders (evidence: `src/app/qa/page.tsx`)
- FAQ page → Particle canvas: renders (evidence: `src/app/qa/page.tsx`)
- FAQ page → Footer: renders (evidence: `src/app/qa/page.tsx`)
- About page → Header navigation: renders (evidence: `src/app/about/page.tsx`)
- About page → Particle canvas: renders (evidence: `src/app/about/page.tsx`)
- About page → Footer: renders (evidence: `src/app/about/page.tsx`)
- Insights page → Header navigation: renders (evidence: `src/app/insights/page.tsx`)
- Insights page → Particle canvas: renders (evidence: `src/app/insights/page.tsx`)
- Insights page → Footer: renders (evidence: `src/app/insights/page.tsx`)
- Contact inquiry → Header navigation: renders (evidence: `src/app/contact/page.tsx`)
- Contact inquiry → Particle canvas: renders (evidence: `src/app/contact/page.tsx`)
- Contact inquiry → Tilt card: renders (evidence: `src/app/contact/page.tsx`)
- Contact inquiry → Footer: renders (evidence: `src/app/contact/page.tsx`)
- Deployment section → Tilt card: renders (evidence: `src/components/sections/DeploymentSection.tsx`)
- Deployment section → Footer: renders (evidence: `src/components/sections/DeploymentSection.tsx`)
- Homepage demo card → Demo session logic: uses (evidence: `src/components/livedemo/LiveDemoCard.jsx`)
- Homepage demo card → Token route: requests token
- LiveKit modal → Voice assistant: uses (evidence: `src/components/calling/LiveKitModal.jsx`)
- LiveKit modal → Call icons: uses (evidence: `src/components/calling/LiveKitModal.jsx`)
- LiveKit modal → Demo session logic: uses (evidence: `src/components/calling/LiveKitModal.jsx`)
- Voice assistant → Robot avatar: uses (evidence: `src/components/calling/SimpleVoiceAssistant.jsx`)
- Voice assistant → Call icons: uses (evidence: `src/components/calling/SimpleVoiceAssistant.jsx`)
- Voice assistant → Demo session logic: uses (evidence: `src/components/calling/SimpleVoiceAssistant.jsx`)
- Token route → Backend API: forwards token request
- RIA agent → Backend API: references (evidence: `backend/agent.py`)
- RIA agent → Agent prompts: uses (evidence: `backend/agent.py`)
- Backend API → Database driver: uses (evidence: `backend/api.py`)
