# kris-h2k7/aria-assistant architecture

> Architecture diagram of the GitHub repository kris-h2k7/aria-assistant, 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/kris-h2k7/aria-assistant
- Repository: https://github.com/kris-h2k7/aria-assistant

## Overview

A.R.I.A. is a voice-operated dashboard for reading and sending email, WhatsApp, and Telegram messages. Users interact through the Gradio frontend, which sends voice text and manual actions to the FastAPI backend. The backend parses commands, routes reads and sends to service adapters, and gates sends on PIN confirmation; email reads additionally use AI summarization. The dashboard also displays activity and usage statistics. Source excerpts show the primary routing and frontend requests; unsampled backend routes and configuration were not inspected, so those relationships are omitted.

Main entry points: [`backend/main.py`](https://github.com/kris-h2k7/aria-assistant/blob/main/backend/main.py) (FastAPI Command API), [`frontend/app.py`](https://github.com/kris-h2k7/aria-assistant/blob/main/frontend/app.py) (Gradio Dashboard), [`backend/email_service.py`](https://github.com/kris-h2k7/aria-assistant/blob/main/backend/email_service.py) (Email Service), [`backend/whatsapp_service.py`](https://github.com/kris-h2k7/aria-assistant/blob/main/backend/whatsapp_service.py) (WhatsApp Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["User Interface"]
  node_dashboard["Gradio Dashboard<br/>[app.py]"]
end

subgraph group_backend["Command Backend"]
  node_api["FastAPI Command API<br/>[main.py]"]
  node_activity["Activity And Stats<br/>[main.py]"]
end

subgraph group_services["Messaging Services"]
  node_email["Email Service<br/>[email_service.py]"]
  node_whatsapp["WhatsApp Service"]
  node_telegram["Telegram Service"]
end

subgraph group_ai["AI And Voice"]
  node_summarizer["Email Summarizer<br/>[ai_service.py]"]
  node_voice["Audio Transcription<br/>[voice_service.py]"]
end

node_user(("User"))
node_groq{{"Groq LLaMA"}}
node_gmail{{"Gmail API"}}
node_whapi{{"Whapi.Cloud"}}
node_telegramapi{{"Telegram Bot API"}}
node_google_stt{{"Google Speech Recognition"}}

node_user -->|"uses"| node_dashboard
node_dashboard -->|"sends requests"| node_api
node_api -->|"records events"| node_activity
node_dashboard -->|"fetches stats"| node_activity
node_api -->|"routes email"| node_email
node_api -->|"routes WhatsApp"| node_whatsapp
node_api -->|"routes Telegram"| node_telegram
node_email -->|"summarizes email"| node_summarizer
node_api -->|"transcribes audio"| node_voice
node_api -->|"parses commands"| node_groq
node_summarizer -->|"summarizes text"| node_groq
node_email -->|"reads and sends"| node_gmail
node_whatsapp -->|"reads and sends"| node_whapi
node_telegram -->|"reads and sends"| node_telegramapi
node_voice -->|"recognizes speech"| node_google_stt

click node_dashboard "https://github.com/kris-h2k7/aria-assistant/blob/main/frontend/app.py"
click node_api "https://github.com/kris-h2k7/aria-assistant/blob/main/backend/main.py"
click node_activity "https://github.com/kris-h2k7/aria-assistant/blob/main/backend/main.py"
click node_email "https://github.com/kris-h2k7/aria-assistant/blob/main/backend/email_service.py"
click node_whatsapp "https://github.com/kris-h2k7/aria-assistant/blob/main/backend/whatsapp_service.py"
click node_telegram "https://github.com/kris-h2k7/aria-assistant/blob/main/backend/telegram_service.py"
click node_summarizer "https://github.com/kris-h2k7/aria-assistant/blob/main/backend/ai_service.py"
click node_voice "https://github.com/kris-h2k7/aria-assistant/blob/main/backend/voice_service.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_dashboard,node_user toneBlue
class node_api,node_activity toneAmber
class node_email,node_whatsapp,node_telegram,node_gmail,node_whapi,node_telegramapi toneMint
class node_summarizer,node_voice toneRose
class node_groq,node_google_stt toneIndigo
```

## Components

### User Interface

- [Gradio Dashboard](https://github.com/kris-h2k7/aria-assistant/blob/main/frontend/app.py): `frontend/app.py`

### Command Backend

- [FastAPI Command API](https://github.com/kris-h2k7/aria-assistant/blob/main/backend/main.py): `backend/main.py`
- [Activity And Stats](https://github.com/kris-h2k7/aria-assistant/blob/main/backend/main.py): `backend/main.py`

### Messaging Services

- [Email Service](https://github.com/kris-h2k7/aria-assistant/blob/main/backend/email_service.py): `backend/email_service.py`
- [WhatsApp Service](https://github.com/kris-h2k7/aria-assistant/blob/main/backend/whatsapp_service.py): `backend/whatsapp_service.py`
- [Telegram Service](https://github.com/kris-h2k7/aria-assistant/blob/main/backend/telegram_service.py): `backend/telegram_service.py`

### AI And Voice

- [Email Summarizer](https://github.com/kris-h2k7/aria-assistant/blob/main/backend/ai_service.py): `backend/ai_service.py`
- [Audio Transcription](https://github.com/kris-h2k7/aria-assistant/blob/main/backend/voice_service.py): `backend/voice_service.py`

### Other components

- **User**
- **Groq LLaMA**
- **Gmail API**
- **Whapi.Cloud**
- **Telegram Bot API**
- **Google Speech Recognition**

## Connections

- User → Gradio Dashboard: uses (evidence: `README.md`)
- Gradio Dashboard → FastAPI Command API: sends requests (evidence: `frontend/app.py`)
- FastAPI Command API → Activity And Stats: records events (evidence: `backend/main.py`)
- Gradio Dashboard → Activity And Stats: fetches stats (evidence: `frontend/app.py`)
- FastAPI Command API → Email Service: routes email (evidence: `backend/main.py`)
- FastAPI Command API → WhatsApp Service: routes WhatsApp (evidence: `backend/main.py`)
- FastAPI Command API → Telegram Service: routes Telegram (evidence: `backend/main.py`)
- Email Service → Email Summarizer: summarizes email (evidence: `backend/email_service.py`)
- FastAPI Command API → Audio Transcription: transcribes audio (evidence: `backend/main.py`)
- FastAPI Command API → Groq LLaMA: parses commands (evidence: `backend/main.py`)
- Email Summarizer → Groq LLaMA: summarizes text (evidence: `backend/ai_service.py`)
- Email Service → Gmail API: reads and sends (evidence: `backend/email_service.py`)
- WhatsApp Service → Whapi.Cloud: reads and sends (evidence: `backend/whatsapp_service.py`)
- Telegram Service → Telegram Bot API: reads and sends (evidence: `backend/telegram_service.py`)
- Audio Transcription → Google Speech Recognition: recognizes speech (evidence: `backend/voice_service.py`)
