# jinjooyoung/2026_networkprogramming architecture

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

- Interactive diagram: https://gitdiagram.com/jinjooyoung/2026_networkprogramming
- Repository: https://github.com/jinjooyoung/2026_networkprogramming

## Overview

This is a Unity web-build project containing three mini-games—card matching, recycling, and fruit slicing—and a small Node/Express leaderboard service. The apparent user journey is game selection, play, and score submission or leaderboard lookup. Unity gameplay scripts and scene wiring were not included in the excerpts, so their internal relationships are not asserted; the server’s routes, encryption, and file-backed score handling are visible in Node/server.js.

Main entry points: [`Assets/Scripts/Managers/GameStateManager.cs`](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Managers/GameStateManager.cs) (Game state), [`Assets/Scripts/Games/0_CardMatch/Game0_CardMatchManager.cs`](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/0_CardMatch/Game0_CardMatchManager.cs) (Card matching), [`Assets/Scripts/Games/1_Recycle/Game1_RecycleManager.cs`](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/1_Recycle/Game1_RecycleManager.cs) (Recycling game), [`Assets/Scripts/Games/2_FruitSlice/Game2_FruitSliceManager.cs`](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/2_FruitSlice/Game2_FruitSliceManager.cs) (Fruit slicing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_unity["Unity app"]
  node_selection["Game selection"]
  node_lobby["Main lobby"]
  node_game_state["Game state"]
  node_game_timer["Game timer<br/>[GameTimer.cs]"]
  node_score_manager["Score tracking<br/>[ScoreManager.cs]"]
  node_ui["Game UI<br/>[UIManager.cs]"]
  node_controls["Input controls"]
  node_network_client["Leaderboard client<br/>[NetworkManager.cs]"]
end

subgraph group_games["Mini-games"]
  node_card_game["Card matching"]
  node_card_objects["Card objects<br/>[CardObject.cs]"]
  node_card_data["Card data<br/>[CardDataSO.cs]"]
  node_recycle_game["Recycling game"]
  node_trash_objects["Trash and zones<br/>[TrashObject.cs]"]
  node_trash_data["Trash data<br/>[TrashDataSO.cs]"]
  node_fruit_game["Fruit slicing"]
  node_fruit_objects["Fruit and effects<br/>[FruitObject.cs]"]
  node_fruit_data["Fruit data<br/>[FruitDataSO.cs]"]
end

subgraph group_server["Leaderboard service"]
  node_http_api["Leaderboard API<br/>[server.js]"]
  node_crypto["Payload encryption<br/>[server.js]"]
  node_score_file[("Score file<br/>[server.js]")]
end

subgraph group_assets["Game content"]
  node_game_assets["Game assets"]
end

node_player(("Player"))

node_player -.->|"chooses game"| node_selection
node_selection -.->|"opens game"| node_lobby
node_lobby -.->|"starts play"| node_game_state
node_game_state -.->|"tracks time"| node_game_timer
node_game_state -.->|"runs"| node_card_game
node_game_state -.->|"runs"| node_recycle_game
node_game_state -.->|"runs"| node_fruit_game
node_player -.->|"provides input"| node_controls
node_card_game -.->|"uses"| node_card_objects
node_card_game -.->|"uses"| node_card_data
node_recycle_game -.->|"uses"| node_trash_objects
node_recycle_game -.->|"uses"| node_trash_data
node_fruit_game -.->|"uses"| node_fruit_objects
node_fruit_game -.->|"uses"| node_fruit_data
node_game_state -.->|"updates score"| node_score_manager
node_score_manager -.->|"submits score"| node_network_client
node_network_client -.->|"sends requests"| node_http_api
node_http_api -->|"encodes payload"| node_crypto
node_http_api -->|"reads and writes"| node_score_file
node_game_state -.->|"updates display"| node_ui

click node_selection "https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Managers/GameSelectManager.cs"
click node_lobby "https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Managers/MainLobbyManager.cs"
click node_game_state "https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Managers/GameStateManager.cs"
click node_game_timer "https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/GameTimer.cs"
click node_score_manager "https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/ScoreManager.cs"
click node_ui "https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/UI/UIManager.cs"
click node_controls "https://github.com/jinjooyoung/2026_networkprogramming/tree/main/Assets/Scripts/Controls"
click node_card_game "https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/0_CardMatch/Game0_CardMatchManager.cs"
click node_card_objects "https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/0_CardMatch/CardObject.cs"
click node_card_data "https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/0_CardMatch/CardDataSO.cs"
click node_recycle_game "https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/1_Recycle/Game1_RecycleManager.cs"
click node_trash_objects "https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/1_Recycle/TrashObject.cs"
click node_trash_data "https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/1_Recycle/TrashDataSO.cs"
click node_fruit_game "https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/2_FruitSlice/Game2_FruitSliceManager.cs"
click node_fruit_objects "https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/2_FruitSlice/FruitObject.cs"
click node_fruit_data "https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/2_FruitSlice/FruitDataSO.cs"
click node_network_client "https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Managers/NetworkManager.cs"
click node_http_api "https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Node/server.js"
click node_crypto "https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Node/server.js"
click node_score_file "https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Node/server.js"
click node_game_assets "https://github.com/jinjooyoung/2026_networkprogramming/tree/main/Assets/Data"

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_selection,node_lobby,node_game_state,node_game_timer,node_score_manager,node_ui,node_controls,node_network_client toneBlue
class node_card_game,node_card_objects,node_card_data,node_recycle_game,node_trash_objects,node_trash_data,node_fruit_game,node_fruit_objects,node_fruit_data toneAmber
class node_http_api,node_crypto,node_score_file toneMint
class node_game_assets toneRose
class node_player toneIndigo
```

## Components

### Unity app

- [Game selection](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Managers/GameSelectManager.cs): `Assets/Scripts/Managers/GameSelectManager.cs`
- [Main lobby](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Managers/MainLobbyManager.cs): `Assets/Scripts/Managers/MainLobbyManager.cs`
- [Game state](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Managers/GameStateManager.cs): `Assets/Scripts/Managers/GameStateManager.cs`
- [Game timer](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/GameTimer.cs): `Assets/Scripts/GameTimer.cs`
- [Score tracking](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/ScoreManager.cs): `Assets/Scripts/ScoreManager.cs`
- [Game UI](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/UI/UIManager.cs): `Assets/Scripts/UI/UIManager.cs`
- [Input controls](https://github.com/jinjooyoung/2026_networkprogramming/tree/main/Assets/Scripts/Controls): `Assets/Scripts/Controls`
- [Leaderboard client](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Managers/NetworkManager.cs): `Assets/Scripts/Managers/NetworkManager.cs`

### Mini-games

- [Card matching](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/0_CardMatch/Game0_CardMatchManager.cs): `Assets/Scripts/Games/0_CardMatch/Game0_CardMatchManager.cs`
- [Card objects](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/0_CardMatch/CardObject.cs): `Assets/Scripts/Games/0_CardMatch/CardObject.cs`
- [Card data](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/0_CardMatch/CardDataSO.cs): `Assets/Scripts/Games/0_CardMatch/CardDataSO.cs`
- [Recycling game](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/1_Recycle/Game1_RecycleManager.cs): `Assets/Scripts/Games/1_Recycle/Game1_RecycleManager.cs`
- [Trash and zones](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/1_Recycle/TrashObject.cs): `Assets/Scripts/Games/1_Recycle/TrashObject.cs`
- [Trash data](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/1_Recycle/TrashDataSO.cs): `Assets/Scripts/Games/1_Recycle/TrashDataSO.cs`
- [Fruit slicing](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/2_FruitSlice/Game2_FruitSliceManager.cs): `Assets/Scripts/Games/2_FruitSlice/Game2_FruitSliceManager.cs`
- [Fruit and effects](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/2_FruitSlice/FruitObject.cs): `Assets/Scripts/Games/2_FruitSlice/FruitObject.cs`
- [Fruit data](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Assets/Scripts/Games/2_FruitSlice/FruitDataSO.cs): `Assets/Scripts/Games/2_FruitSlice/FruitDataSO.cs`

### Leaderboard service

- [Leaderboard API](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Node/server.js): `Node/server.js`
- [Payload encryption](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Node/server.js): `Node/server.js`
- [Score file](https://github.com/jinjooyoung/2026_networkprogramming/blob/main/Node/server.js): `Node/server.js`

### Game content

- [Game assets](https://github.com/jinjooyoung/2026_networkprogramming/tree/main/Assets/Data): `Assets/Data`

### Other components

- **Player**

## Connections

- Player → Game selection: chooses game
- Game selection → Main lobby: opens game
- Main lobby → Game state: starts play
- Game state → Game timer: tracks time
- Game state → Card matching: runs
- Game state → Recycling game: runs
- Game state → Fruit slicing: runs
- Player → Input controls: provides input
- Card matching → Card objects: uses
- Card matching → Card data: uses
- Recycling game → Trash and zones: uses
- Recycling game → Trash data: uses
- Fruit slicing → Fruit and effects: uses
- Fruit slicing → Fruit data: uses
- Game state → Score tracking: updates score
- Score tracking → Leaderboard client: submits score
- Leaderboard client → Leaderboard API: sends requests (evidence: `Node/server.js`)
- Leaderboard API → Payload encryption: encodes payload (evidence: `Node/server.js`)
- Leaderboard API → Score file: reads and writes (evidence: `Node/server.js`)
- Game state → Game UI: updates display
