# yateeka/qoe architecture

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

- Interactive diagram: https://gitdiagram.com/yateeka/qoe
- Repository: https://github.com/yateeka/qoe

## Overview

This repository is a research workflow and static dashboard for studying whether public YouTube behavior helps predict segment-level QoE sensitivity. Its implemented path collects replay/comment signals, preprocesses them into 100-bin video records, derives behavioral features and candidate segments, and prepares or fits a computational-proxy model. The dashboard reads processed data and experiment outputs for exploration. Human-rating calibration and held-out evaluation are planned, not implemented in the sampled code; unsampled frontend and collection details limit some relationship claims.

Main entry points: [`frontend/public/app.js`](https://github.com/yateeka/qoe/blob/main/frontend/public/app.js) (Research dashboard), [`data/processed/phase3`](https://github.com/yateeka/qoe/tree/main/data/processed/phase3) (Phase 3 dataset), [`backend/src/index.ts`](https://github.com/yateeka/qoe/blob/main/backend/src/index.ts) (Video collector), [`data/experiments/phase4`](https://github.com/yateeka/qoe/tree/main/data/experiments/phase4) (Features and measurements)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Public Data Collection"]
  node_collector["Video collector<br/>[index.ts]"]
  node_raw_data["Phase 2 records"]
end

subgraph group_processing["Signal Processing"]
  node_preprocessor["Comment cleanup and binning<br/>[phase3.ts]"]
  node_processed_data[("Phase 3 dataset")]
  node_label_validation["Label validation<br/>[validate-labels.ts]"]
end

subgraph group_experiments["Experiment Modeling"]
  node_feature_prep["Feature and candidate preparation<br/>[phase4.ts]"]
  node_experiment_data[("Features and measurements")]
  node_model_fit["Ridge model fitting<br/>[phase4.ts]"]
  node_model_outputs["Model and predictions"]
end

subgraph group_dashboard["Research Dashboard"]
  node_dashboard["Research dashboard<br/>[app.js]"]
  node_dashboard_html["Dashboard page<br/>[index.html]"]
end

node_researcher(("Researcher"))
node_youtube{{"YouTube Data API"}}
node_replay_service{{"Most Replayed service"}}
node_human_study(("Human QoE study"))

node_researcher -->|"runs collection"| node_collector
node_collector -->|"requests metadata/comments"| node_youtube
node_collector -->|"fetches replay markers"| node_replay_service
node_collector -->|"writes raw records"| node_raw_data
node_raw_data -->|"reads Phase 2 records"| node_preprocessor
node_preprocessor -->|"writes cleaned bins"| node_processed_data
node_preprocessor -->|"writes annotation template"| node_processed_data
node_researcher -->|"submits annotations"| node_label_validation
node_label_validation -->|"reads annotation template"| node_processed_data
node_processed_data -->|"reads processed bins"| node_feature_prep
node_feature_prep -->|"writes features and candidates"| node_experiment_data
node_researcher -->|"runs training"| node_model_fit
node_experiment_data -->|"reads measured rows"| node_model_fit
node_model_fit -->|"writes model predictions"| node_model_outputs
node_researcher -->|"explores research results"| node_dashboard
node_dashboard_html -.->|"loads dashboard script"| node_dashboard
node_dashboard -->|"loads dataset"| node_processed_data
node_dashboard -->|"loads experiment files"| node_experiment_data
node_dashboard -->|"loads predictions"| node_model_outputs
node_human_study -.->|"planned ratings"| node_experiment_data

click node_collector "https://github.com/yateeka/qoe/blob/main/backend/src/index.ts"
click node_preprocessor "https://github.com/yateeka/qoe/blob/main/backend/src/phase3.ts"
click node_processed_data "https://github.com/yateeka/qoe/tree/main/data/processed/phase3"
click node_label_validation "https://github.com/yateeka/qoe/blob/main/backend/src/validate-labels.ts"
click node_feature_prep "https://github.com/yateeka/qoe/blob/main/backend/src/phase4.ts"
click node_experiment_data "https://github.com/yateeka/qoe/tree/main/data/experiments/phase4"
click node_model_fit "https://github.com/yateeka/qoe/blob/main/backend/src/phase4.ts"
click node_model_outputs "https://github.com/yateeka/qoe/tree/main/data/experiments/phase4"
click node_dashboard "https://github.com/yateeka/qoe/blob/main/frontend/public/app.js"
click node_dashboard_html "https://github.com/yateeka/qoe/blob/main/frontend/public/index.html"

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_collector,node_raw_data toneBlue
class node_preprocessor,node_processed_data,node_label_validation toneAmber
class node_feature_prep,node_experiment_data,node_model_fit,node_model_outputs,node_youtube toneMint
class node_dashboard,node_dashboard_html toneRose
class node_researcher,node_replay_service,node_human_study toneIndigo
```

## Components

### Public Data Collection

- [Video collector](https://github.com/yateeka/qoe/blob/main/backend/src/index.ts): `backend/src/index.ts`
- **Phase 2 records**

### Signal Processing

- [Comment cleanup and binning](https://github.com/yateeka/qoe/blob/main/backend/src/phase3.ts): `backend/src/phase3.ts`
- [Phase 3 dataset](https://github.com/yateeka/qoe/tree/main/data/processed/phase3): `data/processed/phase3`
- [Label validation](https://github.com/yateeka/qoe/blob/main/backend/src/validate-labels.ts): `backend/src/validate-labels.ts`

### Experiment Modeling

- [Feature and candidate preparation](https://github.com/yateeka/qoe/blob/main/backend/src/phase4.ts): `backend/src/phase4.ts`
- [Features and measurements](https://github.com/yateeka/qoe/tree/main/data/experiments/phase4): `data/experiments/phase4`
- [Ridge model fitting](https://github.com/yateeka/qoe/blob/main/backend/src/phase4.ts): `backend/src/phase4.ts`
- [Model and predictions](https://github.com/yateeka/qoe/tree/main/data/experiments/phase4): `data/experiments/phase4`

### Research Dashboard

- [Research dashboard](https://github.com/yateeka/qoe/blob/main/frontend/public/app.js): `frontend/public/app.js`
- [Dashboard page](https://github.com/yateeka/qoe/blob/main/frontend/public/index.html): `frontend/public/index.html`

### Other components

- **Researcher**
- **YouTube Data API**
- **Most Replayed service**
- **Human QoE study**

## Connections

- Researcher → Video collector: runs collection (evidence: `README.md`)
- Video collector → YouTube Data API: requests metadata/comments (evidence: `backend/src/index.ts`)
- Video collector → Most Replayed service: fetches replay markers (evidence: `backend/src/index.ts`)
- Video collector → Phase 2 records: writes raw records (evidence: `backend/src/index.ts`)
- Phase 2 records → Comment cleanup and binning: reads Phase 2 records (evidence: `README.md`)
- Comment cleanup and binning → Phase 3 dataset: writes cleaned bins (evidence: `backend/src/phase3.ts`)
- Comment cleanup and binning → Phase 3 dataset: writes annotation template (evidence: `backend/src/phase3.ts`)
- Researcher → Label validation: submits annotations (evidence: `backend/src/validate-labels.ts`)
- Label validation → Phase 3 dataset: reads annotation template (evidence: `backend/src/validate-labels.ts`)
- Phase 3 dataset → Feature and candidate preparation: reads processed bins (evidence: `backend/src/phase4.ts`)
- Feature and candidate preparation → Features and measurements: writes features and candidates (evidence: `backend/src/phase4.ts`)
- Researcher → Ridge model fitting: runs training (evidence: `README.md`)
- Features and measurements → Ridge model fitting: reads measured rows (evidence: `backend/src/phase4.ts`)
- Ridge model fitting → Model and predictions: writes model predictions (evidence: `backend/src/phase4.ts`)
- Researcher → Research dashboard: explores research results (evidence: `README.md`)
- Dashboard page → Research dashboard: loads dashboard script
- Research dashboard → Phase 3 dataset: loads dataset (evidence: `frontend/public/app.js`)
- Research dashboard → Features and measurements: loads experiment files (evidence: `frontend/public/app.js`)
- Research dashboard → Model and predictions: loads predictions (evidence: `frontend/public/app.js`)
- Human QoE study → Features and measurements: planned ratings (evidence: `README.md`)
