# harsha-27-cyber/seri-ai architecture

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

- Interactive diagram: https://gitdiagram.com/harsha-27-cyber/seri-ai
- Repository: https://github.com/harsha-27-cyber/seri-ai

## Overview

Seri is a multilingual screen-understanding and voice assistant. Users upload a screenshot from the home or analyzer view; the frontend sends it to the backend, then presents the returned explanation and safety guidance. Voice interaction and spoken output are separate capabilities. The README describes backend AI, risk, language, and voice services, but the sampled backend excerpt is incomplete, so those internals are represented together rather than as independently verified modules. The desktop assistant is present in the tree, but its behavior is not described in the shown evidence.

Main entry points: [`frontend/src/services/api.js`](https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/services/api.js) (API and audio client), [`frontend/src/App.jsx`](https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/App.jsx) (App flow), [`frontend/src/pages/Home.jsx`](https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/pages/Home.jsx) (Screenshot upload), [`backend/main.py`](https://github.com/harsha-27-cyber/seri-ai/blob/main/backend/main.py) (Screen and voice services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_app["App flow<br/>[App.jsx]"]
  node_home["Screenshot upload<br/>[Home.jsx]"]
  node_analyzer["Screen analyzer<br/>[ScreenAnalyzer.jsx]"]
  node_scan["Scan progress<br/>[ScanAnimation.jsx]"]
  node_result["Safety results<br/>[Result.jsx]"]
  node_translations["Translations<br/>[i18n.js]"]
  node_api["API and audio client<br/>[api.js]"]
end

subgraph group_voice["Voice interaction"]
  node_overlay["Voice overlay<br/>[SeriOverlay.jsx]"]
  node_voiceassistant["Voice assistant"]
end

subgraph group_backend["Analysis backend"]
  node_backendservice["Screen and voice services<br/>[main.py]"]
  node_ai{{"Multimodal AI"}}
  node_tts["Google TTS"]
end

subgraph group_desktop["Desktop assistant"]
  node_desktopapp["Desktop assistant<br/>[seri_desktop.py]"]
end

node_user(("User"))

node_user -->|"uploads screen"| node_home
node_app -->|"renders home"| node_home
node_app -->|"renders analyzer"| node_analyzer
node_app -->|"shows progress"| node_scan
node_app -->|"shows result"| node_result
node_home -->|"submits screenshot"| node_api
node_analyzer -->|"submits screenshot"| node_api
node_api -->|"calls REST API"| node_backendservice
node_backendservice -.->|"analyzes screen"| node_ai
node_result -->|"requests audio"| node_api
node_result -->|"gets labels"| node_translations
node_home -->|"gets labels"| node_translations
node_overlay -->|"sends voice command"| node_api
node_overlay -->|"gets labels"| node_translations
node_voiceassistant -->|"sends voice command"| node_api
node_api -->|"requests TTS"| node_backendservice
node_backendservice -->|"fetches speech audio"| node_tts
node_app -->|"renders assistant"| node_overlay

click node_app "https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/App.jsx"
click node_home "https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/pages/Home.jsx"
click node_analyzer "https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/components/ScreenAnalyzer.jsx"
click node_scan "https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/components/ScanAnimation.jsx"
click node_result "https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/pages/Result.jsx"
click node_translations "https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/services/i18n.js"
click node_api "https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/services/api.js"
click node_overlay "https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/components/SeriOverlay.jsx"
click node_voiceassistant "https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/components/SeriVoiceAssistant.jsx"
click node_backendservice "https://github.com/harsha-27-cyber/seri-ai/blob/main/backend/main.py"
click node_desktopapp "https://github.com/harsha-27-cyber/seri-ai/blob/main/desktop_assistant/seri_desktop.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_home,node_analyzer,node_scan,node_result,node_translations,node_api,node_user toneBlue
class node_overlay,node_voiceassistant toneAmber
class node_backendservice,node_ai,node_tts toneMint
class node_desktopapp toneRose
```

## Components

### Web experience

- [App flow](https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Screenshot upload](https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [Screen analyzer](https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/components/ScreenAnalyzer.jsx): `frontend/src/components/ScreenAnalyzer.jsx`
- [Scan progress](https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/components/ScanAnimation.jsx): `frontend/src/components/ScanAnimation.jsx`
- [Safety results](https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/pages/Result.jsx): `frontend/src/pages/Result.jsx`
- [Translations](https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/services/i18n.js): `frontend/src/services/i18n.js`
- [API and audio client](https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### Voice interaction

- [Voice overlay](https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/components/SeriOverlay.jsx): `frontend/src/components/SeriOverlay.jsx`
- [Voice assistant](https://github.com/harsha-27-cyber/seri-ai/blob/main/frontend/src/components/SeriVoiceAssistant.jsx): `frontend/src/components/SeriVoiceAssistant.jsx`

### Analysis backend

- [Screen and voice services](https://github.com/harsha-27-cyber/seri-ai/blob/main/backend/main.py): `backend/main.py`
- **Multimodal AI**
- **Google TTS**

### Desktop assistant

- [Desktop assistant](https://github.com/harsha-27-cyber/seri-ai/blob/main/desktop_assistant/seri_desktop.py): `desktop_assistant/seri_desktop.py`

### Other components

- **User**

## Connections

- User → Screenshot upload: uploads screen (evidence: `frontend/src/pages/Home.jsx`)
- App flow → Screenshot upload: renders home (evidence: `frontend/src/App.jsx`)
- App flow → Screen analyzer: renders analyzer (evidence: `frontend/src/App.jsx`)
- App flow → Scan progress: shows progress (evidence: `frontend/src/App.jsx`)
- App flow → Safety results: shows result (evidence: `frontend/src/App.jsx`)
- Screenshot upload → API and audio client: submits screenshot (evidence: `frontend/src/pages/Home.jsx`)
- Screen analyzer → API and audio client: submits screenshot (evidence: `frontend/src/components/ScreenAnalyzer.jsx`)
- API and audio client → Screen and voice services: calls REST API (evidence: `frontend/src/services/api.js`)
- Screen and voice services → Multimodal AI: analyzes screen (evidence: `README.md`)
- Safety results → API and audio client: requests audio (evidence: `frontend/src/pages/Result.jsx`)
- Safety results → Translations: gets labels (evidence: `frontend/src/pages/Result.jsx`)
- Screenshot upload → Translations: gets labels (evidence: `frontend/src/pages/Home.jsx`)
- Voice overlay → API and audio client: sends voice command (evidence: `frontend/src/components/SeriOverlay.jsx`)
- Voice overlay → Translations: gets labels (evidence: `frontend/src/components/SeriOverlay.jsx`)
- Voice assistant → API and audio client: sends voice command (evidence: `frontend/src/components/SeriVoiceAssistant.jsx`)
- API and audio client → Screen and voice services: requests TTS (evidence: `frontend/src/services/api.js`)
- Screen and voice services → Google TTS: fetches speech audio (evidence: `backend/main.py`)
- App flow → Voice overlay: renders assistant (evidence: `frontend/src/App.jsx`)
