# meghana-vanamoju/verivoice-ai architecture

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

- Interactive diagram: https://gitdiagram.com/meghana-vanamoju/verivoice-ai
- Repository: https://github.com/meghana-vanamoju/verivoice-ai

## Overview

VeriVoice AI is a prototype for screening voice-impersonation risks. Users can submit audio for technical validation or review a communication’s context and optional transcript; results present heuristic warnings and independent-verification guidance, not proof of identity or fraud. The context path runs from the review form through the REST client and API to rules-based scoring. The audio path is represented through its documented validation and orchestration modules. The README establishes the frontend context endpoint; sampled source clarifies service calls, but unsampled integrations are not inferred.

Main entry points: [`frontend/src/pages/VoiceAnalysis.tsx`](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/frontend/src/pages/VoiceAnalysis.tsx) (Voice analysis), [`backend/app/services/analysis_service.py`](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/services/analysis_service.py) (Analysis orchestrator), [`backend/app/api/context.py`](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/api/context.py) (Context analysis endpoint), [`backend/app/main.py`](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/main.py) (Application setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["User interface"]
  node_app["App navigation<br/>[App.tsx]"]
  node_context_page["Context review<br/>[ContextReview.tsx]"]
  node_context_client["Context API client"]
  node_voice_page["Voice analysis<br/>[VoiceAnalysis.tsx]"]
  node_audio_upload["Audio upload<br/>[AudioUpload.tsx]"]
  node_results["Results dashboard"]
  node_analysis_client["Analysis API client<br/>[api.ts]"]
  node_context_types["Context types"]
  node_analysis_types["Analysis types<br/>[analysis.ts]"]
end

subgraph group_api["HTTP API"]
  node_context_endpoint["Context analysis endpoint<br/>[context.py]"]
  node_analysis_endpoint["Audio analysis endpoint<br/>[analyze.py]"]
  node_app_setup["Application setup<br/>[main.py]"]
  node_error_handlers["API error handling<br/>[errors.py]"]
end

subgraph group_services["Analysis services"]
  node_analysis_service["Analysis orchestrator"]
  node_audio_validation["Audio validation"]
  node_deepfake_detector["Deepfake detection"]
  node_context_service["Context service<br/>[context_service.py]"]
  node_risk_rules["Risk rules and scoring<br/>[risk_analysis.py]"]
end

subgraph group_contracts["API contracts"]
  node_api_schemas["Analysis response schema<br/>[schemas.py]"]
  node_context_schema["Context request schema"]
end

node_user(("Communication reviewer"))

node_user -->|"uses"| node_app
node_app -->|"shows"| node_context_page
node_app -->|"shows"| node_voice_page
node_context_page -->|"submits context"| node_context_client
node_context_page -->|"uses types"| node_context_types
node_context_client -->|"posts context"| node_context_endpoint
node_voice_page -->|"renders"| node_audio_upload
node_voice_page -->|"requests analysis"| node_analysis_client
node_voice_page -->|"renders results"| node_results
node_voice_page -->|"uses types"| node_analysis_types
node_analysis_client -->|"validates response"| node_analysis_types
node_app_setup -->|"registers route"| node_context_endpoint
node_app_setup -->|"registers route"| node_analysis_endpoint
node_app_setup -->|"registers handlers"| node_error_handlers
node_context_endpoint -->|"validates request"| node_context_schema
node_context_endpoint -->|"calls"| node_context_service
node_analysis_endpoint -->|"calls"| node_analysis_service
node_analysis_endpoint -->|"uses contract"| node_api_schemas
node_analysis_service -->|"validates audio"| node_audio_validation
node_analysis_service -->|"analyzes context"| node_context_service
node_analysis_service -->|"builds response"| node_api_schemas
node_audio_validation -.->|"optional detection"| node_deepfake_detector
node_context_service -->|"scores text"| node_risk_rules

click node_app "https://github.com/meghana-vanamoju/verivoice-ai/blob/main/frontend/src/App.tsx"
click node_context_page "https://github.com/meghana-vanamoju/verivoice-ai/blob/main/frontend/src/pages/ContextReview.tsx"
click node_context_client "https://github.com/meghana-vanamoju/verivoice-ai/blob/main/frontend/src/services/context-analysis.ts"
click node_voice_page "https://github.com/meghana-vanamoju/verivoice-ai/blob/main/frontend/src/pages/VoiceAnalysis.tsx"
click node_audio_upload "https://github.com/meghana-vanamoju/verivoice-ai/blob/main/frontend/src/components/AudioUpload.tsx"
click node_results "https://github.com/meghana-vanamoju/verivoice-ai/blob/main/frontend/src/components/ResultsDashboard.tsx"
click node_analysis_client "https://github.com/meghana-vanamoju/verivoice-ai/blob/main/frontend/src/services/api.ts"
click node_context_types "https://github.com/meghana-vanamoju/verivoice-ai/blob/main/frontend/src/types/context-analysis.ts"
click node_analysis_types "https://github.com/meghana-vanamoju/verivoice-ai/blob/main/frontend/src/types/analysis.ts"
click node_context_endpoint "https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/api/context.py"
click node_analysis_endpoint "https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/api/analyze.py"
click node_app_setup "https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/main.py"
click node_analysis_service "https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/services/analysis_service.py"
click node_audio_validation "https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/services/audio_validation.py"
click node_deepfake_detector "https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/services/deepfake_detector.py"
click node_context_service "https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/services/context_service.py"
click node_risk_rules "https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/services/risk_analysis.py"
click node_api_schemas "https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/schemas/schemas.py"
click node_context_schema "https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/schemas/context_analysis.py"
click node_error_handlers "https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/core/errors.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_context_page,node_context_client,node_voice_page,node_audio_upload,node_results,node_analysis_client,node_context_types,node_analysis_types,node_user toneBlue
class node_context_endpoint,node_analysis_endpoint,node_app_setup,node_error_handlers toneAmber
class node_analysis_service,node_audio_validation,node_deepfake_detector,node_context_service,node_risk_rules toneMint
class node_api_schemas,node_context_schema toneRose
```

## Components

### User interface

- [App navigation](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Context review](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/frontend/src/pages/ContextReview.tsx): `frontend/src/pages/ContextReview.tsx`
- [Context API client](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/frontend/src/services/context-analysis.ts): `frontend/src/services/context-analysis.ts`
- [Voice analysis](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/frontend/src/pages/VoiceAnalysis.tsx): `frontend/src/pages/VoiceAnalysis.tsx`
- [Audio upload](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/frontend/src/components/AudioUpload.tsx): `frontend/src/components/AudioUpload.tsx`
- [Results dashboard](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/frontend/src/components/ResultsDashboard.tsx): `frontend/src/components/ResultsDashboard.tsx`
- [Analysis API client](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`
- [Context types](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/frontend/src/types/context-analysis.ts): `frontend/src/types/context-analysis.ts`
- [Analysis types](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/frontend/src/types/analysis.ts): `frontend/src/types/analysis.ts`

### HTTP API

- [Context analysis endpoint](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/api/context.py): `backend/app/api/context.py`
- [Audio analysis endpoint](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/api/analyze.py): `backend/app/api/analyze.py`
- [Application setup](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/main.py): `backend/app/main.py`
- [API error handling](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/core/errors.py): `backend/app/core/errors.py`

### Analysis services

- [Analysis orchestrator](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/services/analysis_service.py): `backend/app/services/analysis_service.py`
- [Audio validation](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/services/audio_validation.py): `backend/app/services/audio_validation.py`
- [Deepfake detection](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/services/deepfake_detector.py): `backend/app/services/deepfake_detector.py`
- [Context service](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/services/context_service.py): `backend/app/services/context_service.py`
- [Risk rules and scoring](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/services/risk_analysis.py): `backend/app/services/risk_analysis.py`

### API contracts

- [Analysis response schema](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/schemas/schemas.py): `backend/app/schemas/schemas.py`
- [Context request schema](https://github.com/meghana-vanamoju/verivoice-ai/blob/main/backend/app/schemas/context_analysis.py): `backend/app/schemas/context_analysis.py`

### Other components

- **Communication reviewer**

## Connections

- Communication reviewer → App navigation: uses (evidence: `frontend/src/App.tsx`)
- App navigation → Context review: shows (evidence: `frontend/src/App.tsx`)
- App navigation → Voice analysis: shows (evidence: `frontend/src/App.tsx`)
- Context review → Context API client: submits context (evidence: `frontend/src/pages/ContextReview.tsx`)
- Context review → Context types: uses types (evidence: `frontend/src/pages/ContextReview.tsx`)
- Context API client → Context analysis endpoint: posts context (evidence: `README.md`)
- Voice analysis → Audio upload: renders (evidence: `frontend/src/pages/VoiceAnalysis.tsx`)
- Voice analysis → Analysis API client: requests analysis (evidence: `frontend/src/pages/VoiceAnalysis.tsx`)
- Voice analysis → Results dashboard: renders results (evidence: `frontend/src/pages/VoiceAnalysis.tsx`)
- Voice analysis → Analysis types: uses types (evidence: `frontend/src/pages/VoiceAnalysis.tsx`)
- Analysis API client → Analysis types: validates response (evidence: `frontend/src/services/api.ts`)
- Application setup → Context analysis endpoint: registers route (evidence: `backend/app/main.py`)
- Application setup → Audio analysis endpoint: registers route (evidence: `backend/app/main.py`)
- Application setup → API error handling: registers handlers (evidence: `backend/app/main.py`)
- Context analysis endpoint → Context request schema: validates request (evidence: `backend/app/api/context.py`)
- Context analysis endpoint → Context service: calls (evidence: `backend/app/api/context.py`)
- Audio analysis endpoint → Analysis orchestrator: calls (evidence: `backend/app/api/analyze.py`)
- Audio analysis endpoint → Analysis response schema: uses contract (evidence: `backend/app/api/analyze.py`)
- Analysis orchestrator → Audio validation: validates audio (evidence: `backend/app/services/analysis_service.py`)
- Analysis orchestrator → Context service: analyzes context (evidence: `backend/app/services/analysis_service.py`)
- Analysis orchestrator → Analysis response schema: builds response (evidence: `backend/app/services/analysis_service.py`)
- Audio validation → Deepfake detection: optional detection (evidence: `backend/app/services/audio_validation.py`)
- Context service → Risk rules and scoring: scores text (evidence: `backend/app/services/context_service.py`)
