# monster-qianmu/qxbanxiaozhu architecture

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

- Interactive diagram: https://gitdiagram.com/monster-qianmu/qxbanxiaozhu
- Repository: https://github.com/monster-qianmu/qxbanxiaozhu

## Overview

QX班小助 is a Windows desktop tool for classroom and dormitory administration. The main workflow imports student records and matches photos, then supports record editing and produces seating charts, dormitory assignments, printable tags, and processed portraits. The README also documents Excel/PDF exports, a downloadable background-removal model, and operational logs. The sampled implementation is concentrated in main.py; feature boundaries below describe documented responsibilities, not independently verified modules. Packaging and manual-generation code are excluded.

Main entry points: [`main.py`](https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py) (Desktop App)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Student Workflow"]
  node_desktop["Desktop App<br/>[main.py]"]
  node_student_import["Student Import<br/>[main.py]"]
  node_student_records["Student Records<br/>[main.py]"]
  node_photo_matching["Photo Matching<br/>[main.py]"]
  node_photo_processing["Photo Processing<br/>[main.py]"]
end

subgraph group_classroom["Classroom Outputs"]
  node_seat_editor["Seat Layout Editor<br/>[main.py]"]
  node_seat_pdf["Seat Chart PDF<br/>[main.py]"]
end

subgraph group_dormitory["Dormitory Outputs"]
  node_dorm_roster["Dorm Assignment<br/>[main.py]"]
  node_dorm_excel["Dorm Roster Excel<br/>[main.py]"]
  node_dorm_tags["Dorm Name Tags<br/>[main.py]"]
  node_bed_tags["Bed Cabinet Tags<br/>[main.py]"]
end

subgraph group_support["App Support"]
  node_model_service["Model Download"]
  node_app_config[("App Configuration<br/>[main.py]")]
  node_operation_logs["Operation Logs<br/>[main.py]"]
end

node_staff(("School Staff"))
node_source_excel["Student Excel"]
node_updated_excel["Updated Roster"]

node_staff -->|"uses"| node_desktop
node_desktop -->|"opens"| node_student_import
node_student_import -->|"reads"| node_source_excel
node_student_import -->|"loads records"| node_student_records
node_desktop -->|"edits"| node_student_records
node_desktop -->|"matches photos"| node_photo_matching
node_photo_matching -->|"binds portraits"| node_student_records
node_desktop -->|"opens"| node_photo_processing
node_photo_processing -.->|"downloads model"| node_model_service
node_student_records -->|"exports"| node_updated_excel
node_desktop -->|"opens"| node_seat_editor
node_seat_editor -->|"exports"| node_seat_pdf
node_desktop -->|"opens"| node_dorm_roster
node_dorm_roster -->|"exports"| node_dorm_excel
node_desktop -->|"opens"| node_dorm_tags
node_dorm_tags -->|"exports"| node_bed_tags
node_desktop -->|"stores settings"| node_app_config
node_desktop -->|"records activity"| node_operation_logs

click node_desktop "https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py"
click node_student_import "https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py"
click node_student_records "https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py"
click node_photo_matching "https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py"
click node_photo_processing "https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py"
click node_seat_editor "https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py"
click node_seat_pdf "https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py"
click node_dorm_roster "https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py"
click node_dorm_excel "https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py"
click node_dorm_tags "https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py"
click node_bed_tags "https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py"
click node_app_config "https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py"
click node_operation_logs "https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py"

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_desktop,node_student_import,node_student_records,node_photo_matching,node_photo_processing toneBlue
class node_seat_editor,node_seat_pdf toneAmber
class node_dorm_roster,node_dorm_excel,node_dorm_tags,node_bed_tags toneMint
class node_model_service,node_app_config,node_operation_logs toneRose
class node_staff,node_source_excel,node_updated_excel toneIndigo
```

## Components

### Student Workflow

- [Desktop App](https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py): `main.py`
- [Student Import](https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py): `main.py`
- [Student Records](https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py): `main.py`
- [Photo Matching](https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py): `main.py`
- [Photo Processing](https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py): `main.py`

### Classroom Outputs

- [Seat Layout Editor](https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py): `main.py`
- [Seat Chart PDF](https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py): `main.py`

### Dormitory Outputs

- [Dorm Assignment](https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py): `main.py`
- [Dorm Roster Excel](https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py): `main.py`
- [Dorm Name Tags](https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py): `main.py`
- [Bed Cabinet Tags](https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py): `main.py`

### App Support

- **Model Download**
- [App Configuration](https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py): `main.py`
- [Operation Logs](https://github.com/monster-qianmu/qxbanxiaozhu/blob/main/main.py): `main.py`

### Other components

- **School Staff**
- **Student Excel**
- **Updated Roster**

## Connections

- School Staff → Desktop App: uses (evidence: `README.md`)
- Desktop App → Student Import: opens (evidence: `README.md`)
- Student Import → Student Excel: reads (evidence: `README.md`)
- Student Import → Student Records: loads records (evidence: `README.md`)
- Desktop App → Student Records: edits (evidence: `README.md`)
- Desktop App → Photo Matching: matches photos (evidence: `README.md`)
- Photo Matching → Student Records: binds portraits (evidence: `README.md`)
- Desktop App → Photo Processing: opens (evidence: `README.md`)
- Photo Processing → Model Download: downloads model (evidence: `README.md`)
- Student Records → Updated Roster: exports (evidence: `README.md`)
- Desktop App → Seat Layout Editor: opens (evidence: `README.md`)
- Seat Layout Editor → Seat Chart PDF: exports (evidence: `README.md`)
- Desktop App → Dorm Assignment: opens (evidence: `README.md`)
- Dorm Assignment → Dorm Roster Excel: exports (evidence: `README.md`)
- Desktop App → Dorm Name Tags: opens (evidence: `README.md`)
- Dorm Name Tags → Bed Cabinet Tags: exports (evidence: `README.md`)
- Desktop App → App Configuration: stores settings (evidence: `main.py`)
- Desktop App → Operation Logs: records activity (evidence: `README.md`)
