# reinesana/doomscroll-skyrim-edition architecture

> Architecture diagram of the GitHub repository reinesana/doomscroll-skyrim-edition, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/reinesana/doomscroll-skyrim-edition
- Repository: https://github.com/reinesana/doomscroll-skyrim-edition

## Overview

Doomscroll Skyrim Edition is a single-script webcam productivity tool: it detects sustained downward gaze and interrupts it by playing a Skyrim Skeleton video, then closes the video when gaze recovers or the face is lost. The graph separates camera/face tracking, gaze-state timing, and warning/display behavior from QuickTime control. Relationships are supported by the `main.py` excerpt and README; no other runtime modules are present.

Main entry points: [`main.py`](https://github.com/reinesana/doomscroll-skyrim-edition/blob/main/main.py) (Application loop), [`assets/skyrim-skeleton.mp4`](https://github.com/reinesana/doomscroll-skyrim-edition/blob/main/assets/skyrim-skeleton.mp4) (Skeleton video)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sensing["Camera and vision"]
  node_main["Application loop<br/>[main.py]"]
  node_face_mesh["Face mesh<br/>[main.py]"]
end

subgraph group_detection["Gaze detection"]
  node_gaze["Iris gaze check<br/>[main.py]"]
  node_timer["Threshold timer<br/>[main.py]"]
end

subgraph group_response["Interruption and display"]
  node_overlay["Warning overlay<br/>[main.py]"]
  node_video["Skeleton video"]
  node_display["OpenCV preview<br/>[main.py]"]
end

node_user(("Laptop user"))
node_webcam["Webcam"]
node_quicktime["QuickTime Player"]

node_user -->|"faces"| node_webcam
node_webcam -->|"supplies frames"| node_main
node_main -->|"processes frames"| node_face_mesh
node_face_mesh -->|"provides landmarks"| node_gaze
node_gaze -->|"checks duration"| node_timer
node_timer -->|"triggers playback"| node_main
node_main -->|"controls playback"| node_quicktime
node_main -->|"opens asset"| node_video
node_main -->|"draws warning"| node_overlay
node_main -->|"shows frames"| node_display
node_quicktime -->|"plays and closes"| node_video

click node_main "https://github.com/reinesana/doomscroll-skyrim-edition/blob/main/main.py"
click node_face_mesh "https://github.com/reinesana/doomscroll-skyrim-edition/blob/main/main.py"
click node_gaze "https://github.com/reinesana/doomscroll-skyrim-edition/blob/main/main.py"
click node_timer "https://github.com/reinesana/doomscroll-skyrim-edition/blob/main/main.py"
click node_overlay "https://github.com/reinesana/doomscroll-skyrim-edition/blob/main/main.py"
click node_video "https://github.com/reinesana/doomscroll-skyrim-edition/blob/main/assets/skyrim-skeleton.mp4"
click node_display "https://github.com/reinesana/doomscroll-skyrim-edition/blob/main/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_main,node_face_mesh,node_user toneBlue
class node_gaze,node_timer toneAmber
class node_overlay,node_video,node_display toneMint
class node_webcam,node_quicktime toneIndigo
```

## Components

### Camera and vision

- [Application loop](https://github.com/reinesana/doomscroll-skyrim-edition/blob/main/main.py): `main.py`
- [Face mesh](https://github.com/reinesana/doomscroll-skyrim-edition/blob/main/main.py): `main.py`

### Gaze detection

- [Iris gaze check](https://github.com/reinesana/doomscroll-skyrim-edition/blob/main/main.py): `main.py`
- [Threshold timer](https://github.com/reinesana/doomscroll-skyrim-edition/blob/main/main.py): `main.py`

### Interruption and display

- [Warning overlay](https://github.com/reinesana/doomscroll-skyrim-edition/blob/main/main.py): `main.py`
- [Skeleton video](https://github.com/reinesana/doomscroll-skyrim-edition/blob/main/assets/skyrim-skeleton.mp4): `assets/skyrim-skeleton.mp4`
- [OpenCV preview](https://github.com/reinesana/doomscroll-skyrim-edition/blob/main/main.py): `main.py`

### Other components

- **Laptop user**
- **Webcam**
- **QuickTime Player**

## Connections

- Laptop user → Webcam: faces (evidence: `README.md`)
- Webcam → Application loop: supplies frames (evidence: `main.py`)
- Application loop → Face mesh: processes frames (evidence: `main.py`)
- Face mesh → Iris gaze check: provides landmarks (evidence: `main.py`)
- Iris gaze check → Threshold timer: checks duration (evidence: `main.py`)
- Threshold timer → Application loop: triggers playback (evidence: `main.py`)
- Application loop → QuickTime Player: controls playback (evidence: `main.py`)
- Application loop → Skeleton video: opens asset (evidence: `main.py`)
- Application loop → Warning overlay: draws warning (evidence: `main.py`)
- Application loop → OpenCV preview: shows frames (evidence: `main.py`)
- QuickTime Player → Skeleton video: plays and closes
