# teamproject-69-01-ct05/game-git-diwaa architecture

> Architecture diagram of the GitHub repository teamproject-69-01-ct05/game-git-diwaa, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/teamproject-69-01-ct05/game-git-diwaa
- Repository: https://github.com/teamproject-69-01-ct05/game-git-diwaa

## Overview

Git-Diwaa is a Godot game that teaches Git through a player sandbox backed by real Git, with terminal and workspace UI; it also includes a separate online account service. The README documents the game’s major UI and gameplay areas, while the sampled source gives clearer call-level evidence for the server’s account flow. Sandbox internals and several game features were not sampled, so their nodes use existing feature directories and only documented relationships are shown.

Main entry points: [`server/src/GitDiwaa.Server/Accounts/AccountService.cs`](https://github.com/teamproject-69-01-ct05/game-git-diwaa/blob/main/server/src/GitDiwaa.Server/Accounts/AccountService.cs) (Account service), [`game/features/sandbox`](https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/features/sandbox) (Sandbox UI), [`game`](https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game) (Godot game UI), [`server/src/GitDiwaa.Server/Persistence/InMemory`](https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/server/src/GitDiwaa.Server/Persistence/InMemory) (In-memory stores)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_game["Game experience"]
  node_game_ui["Godot game UI"]
  node_start["Start and dressing"]
  node_cutscenes["Story cutscenes"]
  node_level_select["Level select"]
  node_dialogue["Level dialogue"]
  node_missions["Level missions"]
end

subgraph group_git["Git sandbox engine"]
  node_sandbox_ui["Sandbox UI"]
  node_workspace["Files workspace"]
  node_terminal["Terminal CLI"]
  node_git_engine["Real Git engine"]
  node_git_models["Git contracts"]
  node_remote_repo["Remote repository"]
end

subgraph group_accounts["Account service"]
  node_auth_client["Auth client"]
  node_api["Account API"]
  node_account_service["Account service<br/>[AccountService.cs]"]
  node_validation["Account validation"]
  node_account_rules["Account rules<br/>[AccountRules.cs]"]
  node_session_filter["Session filter"]
  node_token_service["Session tokens"]
  node_user_repo["User repository<br/>[IUserRepository.cs]"]
  node_session_repo["Session repository"]
  node_consent_repo["Consent repository"]
  node_memory_store[("In-memory stores<br/>[InMemory]")]
end

node_player(("Player"))
node_online_player(("Online player"))

node_player -->|"plays"| node_game_ui
node_game_ui -->|"opens"| node_start
node_game_ui -->|"opens"| node_sandbox_ui
node_sandbox_ui -->|"includes"| node_workspace
node_sandbox_ui -->|"includes"| node_terminal
node_sandbox_ui -->|"uses"| node_git_engine
node_sandbox_ui -->|"offers"| node_remote_repo
node_terminal -->|"runs commands"| node_git_engine
node_git_engine -->|"uses contracts"| node_git_models
node_player -.->|"selects levels"| node_level_select
node_level_select -.->|"presents"| node_missions
node_level_select -.->|"presents"| node_dialogue
node_game_ui -.->|"shows"| node_cutscenes
node_online_player -.->|"uses"| node_auth_client
node_api -->|"dispatches"| node_account_service
node_account_service -->|"validates"| node_validation
node_validation -->|"checks rules"| node_account_rules
node_api -->|"filters sessions"| node_session_filter
node_session_filter -->|"validates session"| node_account_service
node_account_service -->|"issues tokens"| node_token_service
node_account_service -->|"reads and writes"| node_user_repo
node_account_service -->|"reads and writes"| node_session_repo
node_account_service -->|"uses consent"| node_consent_repo
node_memory_store -->|"implements"| node_user_repo
node_memory_store -->|"implements"| node_session_repo
node_memory_store -->|"implements"| node_consent_repo

click node_game_ui "https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game"
click node_start "https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/features/start"
click node_cutscenes "https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/features/cutscene"
click node_level_select "https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/features/level_select"
click node_dialogue "https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/features/dialogue"
click node_missions "https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/features/level_mission"
click node_sandbox_ui "https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/features/sandbox"
click node_workspace "https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/features/sandbox"
click node_terminal "https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/engine/cli"
click node_git_engine "https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/engine/real_git"
click node_git_models "https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/engine/core"
click node_remote_repo "https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/features/remote_repo"
click node_auth_client "https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/features/auth/services"
click node_api "https://github.com/teamproject-69-01-ct05/game-git-diwaa/blob/main/server/src/GitDiwaa.Server/Accounts/AccountEndpoints.cs"
click node_account_service "https://github.com/teamproject-69-01-ct05/game-git-diwaa/blob/main/server/src/GitDiwaa.Server/Accounts/AccountService.cs"
click node_validation "https://github.com/teamproject-69-01-ct05/game-git-diwaa/blob/main/server/src/GitDiwaa.Online/Accounts/AccountInputValidator.cs"
click node_account_rules "https://github.com/teamproject-69-01-ct05/game-git-diwaa/blob/main/server/src/GitDiwaa.Online/Accounts/AccountRules.cs"
click node_session_filter "https://github.com/teamproject-69-01-ct05/game-git-diwaa/blob/main/server/src/GitDiwaa.Server/Security/RequireSessionFilter.cs"
click node_token_service "https://github.com/teamproject-69-01-ct05/game-git-diwaa/blob/main/server/src/GitDiwaa.Server/Security/SessionTokenService.cs"
click node_user_repo "https://github.com/teamproject-69-01-ct05/game-git-diwaa/blob/main/server/src/GitDiwaa.Server/Persistence/IUserRepository.cs"
click node_session_repo "https://github.com/teamproject-69-01-ct05/game-git-diwaa/blob/main/server/src/GitDiwaa.Server/Persistence/ISessionRepository.cs"
click node_consent_repo "https://github.com/teamproject-69-01-ct05/game-git-diwaa/blob/main/server/src/GitDiwaa.Server/Persistence/IConsentRepository.cs"
click node_memory_store "https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/server/src/GitDiwaa.Server/Persistence/InMemory"

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_game_ui,node_start,node_cutscenes,node_level_select,node_dialogue,node_missions toneBlue
class node_sandbox_ui,node_workspace,node_terminal,node_git_engine,node_git_models,node_remote_repo toneAmber
class node_auth_client,node_api,node_account_service,node_validation,node_account_rules,node_session_filter,node_token_service,node_user_repo,node_session_repo,node_consent_repo,node_memory_store toneMint
class node_player,node_online_player toneIndigo
```

## Components

### Game experience

- [Godot game UI](https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game): `game`
- [Start and dressing](https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/features/start): `game/features/start`
- [Story cutscenes](https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/features/cutscene): `game/features/cutscene`
- [Level select](https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/features/level_select): `game/features/level_select`
- [Level dialogue](https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/features/dialogue): `game/features/dialogue`
- [Level missions](https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/features/level_mission): `game/features/level_mission`

### Git sandbox engine

- [Sandbox UI](https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/features/sandbox): `game/features/sandbox`
- [Files workspace](https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/features/sandbox): `game/features/sandbox`
- [Terminal CLI](https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/engine/cli): `game/engine/cli`
- [Real Git engine](https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/engine/real_git): `game/engine/real_git`
- [Git contracts](https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/engine/core): `game/engine/core`
- [Remote repository](https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/features/remote_repo): `game/features/remote_repo`

### Account service

- [Auth client](https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/game/features/auth/services): `game/features/auth/services`
- [Account API](https://github.com/teamproject-69-01-ct05/game-git-diwaa/blob/main/server/src/GitDiwaa.Server/Accounts/AccountEndpoints.cs): `server/src/GitDiwaa.Server/Accounts/AccountEndpoints.cs`
- [Account service](https://github.com/teamproject-69-01-ct05/game-git-diwaa/blob/main/server/src/GitDiwaa.Server/Accounts/AccountService.cs): `server/src/GitDiwaa.Server/Accounts/AccountService.cs`
- [Account validation](https://github.com/teamproject-69-01-ct05/game-git-diwaa/blob/main/server/src/GitDiwaa.Online/Accounts/AccountInputValidator.cs): `server/src/GitDiwaa.Online/Accounts/AccountInputValidator.cs`
- [Account rules](https://github.com/teamproject-69-01-ct05/game-git-diwaa/blob/main/server/src/GitDiwaa.Online/Accounts/AccountRules.cs): `server/src/GitDiwaa.Online/Accounts/AccountRules.cs`
- [Session filter](https://github.com/teamproject-69-01-ct05/game-git-diwaa/blob/main/server/src/GitDiwaa.Server/Security/RequireSessionFilter.cs): `server/src/GitDiwaa.Server/Security/RequireSessionFilter.cs`
- [Session tokens](https://github.com/teamproject-69-01-ct05/game-git-diwaa/blob/main/server/src/GitDiwaa.Server/Security/SessionTokenService.cs): `server/src/GitDiwaa.Server/Security/SessionTokenService.cs`
- [User repository](https://github.com/teamproject-69-01-ct05/game-git-diwaa/blob/main/server/src/GitDiwaa.Server/Persistence/IUserRepository.cs): `server/src/GitDiwaa.Server/Persistence/IUserRepository.cs`
- [Session repository](https://github.com/teamproject-69-01-ct05/game-git-diwaa/blob/main/server/src/GitDiwaa.Server/Persistence/ISessionRepository.cs): `server/src/GitDiwaa.Server/Persistence/ISessionRepository.cs`
- [Consent repository](https://github.com/teamproject-69-01-ct05/game-git-diwaa/blob/main/server/src/GitDiwaa.Server/Persistence/IConsentRepository.cs): `server/src/GitDiwaa.Server/Persistence/IConsentRepository.cs`
- [In-memory stores](https://github.com/teamproject-69-01-ct05/game-git-diwaa/tree/main/server/src/GitDiwaa.Server/Persistence/InMemory): `server/src/GitDiwaa.Server/Persistence/InMemory`

### Other components

- **Player**
- **Online player**

## Connections

- Player → Godot game UI: plays (evidence: `README.md`)
- Godot game UI → Start and dressing: opens (evidence: `README.md`)
- Godot game UI → Sandbox UI: opens (evidence: `README.md`)
- Sandbox UI → Files workspace: includes (evidence: `README.md`)
- Sandbox UI → Terminal CLI: includes (evidence: `README.md`)
- Sandbox UI → Real Git engine: uses (evidence: `README.md`)
- Sandbox UI → Remote repository: offers (evidence: `README.md`)
- Terminal CLI → Real Git engine: runs commands (evidence: `README.md`)
- Real Git engine → Git contracts: uses contracts (evidence: `README.md`)
- Player → Level select: selects levels
- Level select → Level missions: presents
- Level select → Level dialogue: presents
- Godot game UI → Story cutscenes: shows
- Online player → Auth client: uses
- Account API → Account service: dispatches (evidence: `server/src/GitDiwaa.Server/Accounts/AccountEndpoints.cs`)
- Account service → Account validation: validates (evidence: `server/src/GitDiwaa.Server/Accounts/AccountService.cs`)
- Account validation → Account rules: checks rules (evidence: `server/src/GitDiwaa.Online/Accounts/AccountInputValidator.cs`)
- Account API → Session filter: filters sessions (evidence: `server/src/GitDiwaa.Server/Accounts/AccountEndpoints.cs`)
- Session filter → Account service: validates session (evidence: `server/src/GitDiwaa.Server/Security/RequireSessionFilter.cs`)
- Account service → Session tokens: issues tokens (evidence: `server/src/GitDiwaa.Server/Accounts/AccountService.cs`)
- Account service → User repository: reads and writes (evidence: `server/src/GitDiwaa.Server/Accounts/AccountService.cs`)
- Account service → Session repository: reads and writes (evidence: `server/src/GitDiwaa.Server/Accounts/AccountService.cs`)
- Account service → Consent repository: uses consent (evidence: `server/src/GitDiwaa.Server/Accounts/AccountService.cs`)
- In-memory stores → User repository: implements (evidence: `server/src/GitDiwaa.Server/ServerApp.cs`)
- In-memory stores → Session repository: implements (evidence: `server/src/GitDiwaa.Server/ServerApp.cs`)
- In-memory stores → Consent repository: implements (evidence: `server/src/GitDiwaa.Server/ServerApp.cs`)
