# windy10v10ai/game architecture

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

- Interactive diagram: https://gitdiagram.com/windy10v10ai/game
- Repository: https://github.com/windy10v10ai/game

## Overview

Windy10v10AI is a PvE Dota 2 custom game. During play, bot heroes make combat, ability, item, and team decisions while game systems modify units and handle events; the Panorama client presents game and player-facing features. The repository also includes profile, daily-task, membership/payment, shop, and lottery interfaces alongside server APIs and gameplay analytics. Edges are limited to relationships visible in the supplied excerpts, SOURCE INDEX references, or README; unsampled runtime wiring is left unconnected or marked unverified.

Main entry points: [`src/panorama/react/hud_main/pages/profile/ProfilePage.tsx`](https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/pages/profile/ProfilePage.tsx) (Player Profile), [`src/vscripts/ai/AI.ts`](https://github.com/windy10v10ai/game/blob/develop/src/vscripts/ai/AI.ts) (Bot AI), [`src/panorama/react/hud_main/router/PageRouter.tsx`](https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/router/PageRouter.tsx) (Page Router), [`src/panorama/react/hud_main/pages/profile/tabs/member/alipay/useAlipayOrder.ts`](https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/pages/profile/tabs/member/alipay/useAlipayOrder.ts) (Alipay Orders)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gameplay["Gameplay AI"]
  node_bot_ai["Bot AI<br/>[AI.ts]"]
  node_bot_team["Team Strategy<br/>[team-brain.ts]"]
  node_bot_hero["Hero Behavior<br/>[bot-base.ts]"]
  node_ability_logic["Ability Logic<br/>[ability-spec.ts]"]
  node_cast_conditions["Cast Conditions<br/>[cast-condition.ts]"]
  node_item_builds["Item Builds"]
end

subgraph group_gameplay_systems["Game Systems"]
  node_game_modules["Game Modules<br/>[index.ts]"]
  node_kill_events["Kill Events"]
  node_creep_buffs["Creep Buffs"]
  node_property_controller["Hero Properties"]
end

subgraph group_client_ui["Panorama UI"]
  node_lottery_ui["Lottery HUD<br/>[Lottery.tsx]"]
  node_main_hud["Main HUD<br/>[HudMain.tsx]"]
  node_navigation["Page Navigation"]
  node_page_router["Page Router<br/>[PageRouter.tsx]"]
  node_profile["Player Profile<br/>[ProfilePage.tsx]"]
  node_awaken["Awaken Features<br/>[AwakenTab.tsx]"]
  node_daily_tasks["Daily Tasks<br/>[DailyTaskTab.tsx]"]
  node_membership["Membership<br/>[MemberTab.tsx]"]
  node_alipay_order["Alipay Orders<br/>[useAlipayOrder.ts]"]
  node_shop["In-Game Shop<br/>[ShopPage.tsx]"]
  node_net_table["Net Table Hook<br/>[useNetTable.ts]"]
  node_offline_state["Offline State<br/>[useDataOffline.ts]"]
end

subgraph group_services["APIs and Analytics"]
  node_api_client["API Client<br/>[api-client.ts]"]
  node_api_routes["API Routes<br/>[api-route.ts]"]
  node_alipay_service["Alipay Service<br/>[alipay.ts]"]
  node_analytics["Game Analytics<br/>[ga4.ts]"]
end

subgraph group_shared["Shared Contracts"]
  node_shared_events["Shared Events<br/>[events.d.ts]"]
  node_shared_tables["Shared Net Tables<br/>[net_tables.d.ts]"]
end

node_player(("Dota Player"))

node_player -.->|"uses"| node_main_hud
node_navigation -->|"selects page"| node_page_router
node_page_router -->|"renders"| node_profile
node_page_router -->|"renders"| node_shop
node_profile -->|"renders tab"| node_awaken
node_profile -->|"renders tab"| node_daily_tasks
node_profile -->|"renders tab"| node_membership
node_membership -.->|"uses order hook"| node_alipay_order
node_alipay_order -->|"subscribes"| node_net_table
node_profile -->|"reads player data"| node_net_table
node_offline_state -->|"reads status"| node_net_table
node_api_client -->|"selects target"| node_api_routes
node_alipay_order -.->|"sends order events"| node_alipay_service
node_bot_ai -.->|"coordinates"| node_bot_team
node_bot_ai -.->|"controls"| node_bot_hero
node_bot_ai -.->|"dispatches abilities"| node_ability_logic
node_ability_logic -->|"checks casts"| node_cast_conditions
node_bot_ai -.->|"manages purchases"| node_item_builds
node_game_modules -.->|"registers modules"| node_kill_events
node_kill_events -->|"tracks tower status"| node_creep_buffs
node_game_modules -.->|"initializes"| node_property_controller
node_player -.->|"plays against"| node_bot_ai

click node_bot_ai "https://github.com/windy10v10ai/game/blob/develop/src/vscripts/ai/AI.ts"
click node_bot_team "https://github.com/windy10v10ai/game/blob/develop/src/vscripts/ai/team/team-brain.ts"
click node_bot_hero "https://github.com/windy10v10ai/game/blob/develop/src/vscripts/ai/hero/bot-base.ts"
click node_ability_logic "https://github.com/windy10v10ai/game/blob/develop/src/vscripts/ai/ability/ability-spec.ts"
click node_cast_conditions "https://github.com/windy10v10ai/game/blob/develop/src/vscripts/ai/action/cast-condition.ts"
click node_item_builds "https://github.com/windy10v10ai/game/blob/develop/src/vscripts/ai/build-item/bot-build-manager.ts"
click node_game_modules "https://github.com/windy10v10ai/game/blob/develop/src/vscripts/modules/index.ts"
click node_kill_events "https://github.com/windy10v10ai/game/blob/develop/src/vscripts/modules/event/event-entity-killed.ts"
click node_creep_buffs "https://github.com/windy10v10ai/game/blob/develop/src/vscripts/modules/event/game-in-progress/creep-buff-manager.ts"
click node_property_controller "https://github.com/windy10v10ai/game/blob/develop/src/vscripts/modules/property/property_controller.ts"
click node_lottery_ui "https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_lottery/Lottery.tsx"
click node_main_hud "https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/HudMain.tsx"
click node_navigation "https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/store/NavigationContext.tsx"
click node_page_router "https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/router/PageRouter.tsx"
click node_profile "https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/pages/profile/ProfilePage.tsx"
click node_awaken "https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/pages/profile/tabs/AwakenTab.tsx"
click node_daily_tasks "https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/pages/profile/tabs/dailytask/DailyTaskTab.tsx"
click node_membership "https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/pages/profile/tabs/member/MemberTab.tsx"
click node_alipay_order "https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/pages/profile/tabs/member/alipay/useAlipayOrder.ts"
click node_shop "https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/pages/shop/ShopPage.tsx"
click node_net_table "https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/shared/hooks/useNetTable.ts"
click node_offline_state "https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/shared/hooks/useDataOffline.ts"
click node_api_client "https://github.com/windy10v10ai/game/blob/develop/src/vscripts/api/api-client.ts"
click node_api_routes "https://github.com/windy10v10ai/game/blob/develop/src/vscripts/api/api-route.ts"
click node_alipay_service "https://github.com/windy10v10ai/game/blob/develop/src/vscripts/api/alipay.ts"
click node_analytics "https://github.com/windy10v10ai/game/blob/develop/src/vscripts/api/analytics/ga4/ga4.ts"
click node_shared_events "https://github.com/windy10v10ai/game/blob/develop/src/common/events.d.ts"
click node_shared_tables "https://github.com/windy10v10ai/game/blob/develop/src/common/net_tables.d.ts"

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_bot_ai,node_bot_team,node_bot_hero,node_ability_logic,node_cast_conditions,node_item_builds toneBlue
class node_game_modules,node_kill_events,node_creep_buffs,node_property_controller toneAmber
class node_lottery_ui,node_main_hud,node_navigation,node_page_router,node_profile,node_awaken,node_daily_tasks,node_membership,node_alipay_order,node_shop,node_net_table,node_offline_state toneMint
class node_api_client,node_api_routes,node_alipay_service,node_analytics toneRose
class node_shared_events,node_shared_tables,node_player toneIndigo
```

## Components

### Gameplay AI

- [Bot AI](https://github.com/windy10v10ai/game/blob/develop/src/vscripts/ai/AI.ts): `src/vscripts/ai/AI.ts`
- [Team Strategy](https://github.com/windy10v10ai/game/blob/develop/src/vscripts/ai/team/team-brain.ts): `src/vscripts/ai/team/team-brain.ts`
- [Hero Behavior](https://github.com/windy10v10ai/game/blob/develop/src/vscripts/ai/hero/bot-base.ts): `src/vscripts/ai/hero/bot-base.ts`
- [Ability Logic](https://github.com/windy10v10ai/game/blob/develop/src/vscripts/ai/ability/ability-spec.ts): `src/vscripts/ai/ability/ability-spec.ts`
- [Cast Conditions](https://github.com/windy10v10ai/game/blob/develop/src/vscripts/ai/action/cast-condition.ts): `src/vscripts/ai/action/cast-condition.ts`
- [Item Builds](https://github.com/windy10v10ai/game/blob/develop/src/vscripts/ai/build-item/bot-build-manager.ts): `src/vscripts/ai/build-item/bot-build-manager.ts`

### Game Systems

- [Game Modules](https://github.com/windy10v10ai/game/blob/develop/src/vscripts/modules/index.ts): `src/vscripts/modules/index.ts`
- [Kill Events](https://github.com/windy10v10ai/game/blob/develop/src/vscripts/modules/event/event-entity-killed.ts): `src/vscripts/modules/event/event-entity-killed.ts`
- [Creep Buffs](https://github.com/windy10v10ai/game/blob/develop/src/vscripts/modules/event/game-in-progress/creep-buff-manager.ts): `src/vscripts/modules/event/game-in-progress/creep-buff-manager.ts`
- [Hero Properties](https://github.com/windy10v10ai/game/blob/develop/src/vscripts/modules/property/property_controller.ts): `src/vscripts/modules/property/property_controller.ts`

### Panorama UI

- [Lottery HUD](https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_lottery/Lottery.tsx): `src/panorama/react/hud_lottery/Lottery.tsx`
- [Main HUD](https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/HudMain.tsx): `src/panorama/react/hud_main/HudMain.tsx`
- [Page Navigation](https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/store/NavigationContext.tsx): `src/panorama/react/hud_main/store/NavigationContext.tsx`
- [Page Router](https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/router/PageRouter.tsx): `src/panorama/react/hud_main/router/PageRouter.tsx`
- [Player Profile](https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/pages/profile/ProfilePage.tsx): `src/panorama/react/hud_main/pages/profile/ProfilePage.tsx`
- [Awaken Features](https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/pages/profile/tabs/AwakenTab.tsx): `src/panorama/react/hud_main/pages/profile/tabs/AwakenTab.tsx`
- [Daily Tasks](https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/pages/profile/tabs/dailytask/DailyTaskTab.tsx): `src/panorama/react/hud_main/pages/profile/tabs/dailytask/DailyTaskTab.tsx`
- [Membership](https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/pages/profile/tabs/member/MemberTab.tsx): `src/panorama/react/hud_main/pages/profile/tabs/member/MemberTab.tsx`
- [Alipay Orders](https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/pages/profile/tabs/member/alipay/useAlipayOrder.ts): `src/panorama/react/hud_main/pages/profile/tabs/member/alipay/useAlipayOrder.ts`
- [In-Game Shop](https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/hud_main/pages/shop/ShopPage.tsx): `src/panorama/react/hud_main/pages/shop/ShopPage.tsx`
- [Net Table Hook](https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/shared/hooks/useNetTable.ts): `src/panorama/react/shared/hooks/useNetTable.ts`
- [Offline State](https://github.com/windy10v10ai/game/blob/develop/src/panorama/react/shared/hooks/useDataOffline.ts): `src/panorama/react/shared/hooks/useDataOffline.ts`

### APIs and Analytics

- [API Client](https://github.com/windy10v10ai/game/blob/develop/src/vscripts/api/api-client.ts): `src/vscripts/api/api-client.ts`
- [API Routes](https://github.com/windy10v10ai/game/blob/develop/src/vscripts/api/api-route.ts): `src/vscripts/api/api-route.ts`
- [Alipay Service](https://github.com/windy10v10ai/game/blob/develop/src/vscripts/api/alipay.ts): `src/vscripts/api/alipay.ts`
- [Game Analytics](https://github.com/windy10v10ai/game/blob/develop/src/vscripts/api/analytics/ga4/ga4.ts): `src/vscripts/api/analytics/ga4/ga4.ts`

### Shared Contracts

- [Shared Events](https://github.com/windy10v10ai/game/blob/develop/src/common/events.d.ts): `src/common/events.d.ts`
- [Shared Net Tables](https://github.com/windy10v10ai/game/blob/develop/src/common/net_tables.d.ts): `src/common/net_tables.d.ts`

### Other components

- **Dota Player**

## Connections

- Dota Player → Main HUD: uses
- Page Navigation → Page Router: selects page (evidence: `src/panorama/react/hud_main/router/PageRouter.tsx`)
- Page Router → Player Profile: renders (evidence: `src/panorama/react/hud_main/router/PageRouter.tsx`)
- Page Router → In-Game Shop: renders (evidence: `src/panorama/react/hud_main/router/PageRouter.tsx`)
- Player Profile → Awaken Features: renders tab (evidence: `src/panorama/react/hud_main/pages/profile/ProfilePage.tsx`)
- Player Profile → Daily Tasks: renders tab (evidence: `src/panorama/react/hud_main/pages/profile/ProfilePage.tsx`)
- Player Profile → Membership: renders tab (evidence: `src/panorama/react/hud_main/pages/profile/ProfilePage.tsx`)
- Membership → Alipay Orders: uses order hook
- Alipay Orders → Net Table Hook: subscribes (evidence: `src/panorama/react/hud_main/pages/profile/tabs/member/alipay/useAlipayOrder.ts`)
- Player Profile → Net Table Hook: reads player data (evidence: `src/panorama/react/hud_main/pages/profile/ProfilePage.tsx`)
- Offline State → Net Table Hook: reads status (evidence: `src/panorama/react/shared/hooks/useDataOffline.ts`)
- API Client → API Routes: selects target (evidence: `src/vscripts/api/api-client.ts`)
- Alipay Orders → Alipay Service: sends order events
- Bot AI → Team Strategy: coordinates
- Bot AI → Hero Behavior: controls
- Bot AI → Ability Logic: dispatches abilities
- Ability Logic → Cast Conditions: checks casts (evidence: `src/vscripts/ai/ability/ability-spec.ts`)
- Bot AI → Item Builds: manages purchases
- Game Modules → Kill Events: registers modules
- Kill Events → Creep Buffs: tracks tower status (evidence: `src/vscripts/modules/event/game-in-progress/creep-buff-manager.ts`)
- Game Modules → Hero Properties: initializes
- Dota Player → Bot AI: plays against
