# hieukhongbietcode/lang-xi-nghiep-no architecture

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

- Interactive diagram: https://gitdiagram.com/hieukhongbietcode/lang-xi-nghiep-no
- Repository: https://github.com/hieukhongbietcode/lang-xi-nghiep-no

## Overview

Làng Xí Nghiệp Nợ is a single-file, browser-based moderator dashboard for running a Werewolf game. The moderator configures players, seats and roles, then deals cards physically or privately through the app; during play, the app guides night actions, handles day discussion and game rules, and records the result. The README documents local autosaving, undo, event history and PDF export. All implementation nodes point to index.html because the README identifies it as the app’s single file; source excerpts were unavailable, so relationships rely on documented behavior.

Main entry points: [`index.html`](https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html) (Game dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_preparation["Game preparation"]
  node_dashboard["Game dashboard<br/>[index.html]"]
  node_players["Player roster<br/>[index.html]"]
  node_roles["Role catalog<br/>[index.html]"]
  node_seating["Seating and deck setup<br/>[index.html]"]
  node_dealing["Card dealing and privacy<br/>[index.html]"]
end

subgraph group_night["Night play"]
  node_nightcalls["Night turn guidance<br/>[index.html]"]
  node_table["Seated target selection<br/>[index.html]"]
  node_investigations["Hidden investigation results<br/>[index.html]"]
end

subgraph group_day["Day and resolution"]
  node_discussion["Discussion and voting<br/>[index.html]"]
  node_resolution["Deaths and rule effects<br/>[index.html]"]
  node_victory["Win checks<br/>[index.html]"]
end

subgraph group_state["State and records"]
  node_records["Timeline and PDF export<br/>[index.html]"]
  node_autosave["Autosave and undo<br/>[index.html]"]
  node_browserstore[("Browser storage")]
end

node_moderator(("Moderator"))

node_moderator -->|"runs game"| node_dashboard
node_dashboard -->|"manages players"| node_players
node_dashboard -->|"configures roles"| node_roles
node_dashboard -->|"sets up game"| node_seating
node_dashboard -->|"deals cards"| node_dealing
node_dashboard -->|"guides night"| node_nightcalls
node_nightcalls -->|"selects targets"| node_table
node_nightcalls -->|"shows results"| node_investigations
node_dashboard -->|"runs day"| node_discussion
node_dashboard -->|"applies rules"| node_resolution
node_dashboard -->|"checks winners"| node_victory
node_dashboard -->|"records game"| node_records
node_dashboard -->|"saves progress"| node_autosave
node_autosave -->|"stores locally"| node_browserstore

click node_dashboard "https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html"
click node_players "https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html"
click node_roles "https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html"
click node_seating "https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html"
click node_dealing "https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html"
click node_nightcalls "https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html"
click node_table "https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html"
click node_investigations "https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html"
click node_discussion "https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html"
click node_resolution "https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html"
click node_victory "https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html"
click node_records "https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html"
click node_autosave "https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html"

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_dashboard,node_players,node_roles,node_seating,node_dealing toneBlue
class node_nightcalls,node_table,node_investigations toneAmber
class node_discussion,node_resolution,node_victory toneMint
class node_records,node_autosave,node_browserstore toneRose
class node_moderator toneIndigo
```

## Components

### Game preparation

- [Game dashboard](https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html): `index.html`
- [Player roster](https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html): `index.html`
- [Role catalog](https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html): `index.html`
- [Seating and deck setup](https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html): `index.html`
- [Card dealing and privacy](https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html): `index.html`

### Night play

- [Night turn guidance](https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html): `index.html`
- [Seated target selection](https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html): `index.html`
- [Hidden investigation results](https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html): `index.html`

### Day and resolution

- [Discussion and voting](https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html): `index.html`
- [Deaths and rule effects](https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html): `index.html`
- [Win checks](https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html): `index.html`

### State and records

- [Timeline and PDF export](https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html): `index.html`
- [Autosave and undo](https://github.com/hieukhongbietcode/lang-xi-nghiep-no/blob/main/index.html): `index.html`
- **Browser storage**

### Other components

- **Moderator**

## Connections

- Moderator → Game dashboard: runs game (evidence: `README.md`)
- Game dashboard → Player roster: manages players (evidence: `README.md`)
- Game dashboard → Role catalog: configures roles (evidence: `README.md`)
- Game dashboard → Seating and deck setup: sets up game (evidence: `README.md`)
- Game dashboard → Card dealing and privacy: deals cards (evidence: `README.md`)
- Game dashboard → Night turn guidance: guides night (evidence: `README.md`)
- Night turn guidance → Seated target selection: selects targets (evidence: `README.md`)
- Night turn guidance → Hidden investigation results: shows results (evidence: `README.md`)
- Game dashboard → Discussion and voting: runs day (evidence: `README.md`)
- Game dashboard → Deaths and rule effects: applies rules (evidence: `README.md`)
- Game dashboard → Win checks: checks winners (evidence: `README.md`)
- Game dashboard → Timeline and PDF export: records game (evidence: `README.md`)
- Game dashboard → Autosave and undo: saves progress (evidence: `README.md`)
- Autosave and undo → Browser storage: stores locally (evidence: `README.md`)
