# solo3li/nexclone architecture

> Architecture diagram of the GitHub repository solo3li/nexclone, 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/solo3li/nexclone
- Repository: https://github.com/solo3li/nexclone

## Overview

NexClone is a subscription-based AI voice product: users register, choose a plan, generate speech or transcribe audio, and review generation history. The frontend also exposes account, pricing, blog, and support experiences; backend controllers provide administration and payment flows. The source index and excerpts show the AI-generation path and shared persistence, but the README is empty and many controllers were not sampled, so some broader product links are intentionally omitted or marked unverified.

Main entry points: [`NexClone.Backend/Models/ApplicationDbContext.cs`](https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Models/ApplicationDbContext.cs) (Application database), [`NexClone.Backend/Areas/AI/Controllers/TextToVoiceController.cs`](https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Areas/AI/Controllers/TextToVoiceController.cs) (Speech generation endpoint), [`frontend/src/utils/api.ts`](https://github.com/solo3li/nexclone/blob/master/frontend/src/utils/api.ts) (API client), [`frontend/app/[locale]`](https://github.com/solo3li/nexclone/tree/master/frontend/app/%5Blocale%5D) (Localized web app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["User experience"]
  node_webapp["Localized web app"]
  node_ttsui["Text-to-voice UI<br/>[page.tsx]"]
  node_sttui["Voice-to-text UI<br/>[page.tsx]"]
  node_historyui["Generation history UI<br/>[page.tsx]"]
  node_profileui["Profile UI<br/>[page.tsx]"]
  node_nav["Navigation and locale<br/>[Navbar.tsx]"]
  node_apiutil["API client<br/>[api.ts]"]
end

subgraph group_identity["Identity and accounts"]
  node_auth["Authentication<br/>[AuthController.cs]"]
  node_users["User accounts<br/>[ApplicationUser.cs]"]
end

subgraph group_ai["AI generation"]
  node_ttscontroller["Speech generation endpoint"]
  node_sttcontroller["Transcription endpoint"]
  node_ttsservice["Speech provider routing<br/>[TtsService.cs]"]
  node_sttservice["Transcription service<br/>[SttService.cs]"]
  node_usage["Usage policy"]
  node_toolconfig["Tool and routing configuration"]
end

subgraph group_commerce["Plans and payments"]
  node_plans["Plans and entitlements<br/>[Plan.cs]"]
  node_subscription["Subscriptions<br/>[Subscription.cs]"]
  node_payments["Payment processing"]
end

subgraph group_platform["Platform services"]
  node_media["Media storage<br/>[S3MediaService.cs]"]
  node_history["Generation records"]
  node_db[("Application database")]
end

node_user(("User"))

node_user -->|"uses"| node_webapp
node_webapp -->|"opens"| node_ttsui
node_webapp -->|"opens"| node_sttui
node_webapp -->|"opens"| node_historyui
node_ttsui -->|"calls"| node_apiutil
node_sttui -->|"calls"| node_apiutil
node_historyui -->|"calls"| node_apiutil
node_profileui -->|"calls"| node_apiutil
node_webapp -.->|"renders"| node_nav
node_user -->|"registers"| node_auth
node_auth -->|"creates"| node_users
node_ttscontroller -->|"validates and charges"| node_usage
node_ttscontroller -->|"generates audio"| node_ttsservice
node_ttscontroller -->|"uploads audio"| node_media
node_ttscontroller -->|"records result"| node_history
node_sttcontroller -->|"transcribes audio"| node_sttservice
node_ttsservice -->|"loads routing rules"| node_toolconfig
node_ttscontroller -->|"reads subscription"| node_db
node_ttscontroller -->|"writes history"| node_db
node_sttcontroller -->|"reads and writes"| node_db
node_db -->|"persists"| node_plans
node_db -->|"persists"| node_subscription
node_db -->|"persists"| node_toolconfig
node_db -->|"stores identities"| node_users
node_payments -->|"reads and writes"| node_db
node_apiutil -.->|"HTTP requests"| node_ttscontroller
node_apiutil -.->|"HTTP requests"| node_sttcontroller

click node_webapp "https://github.com/solo3li/nexclone/tree/master/frontend/app/%5Blocale%5D"
click node_ttsui "https://github.com/solo3li/nexclone/blob/master/frontend/app/%5Blocale%5D/tools/text-to-voice/page.tsx"
click node_sttui "https://github.com/solo3li/nexclone/blob/master/frontend/app/%5Blocale%5D/tools/voice-to-text/page.tsx"
click node_historyui "https://github.com/solo3li/nexclone/blob/master/frontend/app/%5Blocale%5D/history/page.tsx"
click node_profileui "https://github.com/solo3li/nexclone/blob/master/frontend/app/%5Blocale%5D/profile/page.tsx"
click node_nav "https://github.com/solo3li/nexclone/blob/master/frontend/src/components/Navbar.tsx"
click node_apiutil "https://github.com/solo3li/nexclone/blob/master/frontend/src/utils/api.ts"
click node_auth "https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Controllers/AuthController.cs"
click node_users "https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Models/ApplicationUser.cs"
click node_ttscontroller "https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Areas/AI/Controllers/TextToVoiceController.cs"
click node_sttcontroller "https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Areas/AI/Controllers/VoiceToTextController.cs"
click node_ttsservice "https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Services/AI/TtsService.cs"
click node_sttservice "https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Services/AI/SttService.cs"
click node_usage "https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Services/UsagePolicyService.cs"
click node_media "https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Services/S3MediaService.cs"
click node_history "https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Models/GenerationHistory.cs"
click node_plans "https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Models/Plan.cs"
click node_subscription "https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Models/Subscription.cs"
click node_payments "https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Services/Payments/PaymobPaymentService.cs"
click node_db "https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Models/ApplicationDbContext.cs"
click node_toolconfig "https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Models/ToolConfiguration.cs"

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_webapp,node_ttsui,node_sttui,node_historyui,node_profileui,node_nav,node_apiutil,node_user toneBlue
class node_auth,node_users toneAmber
class node_ttscontroller,node_sttcontroller,node_ttsservice,node_sttservice,node_usage,node_toolconfig toneMint
class node_plans,node_subscription,node_payments toneRose
class node_media,node_history,node_db toneIndigo
```

## Components

### User experience

- [Localized web app](https://github.com/solo3li/nexclone/tree/master/frontend/app/%5Blocale%5D): `frontend/app/[locale]`
- [Text-to-voice UI](https://github.com/solo3li/nexclone/blob/master/frontend/app/%5Blocale%5D/tools/text-to-voice/page.tsx): `frontend/app/[locale]/tools/text-to-voice/page.tsx`
- [Voice-to-text UI](https://github.com/solo3li/nexclone/blob/master/frontend/app/%5Blocale%5D/tools/voice-to-text/page.tsx): `frontend/app/[locale]/tools/voice-to-text/page.tsx`
- [Generation history UI](https://github.com/solo3li/nexclone/blob/master/frontend/app/%5Blocale%5D/history/page.tsx): `frontend/app/[locale]/history/page.tsx`
- [Profile UI](https://github.com/solo3li/nexclone/blob/master/frontend/app/%5Blocale%5D/profile/page.tsx): `frontend/app/[locale]/profile/page.tsx`
- [Navigation and locale](https://github.com/solo3li/nexclone/blob/master/frontend/src/components/Navbar.tsx): `frontend/src/components/Navbar.tsx`
- [API client](https://github.com/solo3li/nexclone/blob/master/frontend/src/utils/api.ts): `frontend/src/utils/api.ts`

### Identity and accounts

- [Authentication](https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Controllers/AuthController.cs): `NexClone.Backend/Controllers/AuthController.cs`
- [User accounts](https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Models/ApplicationUser.cs): `NexClone.Backend/Models/ApplicationUser.cs`

### AI generation

- [Speech generation endpoint](https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Areas/AI/Controllers/TextToVoiceController.cs): `NexClone.Backend/Areas/AI/Controllers/TextToVoiceController.cs`
- [Transcription endpoint](https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Areas/AI/Controllers/VoiceToTextController.cs): `NexClone.Backend/Areas/AI/Controllers/VoiceToTextController.cs`
- [Speech provider routing](https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Services/AI/TtsService.cs): `NexClone.Backend/Services/AI/TtsService.cs`
- [Transcription service](https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Services/AI/SttService.cs): `NexClone.Backend/Services/AI/SttService.cs`
- [Usage policy](https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Services/UsagePolicyService.cs): `NexClone.Backend/Services/UsagePolicyService.cs`
- [Tool and routing configuration](https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Models/ToolConfiguration.cs): `NexClone.Backend/Models/ToolConfiguration.cs`

### Plans and payments

- [Plans and entitlements](https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Models/Plan.cs): `NexClone.Backend/Models/Plan.cs`
- [Subscriptions](https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Models/Subscription.cs): `NexClone.Backend/Models/Subscription.cs`
- [Payment processing](https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Services/Payments/PaymobPaymentService.cs): `NexClone.Backend/Services/Payments/PaymobPaymentService.cs`

### Platform services

- [Media storage](https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Services/S3MediaService.cs): `NexClone.Backend/Services/S3MediaService.cs`
- [Generation records](https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Models/GenerationHistory.cs): `NexClone.Backend/Models/GenerationHistory.cs`
- [Application database](https://github.com/solo3li/nexclone/blob/master/NexClone.Backend/Models/ApplicationDbContext.cs): `NexClone.Backend/Models/ApplicationDbContext.cs`

### Other components

- **User**

## Connections

- User → Localized web app: uses
- Localized web app → Text-to-voice UI: opens
- Localized web app → Voice-to-text UI: opens
- Localized web app → Generation history UI: opens
- Text-to-voice UI → API client: calls (evidence: `frontend/app/[locale]/tools/text-to-voice/page.tsx`)
- Voice-to-text UI → API client: calls (evidence: `frontend/app/[locale]/tools/voice-to-text/page.tsx`)
- Generation history UI → API client: calls (evidence: `frontend/app/[locale]/history/page.tsx`)
- Profile UI → API client: calls (evidence: `frontend/app/[locale]/profile/page.tsx`)
- Localized web app → Navigation and locale: renders (evidence: `frontend/app/[locale]/profile/page.tsx`)
- User → Authentication: registers (evidence: `NexClone.Backend/Controllers/AuthController.cs`)
- Authentication → User accounts: creates (evidence: `NexClone.Backend/Controllers/AuthController.cs`)
- Speech generation endpoint → Usage policy: validates and charges (evidence: `NexClone.Backend/Areas/AI/Controllers/TextToVoiceController.cs`)
- Speech generation endpoint → Speech provider routing: generates audio (evidence: `NexClone.Backend/Areas/AI/Controllers/TextToVoiceController.cs`)
- Speech generation endpoint → Media storage: uploads audio (evidence: `NexClone.Backend/Areas/AI/Controllers/TextToVoiceController.cs`)
- Speech generation endpoint → Generation records: records result (evidence: `NexClone.Backend/Areas/AI/Controllers/TextToVoiceController.cs`)
- Transcription endpoint → Transcription service: transcribes audio (evidence: `NexClone.Backend/Areas/AI/Controllers/VoiceToTextController.cs`)
- Speech provider routing → Tool and routing configuration: loads routing rules (evidence: `NexClone.Backend/Services/AI/TtsService.cs`)
- Speech generation endpoint → Application database: reads subscription (evidence: `NexClone.Backend/Areas/AI/Controllers/TextToVoiceController.cs`)
- Speech generation endpoint → Application database: writes history (evidence: `NexClone.Backend/Areas/AI/Controllers/TextToVoiceController.cs`)
- Transcription endpoint → Application database: reads and writes (evidence: `NexClone.Backend/Areas/AI/Controllers/VoiceToTextController.cs`)
- Application database → Plans and entitlements: persists (evidence: `NexClone.Backend/Models/ApplicationDbContext.cs`)
- Application database → Subscriptions: persists (evidence: `NexClone.Backend/Models/ApplicationDbContext.cs`)
- Application database → Tool and routing configuration: persists (evidence: `NexClone.Backend/Models/ApplicationDbContext.cs`)
- Application database → User accounts: stores identities (evidence: `NexClone.Backend/Models/ApplicationDbContext.cs`)
- Payment processing → Application database: reads and writes (evidence: `NexClone.Backend/Services/Payments/PaymobPaymentService.cs`)
- API client → Speech generation endpoint: HTTP requests
- API client → Transcription endpoint: HTTP requests
