# ali-hassan1590/whisperfy-django architecture

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

- Interactive diagram: https://gitdiagram.com/ali-hassan1590/whisperfy-django
- Repository: https://github.com/ali-hassan1590/whisperfy-django

## Overview

Whisperfy exposes two upload-driven REST workflows: convert/extract audio to a downloadable WAV, or transcribe audio/video and return text, detected language, and timestamped segments. Both validate and temporarily save uploads in their endpoint views, then invoke MoviePy-backed services; transcription additionally invokes Whisper. Root routing also exposes health checks and OpenAPI/Swagger/ReDoc documentation. The sampled source supports these call paths; no database-backed product workflow is evident in the excerpts.

Main entry points: [`whisperfy-django/core/urls.py`](https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/core/urls.py) (Root routing), [`whisperfy-django/extractor/views.py`](https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/extractor/views.py) (Extraction endpoint), [`whisperfy-django/transcription/views.py`](https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/transcription/views.py) (Transcription endpoint), [`whisperfy-django/transcription/services.py`](https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/transcription/services.py) (Audio preparation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API entry points"]
  node_routing["Root routing<br/>[urls.py]"]
  node_config["Django configuration<br/>[settings.py]"]
  node_api_docs["API documentation<br/>[urls.py]"]
end

subgraph group_extract["Audio extraction"]
  node_extract_routes["Extractor routes<br/>[urls.py]"]
  node_extract_view["Extraction endpoint<br/>[views.py]"]
  node_extract_service["Audio conversion<br/>[services.py]"]
  node_wav["WAV download"]
end

subgraph group_transcribe["Transcription"]
  node_trans_routes["Transcription routes<br/>[urls.py]"]
  node_trans_view["Transcription endpoint<br/>[views.py]"]
  node_trans_service["Audio preparation<br/>[services.py]"]
  node_result["Transcription JSON"]
end

node_client(("API client"))
node_moviepy["MoviePy / ffmpeg"]
node_whisper["OpenAI Whisper"]

node_client -->|"sends requests"| node_routing
node_routing -->|"dispatches"| node_extract_routes
node_routing -->|"dispatches"| node_trans_routes
node_routing -->|"serves docs"| node_api_docs
node_extract_routes -->|"routes to"| node_extract_view
node_extract_view -->|"reads limits"| node_config
node_extract_view -->|"calls conversion"| node_extract_service
node_extract_service -->|"converts media"| node_moviepy
node_extract_view -->|"returns file"| node_wav
node_client -->|"downloads"| node_wav
node_trans_routes -->|"routes to"| node_trans_view
node_trans_view -->|"reads limits"| node_config
node_trans_view -->|"calls processing"| node_trans_service
node_trans_service -->|"prepares audio"| node_moviepy
node_trans_service -->|"transcribes audio"| node_whisper
node_trans_view -->|"returns JSON"| node_result
node_client -->|"receives"| node_result

click node_routing "https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/core/urls.py"
click node_config "https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/core/settings.py"
click node_extract_routes "https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/extractor/urls.py"
click node_extract_view "https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/extractor/views.py"
click node_extract_service "https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/extractor/services.py"
click node_trans_routes "https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/transcription/urls.py"
click node_trans_view "https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/transcription/views.py"
click node_trans_service "https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/transcription/services.py"
click node_api_docs "https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/core/urls.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_routing,node_config,node_api_docs,node_client toneBlue
class node_extract_routes,node_extract_view,node_extract_service,node_wav toneAmber
class node_trans_routes,node_trans_view,node_trans_service,node_result toneMint
class node_moviepy,node_whisper toneIndigo
```

## Components

### API entry points

- [Root routing](https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/core/urls.py): `whisperfy-django/core/urls.py`
- [Django configuration](https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/core/settings.py): `whisperfy-django/core/settings.py`
- [API documentation](https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/core/urls.py): `whisperfy-django/core/urls.py`

### Audio extraction

- [Extractor routes](https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/extractor/urls.py): `whisperfy-django/extractor/urls.py`
- [Extraction endpoint](https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/extractor/views.py): `whisperfy-django/extractor/views.py`
- [Audio conversion](https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/extractor/services.py): `whisperfy-django/extractor/services.py`
- **WAV download**

### Transcription

- [Transcription routes](https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/transcription/urls.py): `whisperfy-django/transcription/urls.py`
- [Transcription endpoint](https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/transcription/views.py): `whisperfy-django/transcription/views.py`
- [Audio preparation](https://github.com/ali-hassan1590/whisperfy-django/blob/main/whisperfy-django/transcription/services.py): `whisperfy-django/transcription/services.py`
- **Transcription JSON**

### Other components

- **API client**
- **MoviePy / ffmpeg**
- **OpenAI Whisper**

## Connections

- API client → Root routing: sends requests
- Root routing → Extractor routes: dispatches
- Root routing → Transcription routes: dispatches
- Root routing → API documentation: serves docs
- Extractor routes → Extraction endpoint: routes to
- Extraction endpoint → Django configuration: reads limits
- Extraction endpoint → Audio conversion: calls conversion
- Audio conversion → MoviePy / ffmpeg: converts media
- Extraction endpoint → WAV download: returns file
- API client → WAV download: downloads
- Transcription routes → Transcription endpoint: routes to
- Transcription endpoint → Django configuration: reads limits
- Transcription endpoint → Audio preparation: calls processing
- Audio preparation → MoviePy / ffmpeg: prepares audio
- Audio preparation → OpenAI Whisper: transcribes audio
- Transcription endpoint → Transcription JSON: returns JSON
- API client → Transcription JSON: receives
