# mjh10042/total_maniaset architecture

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

- Interactive diagram: https://gitdiagram.com/mjh10042/total_maniaset
- Repository: https://github.com/mjh10042/total_maniaset

## Overview

total_maniaset is an osu!mania 4K/7K tosu overlay whose bundled analysis engines estimate chart difficulty and dan ranks. The main workflow is chart input → parsing and domain validation → difficulty/feature analysis → rank or course estimates → overlay-ready results; the README also describes live dan, section predictions, and hit/judgement displays. The sampled files show orchestration and several estimator calls, but not the complete overlay UI or all engine dispatch paths, so unsampled links are omitted rather than inferred.

Main entry points: [`overlay/total_maniaset/shared/engine/pipeline.js`](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/pipeline.js) (Dan pipeline), [`overlay/total_maniaset/shared/mma/js/pipeline/runAnalysisPipeline.js`](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/mma/js/pipeline/runAnalysisPipeline.js) (MMA pipeline), [`overlay/total_maniaset/shared/engine/worker.js`](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/worker.js) (Analysis worker), [`overlay/total_maniaset/shared/engine/isor_engine.js`](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/isor_engine.js) (ISOR estimates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Analysis runtime"]
  node_worker["Analysis worker<br/>[worker.js]"]
  node_vfs[("Virtual files<br/>[vfs.js]")]
  node_parser["Chart parser<br/>[parser.js]"]
  node_validator["Domain validation<br/>[validator.js]"]
end

subgraph group_dan["Dan estimation"]
  node_pipeline["Dan pipeline<br/>[pipeline.js]"]
  node_features["Feature extraction"]
  node_classifier["Chart classifier<br/>[classifier.js]"]
  node_rank["Rank engine<br/>[rank_engine.js]"]
  node_isor["ISOR estimates<br/>[isor_engine.js]"]
  node_sr["SR core<br/>[algorithm.js]"]
  node_course["LN course estimates"]
  node_seven["7K estimates<br/>[hybrid_7k.js]"]
end

subgraph group_mma["MMA analysis"]
  node_mma_pipeline["MMA pipeline"]
  node_mma_parser["MMA chart parser<br/>[osuFileParser.js]"]
  node_rework["Rework estimators<br/>[sunnyEstimator.js]"]
  node_azusa["Azusa estimator<br/>[azusaEstimator.js]"]
  node_roxy["Roxy estimator<br/>[roxyEstimator.js]"]
  node_daniel["Daniel estimator<br/>[danielEstimator.js]"]
  node_ett["Etterna analysis<br/>[calc.js]"]
  node_interlude["Interlude stars<br/>[chartBuilder.js]"]
  node_patterns["Pattern analysis<br/>[service.js]"]
end

subgraph group_outputs["Overlay results"]
  node_overlay_results["Overlay results<br/>[contracts.js]"]
  node_section_view["Section estimates<br/>[sections.js]"]
  node_live["Live dan<br/>[live_model.js]"]
end

node_tosu(("tosu / osu!"))

node_tosu -.->|"provides chart"| node_worker
node_worker -.->|"dispatches analysis"| node_pipeline
node_worker -.->|"loads runtime data"| node_vfs
node_pipeline -->|"parses chart"| node_parser
node_pipeline -->|"validates domain"| node_validator
node_pipeline -->|"extracts features"| node_features
node_pipeline -->|"classifies chart"| node_classifier
node_pipeline -->|"computes rank"| node_rank
node_pipeline -->|"runs ISOR"| node_isor
node_pipeline -->|"estimates course"| node_course
node_vfs -->|"supplies chart text"| node_parser
node_isor -->|"parses chart"| node_parser
node_isor -->|"validates domain"| node_validator
node_isor -.->|"uses SR core"| node_sr
node_worker -->|"dispatches 7K"| node_seven
node_worker -->|"runs sections"| node_section_view
node_worker -.->|"runs live model"| node_live
node_pipeline -->|"returns analysis"| node_overlay_results
node_mma_pipeline -->|"parses chart"| node_mma_parser
node_mma_pipeline -->|"runs Sunny"| node_rework
node_mma_pipeline -->|"runs Etterna"| node_ett
node_mma_pipeline -->|"calculates stars"| node_interlude
node_mma_pipeline -.->|"analyzes patterns"| node_patterns
node_mma_pipeline -->|"dispatches estimator"| node_azusa
node_mma_pipeline -->|"dispatches estimator"| node_roxy
node_mma_pipeline -->|"dispatches estimator"| node_daniel
node_azusa -->|"uses reference estimate"| node_daniel
node_azusa -->|"uses Sunny fallback"| node_rework
node_roxy -->|"uses reference estimate"| node_azusa
node_roxy -->|"uses reference estimate"| node_daniel
node_roxy -->|"uses reference estimate"| node_rework
node_rework -.->|"reads parsed data"| node_mma_parser

click node_worker "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/worker.js"
click node_vfs "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/vfs.js"
click node_parser "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/parser.js"
click node_validator "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/validator.js"
click node_pipeline "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/pipeline.js"
click node_features "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/feature_extractor.js"
click node_classifier "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/classifier.js"
click node_rank "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/rank_engine.js"
click node_isor "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/isor_engine.js"
click node_sr "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/sr_core/algorithm.js"
click node_course "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/ln_course_estimator.js"
click node_seven "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/hybrid_7k.js"
click node_mma_pipeline "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/mma/js/pipeline/runAnalysisPipeline.js"
click node_mma_parser "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/mma/js/parser/osuFileParser.js"
click node_rework "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/mma/js/estimator/sunnyEstimator.js"
click node_azusa "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/mma/js/estimator/azusaEstimator.js"
click node_roxy "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/mma/js/estimator/roxyEstimator.js"
click node_daniel "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/mma/js/estimator/danielEstimator.js"
click node_ett "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/mma/js/ett/calc.js"
click node_interlude "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/mma/js/interlude/chartBuilder.js"
click node_patterns "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/mma/js/patterns/service.js"
click node_overlay_results "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/contracts.js"
click node_section_view "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/sections.js"
click node_live "https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/live_model.js"

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_worker,node_vfs,node_parser,node_validator toneBlue
class node_pipeline,node_features,node_classifier,node_rank,node_isor,node_sr,node_course,node_seven toneAmber
class node_mma_pipeline,node_mma_parser,node_rework,node_azusa,node_roxy,node_daniel,node_ett,node_interlude,node_patterns toneMint
class node_overlay_results,node_section_view,node_live toneRose
class node_tosu toneIndigo
```

## Components

### Analysis runtime

- [Analysis worker](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/worker.js): `overlay/total_maniaset/shared/engine/worker.js`
- [Virtual files](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/vfs.js): `overlay/total_maniaset/shared/engine/vfs.js`
- [Chart parser](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/parser.js): `overlay/total_maniaset/shared/engine/parser.js`
- [Domain validation](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/validator.js): `overlay/total_maniaset/shared/engine/validator.js`

### Dan estimation

- [Dan pipeline](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/pipeline.js): `overlay/total_maniaset/shared/engine/pipeline.js`
- [Feature extraction](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/feature_extractor.js): `overlay/total_maniaset/shared/engine/feature_extractor.js`
- [Chart classifier](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/classifier.js): `overlay/total_maniaset/shared/engine/classifier.js`
- [Rank engine](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/rank_engine.js): `overlay/total_maniaset/shared/engine/rank_engine.js`
- [ISOR estimates](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/isor_engine.js): `overlay/total_maniaset/shared/engine/isor_engine.js`
- [SR core](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/sr_core/algorithm.js): `overlay/total_maniaset/shared/engine/sr_core/algorithm.js`
- [LN course estimates](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/ln_course_estimator.js): `overlay/total_maniaset/shared/engine/ln_course_estimator.js`
- [7K estimates](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/hybrid_7k.js): `overlay/total_maniaset/shared/engine/hybrid_7k.js`

### MMA analysis

- [MMA pipeline](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/mma/js/pipeline/runAnalysisPipeline.js): `overlay/total_maniaset/shared/mma/js/pipeline/runAnalysisPipeline.js`
- [MMA chart parser](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/mma/js/parser/osuFileParser.js): `overlay/total_maniaset/shared/mma/js/parser/osuFileParser.js`
- [Rework estimators](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/mma/js/estimator/sunnyEstimator.js): `overlay/total_maniaset/shared/mma/js/estimator/sunnyEstimator.js`
- [Azusa estimator](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/mma/js/estimator/azusaEstimator.js): `overlay/total_maniaset/shared/mma/js/estimator/azusaEstimator.js`
- [Roxy estimator](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/mma/js/estimator/roxyEstimator.js): `overlay/total_maniaset/shared/mma/js/estimator/roxyEstimator.js`
- [Daniel estimator](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/mma/js/estimator/danielEstimator.js): `overlay/total_maniaset/shared/mma/js/estimator/danielEstimator.js`
- [Etterna analysis](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/mma/js/ett/calc.js): `overlay/total_maniaset/shared/mma/js/ett/calc.js`
- [Interlude stars](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/mma/js/interlude/chartBuilder.js): `overlay/total_maniaset/shared/mma/js/interlude/chartBuilder.js`
- [Pattern analysis](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/mma/js/patterns/service.js): `overlay/total_maniaset/shared/mma/js/patterns/service.js`

### Overlay results

- [Overlay results](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/contracts.js): `overlay/total_maniaset/shared/engine/contracts.js`
- [Section estimates](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/sections.js): `overlay/total_maniaset/shared/engine/sections.js`
- [Live dan](https://github.com/mjh10042/total_maniaset/blob/main/overlay/total_maniaset/shared/engine/live_model.js): `overlay/total_maniaset/shared/engine/live_model.js`

### Other components

- **tosu / osu!**

## Connections

- tosu / osu! → Analysis worker: provides chart
- Analysis worker → Dan pipeline: dispatches analysis
- Analysis worker → Virtual files: loads runtime data
- Dan pipeline → Chart parser: parses chart (evidence: `overlay/total_maniaset/shared/engine/pipeline.js`)
- Dan pipeline → Domain validation: validates domain (evidence: `overlay/total_maniaset/shared/engine/pipeline.js`)
- Dan pipeline → Feature extraction: extracts features (evidence: `overlay/total_maniaset/shared/engine/pipeline.js`)
- Dan pipeline → Chart classifier: classifies chart (evidence: `overlay/total_maniaset/shared/engine/pipeline.js`)
- Dan pipeline → Rank engine: computes rank (evidence: `overlay/total_maniaset/shared/engine/pipeline.js`)
- Dan pipeline → ISOR estimates: runs ISOR (evidence: `overlay/total_maniaset/shared/engine/pipeline.js`)
- Dan pipeline → LN course estimates: estimates course (evidence: `overlay/total_maniaset/shared/engine/pipeline.js`)
- Virtual files → Chart parser: supplies chart text (evidence: `overlay/total_maniaset/shared/engine/parser.js`)
- ISOR estimates → Chart parser: parses chart (evidence: `overlay/total_maniaset/shared/engine/isor_engine.js`)
- ISOR estimates → Domain validation: validates domain (evidence: `overlay/total_maniaset/shared/engine/isor_engine.js`)
- ISOR estimates → SR core: uses SR core
- Analysis worker → 7K estimates: dispatches 7K (evidence: `overlay/total_maniaset/shared/engine/worker.js`)
- Analysis worker → Section estimates: runs sections (evidence: `overlay/total_maniaset/shared/engine/worker.js`)
- Analysis worker → Live dan: runs live model
- Dan pipeline → Overlay results: returns analysis (evidence: `overlay/total_maniaset/shared/engine/pipeline.js`)
- MMA pipeline → MMA chart parser: parses chart (evidence: `overlay/total_maniaset/shared/mma/js/pipeline/runAnalysisPipeline.js`)
- MMA pipeline → Rework estimators: runs Sunny (evidence: `overlay/total_maniaset/shared/mma/js/pipeline/runAnalysisPipeline.js`)
- MMA pipeline → Etterna analysis: runs Etterna (evidence: `overlay/total_maniaset/shared/mma/js/pipeline/runAnalysisPipeline.js`)
- MMA pipeline → Interlude stars: calculates stars (evidence: `overlay/total_maniaset/shared/mma/js/pipeline/runAnalysisPipeline.js`)
- MMA pipeline → Pattern analysis: analyzes patterns (evidence: `overlay/total_maniaset/shared/mma/js/pipeline/runAnalysisPipeline.js`)
- MMA pipeline → Azusa estimator: dispatches estimator (evidence: `overlay/total_maniaset/shared/mma/js/pipeline/runAnalysisPipeline.js`)
- MMA pipeline → Roxy estimator: dispatches estimator (evidence: `overlay/total_maniaset/shared/mma/js/pipeline/runAnalysisPipeline.js`)
- MMA pipeline → Daniel estimator: dispatches estimator (evidence: `overlay/total_maniaset/shared/mma/js/pipeline/runAnalysisPipeline.js`)
- Azusa estimator → Daniel estimator: uses reference estimate (evidence: `overlay/total_maniaset/shared/mma/js/estimator/azusaEstimator.js`)
- Azusa estimator → Rework estimators: uses Sunny fallback (evidence: `overlay/total_maniaset/shared/mma/js/estimator/azusaEstimator.js`)
- Roxy estimator → Azusa estimator: uses reference estimate (evidence: `overlay/total_maniaset/shared/mma/js/estimator/roxyEstimator.js`)
- Roxy estimator → Daniel estimator: uses reference estimate (evidence: `overlay/total_maniaset/shared/mma/js/estimator/roxyEstimator.js`)
- Roxy estimator → Rework estimators: uses reference estimate (evidence: `overlay/total_maniaset/shared/mma/js/estimator/roxyEstimator.js`)
- Rework estimators → MMA chart parser: reads parsed data
