# furkankirat/shadow-of-roles-universal architecture

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

- Interactive diagram: https://gitdiagram.com/furkankirat/shadow-of-roles-universal
- Repository: https://github.com/furkankirat/shadow-of-roles-universal

## Overview

Shadow of Roles is a Unity social-deduction game: players receive hidden roles with unique abilities, then use discussion and deduction through day/night rounds to identify threats and survive. Voting and elimination are documented core mechanics. The tree also shows player setup, role-book, graveyard, messages, game-end, and online-mode subsystems, but their runtime connections are not shown in source excerpts. The workflow edges below reflect README-level gameplay descriptions, not verified implementation calls; online play is shown as an unverified branch.

Main entry points: [`Assets/Scripts/SceneControllers/GameScene`](https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/SceneControllers/GameScene) (Round gameplay), [`Assets/Scripts/SceneControllers/PlayerNames`](https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/SceneControllers/PlayerNames) (Player setup), [`Assets/Scripts/game/Services`](https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/game/Services) (Hidden roles), [`Assets/Scripts/SceneControllers/OnlineMode`](https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/SceneControllers/OnlineMode) (Online mode)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_play["Game flow"]
  node_gameplay["Round gameplay"]
  node_abilities["Role abilities<br/>[AbilityService.cs]"]
  node_voting["Voting and elimination"]
  node_finish["Game outcome"]
end

subgraph group_roles["Roles and setup"]
  node_setup["Player setup"]
  node_role_system["Hidden roles"]
  node_role_catalog["Role catalog<br/>[RoleCatalog.cs]"]
end

subgraph group_presentation["Game interface"]
  node_rolebook["Role book"]
  node_messages["Game messages"]
  node_graveyard["Graveyard"]
  node_game_end["End screen"]
end

subgraph group_platform["Runtime services"]
  node_online_mode["Online mode"]
  node_networking["Networking"]
  node_localization["Localization<br/>[LanguageManager.cs]"]
end

node_players(("Players"))

node_players -.->|"configure players"| node_setup
node_setup -.->|"begin role play"| node_role_system
node_role_system -.->|"assign roles"| node_role_catalog
node_players -.->|"discuss and deduce"| node_gameplay
node_gameplay -.->|"use abilities"| node_abilities
node_gameplay -.->|"vote and eliminate"| node_voting
node_gameplay -.->|"survive rounds"| node_finish
node_players -.->|"choose online play"| node_online_mode
node_online_mode -.->|"use networking"| node_networking

click node_setup "https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/SceneControllers/PlayerNames"
click node_role_system "https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/game/Services"
click node_role_catalog "https://github.com/furkankirat/shadow-of-roles-universal/blob/main/Assets/Scripts/game/Services/RoleCatalog.cs"
click node_gameplay "https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/SceneControllers/GameScene"
click node_abilities "https://github.com/furkankirat/shadow-of-roles-universal/blob/main/Assets/Scripts/game/Services/AbilityService.cs"
click node_voting "https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/game/Services"
click node_finish "https://github.com/furkankirat/shadow-of-roles-universal/blob/main/Assets/Scripts/game/Services/FinishGameService.cs"
click node_rolebook "https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/SceneControllers/GameScene/RoleBook"
click node_messages "https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/SceneControllers/GameScene/Messages"
click node_graveyard "https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/SceneControllers/GameScene/Graveyard"
click node_game_end "https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/SceneControllers/GameScene/GameEnd"
click node_online_mode "https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/SceneControllers/OnlineMode"
click node_networking "https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/Networking"
click node_localization "https://github.com/furkankirat/shadow-of-roles-universal/blob/main/Assets/Scripts/Managers/LanguageManager.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_gameplay,node_abilities,node_voting,node_finish toneBlue
class node_setup,node_role_system,node_role_catalog toneAmber
class node_rolebook,node_messages,node_graveyard,node_game_end toneMint
class node_online_mode,node_networking,node_localization toneRose
class node_players toneIndigo
```

## Components

### Game flow

- [Round gameplay](https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/SceneControllers/GameScene): `Assets/Scripts/SceneControllers/GameScene`
- [Role abilities](https://github.com/furkankirat/shadow-of-roles-universal/blob/main/Assets/Scripts/game/Services/AbilityService.cs): `Assets/Scripts/game/Services/AbilityService.cs`
- [Voting and elimination](https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/game/Services): `Assets/Scripts/game/Services`
- [Game outcome](https://github.com/furkankirat/shadow-of-roles-universal/blob/main/Assets/Scripts/game/Services/FinishGameService.cs): `Assets/Scripts/game/Services/FinishGameService.cs`

### Roles and setup

- [Player setup](https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/SceneControllers/PlayerNames): `Assets/Scripts/SceneControllers/PlayerNames`
- [Hidden roles](https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/game/Services): `Assets/Scripts/game/Services`
- [Role catalog](https://github.com/furkankirat/shadow-of-roles-universal/blob/main/Assets/Scripts/game/Services/RoleCatalog.cs): `Assets/Scripts/game/Services/RoleCatalog.cs`

### Game interface

- [Role book](https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/SceneControllers/GameScene/RoleBook): `Assets/Scripts/SceneControllers/GameScene/RoleBook`
- [Game messages](https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/SceneControllers/GameScene/Messages): `Assets/Scripts/SceneControllers/GameScene/Messages`
- [Graveyard](https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/SceneControllers/GameScene/Graveyard): `Assets/Scripts/SceneControllers/GameScene/Graveyard`
- [End screen](https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/SceneControllers/GameScene/GameEnd): `Assets/Scripts/SceneControllers/GameScene/GameEnd`

### Runtime services

- [Online mode](https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/SceneControllers/OnlineMode): `Assets/Scripts/SceneControllers/OnlineMode`
- [Networking](https://github.com/furkankirat/shadow-of-roles-universal/tree/main/Assets/Scripts/Networking): `Assets/Scripts/Networking`
- [Localization](https://github.com/furkankirat/shadow-of-roles-universal/blob/main/Assets/Scripts/Managers/LanguageManager.cs): `Assets/Scripts/Managers/LanguageManager.cs`

### Other components

- **Players**

## Connections

- Players → Player setup: configure players
- Player setup → Hidden roles: begin role play
- Hidden roles → Role catalog: assign roles
- Players → Round gameplay: discuss and deduce (evidence: `README.md`)
- Round gameplay → Role abilities: use abilities (evidence: `README.md`)
- Round gameplay → Voting and elimination: vote and eliminate (evidence: `README.md`)
- Round gameplay → Game outcome: survive rounds (evidence: `README.md`)
- Players → Online mode: choose online play
- Online mode → Networking: use networking
