# vizzaq23/cod-pov-coach architecture

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

- Interactive diagram: https://gitdiagram.com/vizzaq23/cod-pov-coach
- Repository: https://github.com/vizzaq23/cod-pov-coach

## Overview

CoD POV Coach is an early video-ingestion prototype: a user selects a local gameplay MP4, the web form posts it to FastAPI, which saves it locally and uses FFprobe to extract duration, resolution, and frame rate for display. The API also exposes a health check. The README documents this scope; gameplay coaching and automated analysis are not implemented. The request path is evidenced by the page and API excerpts, while FFprobe invocation and local storage are visible in the API source.

Main entry points: [`api/main.py`](https://github.com/vizzaq23/cod-pov-coach/blob/main/api/main.py) (Upload endpoint), [`web/src/app/page.tsx`](https://github.com/vizzaq23/cod-pov-coach/blob/main/web/src/app/page.tsx) (Upload form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_upload_form["Upload form<br/>[page.tsx]"]
  node_metadata_view["Metadata display<br/>[page.tsx]"]
end

subgraph group_api["Ingestion API"]
  node_upload_endpoint["Upload endpoint<br/>[main.py]"]
  node_health_endpoint["Health check<br/>[main.py]"]
  node_upload_storage[("Local upload storage<br/>[main.py]")]
end

subgraph group_processing["Video processing"]
  node_metadata_probe["Metadata extraction<br/>[main.py]"]
end

node_user(("Clip uploader"))
node_ffprobe["FFprobe"]

node_user -->|"selects clip"| node_upload_form
node_upload_form -->|"POSTs upload"| node_upload_endpoint
node_upload_endpoint -->|"writes video"| node_upload_storage
node_upload_endpoint -->|"probes saved file"| node_metadata_probe
node_metadata_probe -->|"runs probe"| node_ffprobe
node_upload_endpoint -->|"returns metadata"| node_metadata_view

click node_upload_form "https://github.com/vizzaq23/cod-pov-coach/blob/main/web/src/app/page.tsx"
click node_metadata_view "https://github.com/vizzaq23/cod-pov-coach/blob/main/web/src/app/page.tsx"
click node_upload_endpoint "https://github.com/vizzaq23/cod-pov-coach/blob/main/api/main.py"
click node_health_endpoint "https://github.com/vizzaq23/cod-pov-coach/blob/main/api/main.py"
click node_upload_storage "https://github.com/vizzaq23/cod-pov-coach/blob/main/api/main.py"
click node_metadata_probe "https://github.com/vizzaq23/cod-pov-coach/blob/main/api/main.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_upload_form,node_metadata_view toneBlue
class node_upload_endpoint,node_health_endpoint,node_upload_storage toneAmber
class node_metadata_probe toneMint
class node_user,node_ffprobe toneIndigo
```

## Components

### Web interface

- [Upload form](https://github.com/vizzaq23/cod-pov-coach/blob/main/web/src/app/page.tsx): `web/src/app/page.tsx`
- [Metadata display](https://github.com/vizzaq23/cod-pov-coach/blob/main/web/src/app/page.tsx): `web/src/app/page.tsx`

### Ingestion API

- [Upload endpoint](https://github.com/vizzaq23/cod-pov-coach/blob/main/api/main.py): `api/main.py`
- [Health check](https://github.com/vizzaq23/cod-pov-coach/blob/main/api/main.py): `api/main.py`
- [Local upload storage](https://github.com/vizzaq23/cod-pov-coach/blob/main/api/main.py): `api/main.py`

### Video processing

- [Metadata extraction](https://github.com/vizzaq23/cod-pov-coach/blob/main/api/main.py): `api/main.py`

### Other components

- **Clip uploader**
- **FFprobe**

## Connections

- Clip uploader → Upload form: selects clip (evidence: `web/src/app/page.tsx`)
- Upload form → Upload endpoint: POSTs upload (evidence: `web/src/app/page.tsx`)
- Upload endpoint → Local upload storage: writes video (evidence: `api/main.py`)
- Upload endpoint → Metadata extraction: probes saved file (evidence: `api/main.py`)
- Metadata extraction → FFprobe: runs probe (evidence: `api/main.py`)
- Upload endpoint → Metadata display: returns metadata (evidence: `web/src/app/page.tsx`)
