# cuongnguyen-2002/minimal-duelscat architecture

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

- Interactive diagram: https://gitdiagram.com/cuongnguyen-2002/minimal-duelscat
- Repository: https://github.com/cuongnguyen-2002/minimal-duelscat

## Overview

This Unity project is a minimal rhythm-catcher playable-ad prototype: players choose a song, move two cats to catch notes, and reach a win or miss outcome. The documented runtime centers on a game controller and event aggregator, with input, note spawning, pooled candy, cat animation, UI, sound, and effects as distinct responsibilities. README descriptions support the relationships shown; source excerpts were unavailable, so undocumented links and the tree-listed combo system are not expanded.

Main entry points: [`Assets/Game/Scripts/Game/GameEvents.cs`](https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Game/GameEvents.cs) (Game Events), [`Assets/Game/UI/UIManager.cs`](https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/UI/UIManager.cs) (UI Manager), [`Assets/Game/Scripts/Candy/CandySpawner.cs`](https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Candy/CandySpawner.cs) (Candy Spawner), [`Assets/Game/Scripts/Cat/CatController.cs`](https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Cat/CatController.cs) (Cat Controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flow["Game Flow"]
  node_ui["UI Manager<br/>[UIManager.cs]"]
  node_home["Home Screen<br/>[HomeScreen.cs]"]
  node_pick["Song Picker<br/>[PickSongScreen.cs]"]
  node_gameplay["Gameplay Screen<br/>[GamePlayScreen.cs]"]
  node_controller["Game Controller<br/>[GameController.cs]"]
  node_events["Game Events<br/>[GameEvents.cs]"]
end

subgraph group_play["Rhythm Gameplay"]
  node_input["Input Reader<br/>[InputReader.cs]"]
  node_spawner["Candy Spawner<br/>[CandySpawner.cs]"]
  node_factory["Candy Factory<br/>[CandyFactory.cs]"]
  node_candy["Candy Hit Detection<br/>[Candy.cs]"]
  node_cat["Cat Controller<br/>[CatController.cs]"]
  node_animation["Cat Animation<br/>[CatAnimation.cs]"]
end

subgraph group_presentation["Screens and Feedback"]
  node_sound["Sound Controller<br/>[SoundController.cs]"]
  node_vfx["Pooled VFX<br/>[VFXManager.cs]"]
  node_combo["Combo System<br/>[ComboSystem.cs]"]
end

subgraph group_data["Game Data"]
  node_chart["Note Chart"]
  node_configs["ScriptableObject Configs"]
end

node_player(("Player"))

node_player -->|"navigates"| node_ui
node_ui -->|"shows"| node_home
node_ui -->|"shows"| node_pick
node_ui -->|"shows"| node_gameplay
node_controller -->|"raises events"| node_events
node_events -->|"notifies"| node_ui
node_events -->|"notifies"| node_sound
node_events -->|"notifies"| node_vfx
node_events -->|"notifies"| node_cat
node_player -->|"provides input"| node_input
node_input -->|"moves cats"| node_cat
node_chart -->|"provides notes"| node_spawner
node_spawner -->|"requests candy"| node_factory
node_factory -->|"creates pooled"| node_candy
node_candy -->|"detects eater"| node_cat
node_cat -->|"drives animation"| node_animation
node_configs -.->|"configures"| node_spawner
node_configs -.->|"configures"| node_factory
node_configs -->|"configures"| node_animation
node_controller -.->|"coordinates notes"| node_spawner
node_controller -->|"checks misses"| node_candy
node_events -.->|"may notify"| node_combo

click node_ui "https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/UI/UIManager.cs"
click node_home "https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/UI/HomeScreen.cs"
click node_pick "https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/UI/PickSongScreen.cs"
click node_gameplay "https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/UI/GamePlayScreen.cs"
click node_controller "https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Game/GameController.cs"
click node_events "https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Game/GameEvents.cs"
click node_input "https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Input/InputReader.cs"
click node_spawner "https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Candy/CandySpawner.cs"
click node_factory "https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Candy/CandyFactory.cs"
click node_candy "https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Candy/Candy.cs"
click node_cat "https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Cat/CatController.cs"
click node_animation "https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Cat/CatAnimation.cs"
click node_chart "https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/audio/JsonMidi_BabyMonster.json"
click node_configs "https://github.com/cuongnguyen-2002/minimal-duelscat/tree/main/Assets/Game/Scripts/SO"
click node_sound "https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Game/SoundController.cs"
click node_vfx "https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/VFX/VFXManager.cs"
click node_combo "https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Combo/ComboSystem.cs"

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_ui,node_home,node_pick,node_gameplay,node_controller,node_events toneBlue
class node_input,node_spawner,node_factory,node_candy,node_cat,node_animation toneAmber
class node_sound,node_vfx,node_combo toneMint
class node_chart,node_configs toneRose
class node_player toneIndigo
```

## Components

### Game Flow

- [UI Manager](https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/UI/UIManager.cs): `Assets/Game/UI/UIManager.cs`
- [Home Screen](https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/UI/HomeScreen.cs): `Assets/Game/UI/HomeScreen.cs`
- [Song Picker](https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/UI/PickSongScreen.cs): `Assets/Game/UI/PickSongScreen.cs`
- [Gameplay Screen](https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/UI/GamePlayScreen.cs): `Assets/Game/UI/GamePlayScreen.cs`
- [Game Controller](https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Game/GameController.cs): `Assets/Game/Scripts/Game/GameController.cs`
- [Game Events](https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Game/GameEvents.cs): `Assets/Game/Scripts/Game/GameEvents.cs`

### Rhythm Gameplay

- [Input Reader](https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Input/InputReader.cs): `Assets/Game/Scripts/Input/InputReader.cs`
- [Candy Spawner](https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Candy/CandySpawner.cs): `Assets/Game/Scripts/Candy/CandySpawner.cs`
- [Candy Factory](https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Candy/CandyFactory.cs): `Assets/Game/Scripts/Candy/CandyFactory.cs`
- [Candy Hit Detection](https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Candy/Candy.cs): `Assets/Game/Scripts/Candy/Candy.cs`
- [Cat Controller](https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Cat/CatController.cs): `Assets/Game/Scripts/Cat/CatController.cs`
- [Cat Animation](https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Cat/CatAnimation.cs): `Assets/Game/Scripts/Cat/CatAnimation.cs`

### Screens and Feedback

- [Sound Controller](https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Game/SoundController.cs): `Assets/Game/Scripts/Game/SoundController.cs`
- [Pooled VFX](https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/VFX/VFXManager.cs): `Assets/Game/Scripts/VFX/VFXManager.cs`
- [Combo System](https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/Scripts/Combo/ComboSystem.cs): `Assets/Game/Scripts/Combo/ComboSystem.cs`

### Game Data

- [Note Chart](https://github.com/cuongnguyen-2002/minimal-duelscat/blob/main/Assets/Game/audio/JsonMidi_BabyMonster.json): `Assets/Game/audio/JsonMidi_BabyMonster.json`
- [ScriptableObject Configs](https://github.com/cuongnguyen-2002/minimal-duelscat/tree/main/Assets/Game/Scripts/SO): `Assets/Game/Scripts/SO`

### Other components

- **Player**

## Connections

- Player → UI Manager: navigates (evidence: `README.md`)
- UI Manager → Home Screen: shows (evidence: `README.md`)
- UI Manager → Song Picker: shows (evidence: `README.md`)
- UI Manager → Gameplay Screen: shows (evidence: `README.md`)
- Game Controller → Game Events: raises events (evidence: `README.md`)
- Game Events → UI Manager: notifies (evidence: `README.md`)
- Game Events → Sound Controller: notifies (evidence: `README.md`)
- Game Events → Pooled VFX: notifies (evidence: `README.md`)
- Game Events → Cat Controller: notifies (evidence: `README.md`)
- Player → Input Reader: provides input (evidence: `README.md`)
- Input Reader → Cat Controller: moves cats (evidence: `README.md`)
- Note Chart → Candy Spawner: provides notes (evidence: `README.md`)
- Candy Spawner → Candy Factory: requests candy (evidence: `README.md`)
- Candy Factory → Candy Hit Detection: creates pooled (evidence: `README.md`)
- Candy Hit Detection → Cat Controller: detects eater (evidence: `README.md`)
- Cat Controller → Cat Animation: drives animation (evidence: `README.md`)
- ScriptableObject Configs → Candy Spawner: configures
- ScriptableObject Configs → Candy Factory: configures
- ScriptableObject Configs → Cat Animation: configures (evidence: `README.md`)
- Game Controller → Candy Spawner: coordinates notes
- Game Controller → Candy Hit Detection: checks misses (evidence: `README.md`)
- Game Events → Combo System: may notify
