# civfanatics/cqui_community-edition architecture

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

- Interactive diagram: https://gitdiagram.com/civfanatics/cqui_community-edition
- Repository: https://github.com/civfanatics/cqui_community-edition

## Overview

CQUI is a Civilization VI interface mod for managing an empire with fewer clicks. The user-facing workflow spans city production and banners, diplomacy and trade, research and policy decisions, and map/unit interactions; settings allow customization. The graph preserves the README’s major feature areas and integrated deal/trade screens. Paths identify corresponding files or directories from the tree, but no source excerpts were provided, so internal calls and data flows cannot be verified and are omitted.

Main entry points: [`Assets/UI/Panels/citypanel.lua`](https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/Panels/citypanel.lua) (City View), [`Assets/UI/Panels/productionpanel_CQUI.lua`](https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/Panels/productionpanel_CQUI.lua) (Production Panel), [`Assets/UI/WorldView/CityBannerManager_CQUI.lua`](https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/WorldView/CityBannerManager_CQUI.lua) (City Banners), [`Assets/UI/PartialScreens/citystates_CQUI.lua`](https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/PartialScreens/citystates_CQUI.lua) (City-State Panel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_city["City Management"]
  node_cityview["City View<br/>[citypanel.lua]"]
  node_production["Production Panel"]
  node_citybanners["City Banners"]
  node_citystates["City-State Panel"]
  node_citizens["Citizen Management"]
end

subgraph group_world["World Interface"]
  node_unitflags["Unit Flags"]
  node_mapinteraction["Map Interaction"]
  node_mappins["Map Pins"]
  node_lenses["Map Lenses<br/>[LensSupport.lua]"]
  node_plotinfo["Plot Tooltips<br/>[plotinfo_CQUI.lua]"]
  node_topbar["Top Bar"]
end

subgraph group_decisions["Decisions and Reference"]
  node_research["Research Trees<br/>[TechTree_CQUI.lua]"]
  node_civicstree["Civics Tree"]
  node_civilopedia["Civilopedia"]
  node_policyreminder["Policy Reminder"]
  node_greatpeople["Great People"]
  node_settings["Mod Settings<br/>[Options_CQUI.lua]"]
end

subgraph group_integrations["Diplomacy and Trade"]
  node_dealview["Deal Screen"]
  node_tradescreen["Trade Screens<br/>[tradeoverview.lua]"]
end

node_player(("Player"))

node_player -->|"manage cities"| node_cityview
node_player -->|"manage production"| node_production
node_player -->|"inspect banners"| node_citybanners
node_player -->|"review city-states"| node_citystates
node_player -->|"manage citizens"| node_citizens
node_player -->|"inspect units"| node_unitflags
node_player -->|"use map"| node_mapinteraction
node_player -->|"place pins"| node_mappins
node_player -->|"inspect lenses"| node_lenses
node_player -->|"inspect plots"| node_plotinfo
node_player -->|"check resources"| node_topbar
node_player -->|"review research"| node_research
node_player -->|"review civics"| node_civicstree
node_player -->|"search reference"| node_civilopedia
node_player -->|"review policies"| node_policyreminder
node_player -->|"review people"| node_greatpeople
node_player -->|"customize settings"| node_settings
node_player -->|"negotiate deals"| node_dealview
node_player -->|"manage routes"| node_tradescreen

click node_cityview "https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/Panels/citypanel.lua"
click node_production "https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/Panels/productionpanel_CQUI.lua"
click node_citybanners "https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/WorldView/CityBannerManager_CQUI.lua"
click node_citystates "https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/PartialScreens/citystates_CQUI.lua"
click node_citizens "https://github.com/civfanatics/cqui_community-edition/blob/main/Integrations/ML/Lenses/CQUI_CitizenManagement/ModLens_CQUI_CitizenManagement.lua"
click node_unitflags "https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/unitflagmanager_CQUI.lua"
click node_mapinteraction "https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/worldinput_CQUI.lua"
click node_mappins "https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/MapPinManager_CQUI.lua"
click node_lenses "https://github.com/civfanatics/cqui_community-edition/blob/main/Integrations/ML/Lenses/LensSupport.lua"
click node_plotinfo "https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/WorldView/plotinfo_CQUI.lua"
click node_topbar "https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/toppanel_CQUI_basegame.lua"
click node_research "https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/Screens/TechTree_CQUI.lua"
click node_civicstree "https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/Screens/CivicsTree_CQUI.lua"
click node_civilopedia "https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/Civilopedia/civilopediascreen.lua"
click node_policyreminder "https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/Popups/policyreminderpopup.lua"
click node_greatpeople "https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/Popups/greatpeoplepopup.lua"
click node_settings "https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/Options_CQUI.lua"
click node_dealview "https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/DiplomacyDealView_CQUI.lua"
click node_tradescreen "https://github.com/civfanatics/cqui_community-edition/blob/main/Integrations/BTS/UI/tradeoverview.lua"

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_cityview,node_production,node_citybanners,node_citystates,node_citizens toneBlue
class node_unitflags,node_mapinteraction,node_mappins,node_lenses,node_plotinfo,node_topbar toneAmber
class node_research,node_civicstree,node_civilopedia,node_policyreminder,node_greatpeople,node_settings toneMint
class node_dealview,node_tradescreen toneRose
class node_player toneIndigo
```

## Components

### City Management

- [City View](https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/Panels/citypanel.lua): `Assets/UI/Panels/citypanel.lua`
- [Production Panel](https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/Panels/productionpanel_CQUI.lua): `Assets/UI/Panels/productionpanel_CQUI.lua`
- [City Banners](https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/WorldView/CityBannerManager_CQUI.lua): `Assets/UI/WorldView/CityBannerManager_CQUI.lua`
- [City-State Panel](https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/PartialScreens/citystates_CQUI.lua): `Assets/UI/PartialScreens/citystates_CQUI.lua`
- [Citizen Management](https://github.com/civfanatics/cqui_community-edition/blob/main/Integrations/ML/Lenses/CQUI_CitizenManagement/ModLens_CQUI_CitizenManagement.lua): `Integrations/ML/Lenses/CQUI_CitizenManagement/ModLens_CQUI_CitizenManagement.lua`

### World Interface

- [Unit Flags](https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/unitflagmanager_CQUI.lua): `Assets/UI/unitflagmanager_CQUI.lua`
- [Map Interaction](https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/worldinput_CQUI.lua): `Assets/UI/worldinput_CQUI.lua`
- [Map Pins](https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/MapPinManager_CQUI.lua): `Assets/UI/MapPinManager_CQUI.lua`
- [Map Lenses](https://github.com/civfanatics/cqui_community-edition/blob/main/Integrations/ML/Lenses/LensSupport.lua): `Integrations/ML/Lenses/LensSupport.lua`
- [Plot Tooltips](https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/WorldView/plotinfo_CQUI.lua): `Assets/UI/WorldView/plotinfo_CQUI.lua`
- [Top Bar](https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/toppanel_CQUI_basegame.lua): `Assets/UI/toppanel_CQUI_basegame.lua`

### Decisions and Reference

- [Research Trees](https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/Screens/TechTree_CQUI.lua): `Assets/UI/Screens/TechTree_CQUI.lua`
- [Civics Tree](https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/Screens/CivicsTree_CQUI.lua): `Assets/UI/Screens/CivicsTree_CQUI.lua`
- [Civilopedia](https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/Civilopedia/civilopediascreen.lua): `Assets/UI/Civilopedia/civilopediascreen.lua`
- [Policy Reminder](https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/Popups/policyreminderpopup.lua): `Assets/UI/Popups/policyreminderpopup.lua`
- [Great People](https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/Popups/greatpeoplepopup.lua): `Assets/UI/Popups/greatpeoplepopup.lua`
- [Mod Settings](https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/Options_CQUI.lua): `Assets/UI/Options_CQUI.lua`

### Diplomacy and Trade

- [Deal Screen](https://github.com/civfanatics/cqui_community-edition/blob/main/Assets/UI/DiplomacyDealView_CQUI.lua): `Assets/UI/DiplomacyDealView_CQUI.lua`
- [Trade Screens](https://github.com/civfanatics/cqui_community-edition/blob/main/Integrations/BTS/UI/tradeoverview.lua): `Integrations/BTS/UI/tradeoverview.lua`

### Other components

- **Player**

## Connections

- Player → City View: manage cities (evidence: `README.md`)
- Player → Production Panel: manage production (evidence: `README.md`)
- Player → City Banners: inspect banners (evidence: `README.md`)
- Player → City-State Panel: review city-states (evidence: `README.md`)
- Player → Citizen Management: manage citizens (evidence: `README.md`)
- Player → Unit Flags: inspect units (evidence: `README.md`)
- Player → Map Interaction: use map (evidence: `README.md`)
- Player → Map Pins: place pins (evidence: `README.md`)
- Player → Map Lenses: inspect lenses (evidence: `README.md`)
- Player → Plot Tooltips: inspect plots (evidence: `README.md`)
- Player → Top Bar: check resources (evidence: `README.md`)
- Player → Research Trees: review research (evidence: `README.md`)
- Player → Civics Tree: review civics (evidence: `README.md`)
- Player → Civilopedia: search reference (evidence: `README.md`)
- Player → Policy Reminder: review policies (evidence: `README.md`)
- Player → Great People: review people (evidence: `README.md`)
- Player → Mod Settings: customize settings (evidence: `README.md`)
- Player → Deal Screen: negotiate deals (evidence: `README.md`)
- Player → Trade Screens: manage routes (evidence: `README.md`)
