# 2431540225-ai/qlclub_py architecture

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

- Interactive diagram: https://gitdiagram.com/2431540225-ai/qlclub_py
- Repository: https://github.com/2431540225-ai/qlclub_py

## Overview

ClubHub is a Django web app for managing student-club members, events, attendance, and tasks, with optional AI assistance for announcements and meeting minutes. Members register and use authenticated pages; officers can manage events and tasks, generate event check-in QR codes, and request AI drafts or summaries. Requests are routed to club views, which validate forms and use the club data models. The excerpts show these view-to-module relationships; unsampled template behavior and database backend details are not inferred.

Main entry points: [`clubs/views.py`](https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/views.py) (Club views), [`clubs/ai.py`](https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/ai.py) (AI drafting), [`config/urls.py`](https://github.com/2431540225-ai/qlclub_py/blob/main/config/urls.py) (Site routes), [`clubs/urls.py`](https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/urls.py) (Club routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Web routing"]
  node_site_routes["Site routes<br/>[urls.py]"]
  node_club_routes["Club routes<br/>[urls.py]"]
end

subgraph group_operations["Club operations"]
  node_views["Club views<br/>[views.py]"]
  node_forms["Input forms<br/>[forms.py]"]
  node_templates["Page templates"]
  node_membership["Member accounts<br/>[views.py]"]
  node_events["Event management<br/>[views.py]"]
  node_checkin["QR attendance<br/>[views.py]"]
  node_tasks["Task management<br/>[views.py]"]
end

subgraph group_domain["Domain data"]
  node_models["Club models<br/>[models.py]"]
  node_database[("Configured database")]
end

subgraph group_ai["AI assistance"]
  node_minutes["Minutes summaries<br/>[views.py]"]
  node_ai_helpers["AI drafting<br/>[ai.py]"]
  node_anthropic["Anthropic API"]
end

node_user(("Club user"))

node_user -.->|"sends requests"| node_site_routes
node_site_routes -->|"includes routes"| node_club_routes
node_club_routes -->|"dispatches to"| node_views
node_views -->|"validates with"| node_forms
node_views -->|"renders"| node_templates
node_views -->|"handles accounts"| node_membership
node_views -->|"handles events"| node_events
node_views -->|"handles check-in"| node_checkin
node_views -->|"handles tasks"| node_tasks
node_views -->|"requests summary"| node_minutes
node_minutes -->|"calls summarizer"| node_ai_helpers
node_events -->|"requests draft"| node_ai_helpers
node_ai_helpers -->|"calls when configured"| node_anthropic
node_views -->|"queries and updates"| node_models
node_models -.->|"persists through ORM"| node_database

click node_site_routes "https://github.com/2431540225-ai/qlclub_py/blob/main/config/urls.py"
click node_club_routes "https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/urls.py"
click node_views "https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/views.py"
click node_forms "https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/forms.py"
click node_templates "https://github.com/2431540225-ai/qlclub_py/tree/main/clubs/templates"
click node_membership "https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/views.py"
click node_events "https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/views.py"
click node_checkin "https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/views.py"
click node_tasks "https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/views.py"
click node_minutes "https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/views.py"
click node_ai_helpers "https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/ai.py"
click node_models "https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/models.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_site_routes,node_club_routes,node_user toneBlue
class node_views,node_forms,node_templates,node_membership,node_events,node_checkin,node_tasks toneAmber
class node_models,node_database toneMint
class node_minutes,node_ai_helpers,node_anthropic toneRose
```

## Components

### Web routing

- [Site routes](https://github.com/2431540225-ai/qlclub_py/blob/main/config/urls.py): `config/urls.py`
- [Club routes](https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/urls.py): `clubs/urls.py`

### Club operations

- [Club views](https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/views.py): `clubs/views.py`
- [Input forms](https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/forms.py): `clubs/forms.py`
- [Page templates](https://github.com/2431540225-ai/qlclub_py/tree/main/clubs/templates): `clubs/templates`
- [Member accounts](https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/views.py): `clubs/views.py`
- [Event management](https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/views.py): `clubs/views.py`
- [QR attendance](https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/views.py): `clubs/views.py`
- [Task management](https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/views.py): `clubs/views.py`

### Domain data

- [Club models](https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/models.py): `clubs/models.py`
- **Configured database**

### AI assistance

- [Minutes summaries](https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/views.py): `clubs/views.py`
- [AI drafting](https://github.com/2431540225-ai/qlclub_py/blob/main/clubs/ai.py): `clubs/ai.py`
- **Anthropic API**

### Other components

- **Club user**

## Connections

- Club user → Site routes: sends requests
- Site routes → Club routes: includes routes (evidence: `config/urls.py`)
- Club routes → Club views: dispatches to (evidence: `clubs/urls.py`)
- Club views → Input forms: validates with (evidence: `clubs/views.py`)
- Club views → Page templates: renders (evidence: `clubs/views.py`)
- Club views → Member accounts: handles accounts (evidence: `clubs/views.py`)
- Club views → Event management: handles events (evidence: `clubs/views.py`)
- Club views → QR attendance: handles check-in (evidence: `clubs/views.py`)
- Club views → Task management: handles tasks (evidence: `clubs/views.py`)
- Club views → Minutes summaries: requests summary (evidence: `clubs/views.py`)
- Minutes summaries → AI drafting: calls summarizer (evidence: `clubs/views.py`)
- Event management → AI drafting: requests draft (evidence: `clubs/views.py`)
- AI drafting → Anthropic API: calls when configured (evidence: `clubs/ai.py`)
- Club views → Club models: queries and updates (evidence: `clubs/views.py`)
- Club models → Configured database: persists through ORM
