# 24ct1-nguyenvanhao/congnghephanmen architecture

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

- Interactive diagram: https://gitdiagram.com/24ct1-nguyenvanhao/congnghephanmen
- Repository: https://github.com/24ct1-nguyenvanhao/congnghephanmen

## Overview

SáchGóc Uni is a student marketplace for selling or giving away study goods. Its main workflow runs from browsing or posting listings through moderation and order decisions to completion; profiles, comments, favorites, reviews, and reports support trust and discovery. The graph also includes the documented administration and sample-data/image branches. Some template and routing details are unsampled, so those connections are omitted or marked unverified rather than inferred.

Main entry points: [`app_main/models.py`](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/models.py) (Marketplace records), [`app_main/views.py`](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/views.py) (Browse listings), [`seed_data.py`](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/seed_data.py) (Sample data loader), [`app_main/urls.py`](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/urls.py) (URL routing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_routes["URL routing<br/>[urls.py]"]
  node_pages["Marketplace pages"]
  node_scripts["Page interactions<br/>[main.js]"]
  node_sitecontext["Shared site context"]
end

subgraph group_market["Marketplace workflows"]
  node_listing["Browse listings<br/>[views.py]"]
  node_listingforms["Listing forms<br/>[forms.py]"]
  node_orders["Order workflow<br/>[views.py]"]
end

subgraph group_trust["Trust and moderation"]
  node_community["Comments and favorites<br/>[views.py]"]
  node_reputation["Profiles and reviews<br/>[models.py]"]
  node_reports["Reports and moderation<br/>[admin.py]"]
  node_admin["Marketplace admin<br/>[admin.py]"]
end

subgraph group_data["Data and accounts"]
  node_forms["Input validation<br/>[forms.py]"]
  node_models["Marketplace records<br/>[models.py]"]
  node_database[("SQL database")]
  node_profilesignal["Profile creation signal<br/>[signals.py]"]
  node_appconfig["App startup<br/>[apps.py]"]
end

subgraph group_samples["Sample assets"]
  node_seed["Sample data loader<br/>[seed_data.py]"]
  node_generated["Illustration generator<br/>[generate_images.py]"]
  node_downloaded["Openverse image fetch<br/>[download_images.py]"]
end

node_student(("Student"))

node_student -->|"requests pages"| node_routes
node_routes -->|"dispatches to"| node_listing
node_listing -->|"validates with"| node_forms
node_listing -->|"queries and updates"| node_models
node_orders -->|"validates decisions"| node_forms
node_orders -->|"updates orders"| node_models
node_community -->|"stores interactions"| node_models
node_reputation -->|"uses marketplace records"| node_models
node_reports -->|"manages reports"| node_models
node_admin -->|"moderates records"| node_models
node_models -->|"persists through ORM"| node_database
node_appconfig -->|"loads signal"| node_profilesignal
node_profilesignal -->|"creates profiles"| node_models
node_sitecontext -->|"reads shared data"| node_models
node_listing -.->|"renders pages"| node_pages
node_student -.->|"uses interactions"| node_scripts
node_seed -->|"creates sample records"| node_models
node_seed -.->|"uses generated images"| node_generated
node_downloaded -.->|"fetches image candidates"| node_student

click node_routes "https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/urls.py"
click node_pages "https://github.com/24ct1-nguyenvanhao/congnghephanmen/tree/main/templates/app_main"
click node_scripts "https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/static/js/main.js"
click node_listing "https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/views.py"
click node_listingforms "https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/forms.py"
click node_orders "https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/views.py"
click node_community "https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/views.py"
click node_reputation "https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/models.py"
click node_reports "https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/admin.py"
click node_admin "https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/admin.py"
click node_forms "https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/forms.py"
click node_models "https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/models.py"
click node_profilesignal "https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/signals.py"
click node_appconfig "https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/apps.py"
click node_sitecontext "https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/context_processors.py"
click node_seed "https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/seed_data.py"
click node_generated "https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/generate_images.py"
click node_downloaded "https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/download_images.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_routes,node_pages,node_scripts,node_sitecontext toneBlue
class node_listing,node_listingforms,node_orders toneAmber
class node_community,node_reputation,node_reports,node_admin toneMint
class node_forms,node_models,node_database,node_profilesignal,node_appconfig toneRose
class node_seed,node_generated,node_downloaded,node_student toneIndigo
```

## Components

### Web experience

- [URL routing](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/urls.py): `app_main/urls.py`
- [Marketplace pages](https://github.com/24ct1-nguyenvanhao/congnghephanmen/tree/main/templates/app_main): `templates/app_main`
- [Page interactions](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/static/js/main.js): `static/js/main.js`
- [Shared site context](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/context_processors.py): `app_main/context_processors.py`

### Marketplace workflows

- [Browse listings](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/views.py): `app_main/views.py`
- [Listing forms](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/forms.py): `app_main/forms.py`
- [Order workflow](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/views.py): `app_main/views.py`

### Trust and moderation

- [Comments and favorites](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/views.py): `app_main/views.py`
- [Profiles and reviews](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/models.py): `app_main/models.py`
- [Reports and moderation](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/admin.py): `app_main/admin.py`
- [Marketplace admin](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/admin.py): `app_main/admin.py`

### Data and accounts

- [Input validation](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/forms.py): `app_main/forms.py`
- [Marketplace records](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/models.py): `app_main/models.py`
- **SQL database**
- [Profile creation signal](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/signals.py): `app_main/signals.py`
- [App startup](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/app_main/apps.py): `app_main/apps.py`

### Sample assets

- [Sample data loader](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/seed_data.py): `seed_data.py`
- [Illustration generator](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/generate_images.py): `generate_images.py`
- [Openverse image fetch](https://github.com/24ct1-nguyenvanhao/congnghephanmen/blob/main/download_images.py): `download_images.py`

### Other components

- **Student**

## Connections

- Student → URL routing: requests pages (evidence: `README.md`)
- URL routing → Browse listings: dispatches to (evidence: `app_main/urls.py`)
- Browse listings → Input validation: validates with (evidence: `app_main/views.py`)
- Browse listings → Marketplace records: queries and updates (evidence: `app_main/views.py`)
- Order workflow → Input validation: validates decisions (evidence: `app_main/views.py`)
- Order workflow → Marketplace records: updates orders (evidence: `README.md`)
- Comments and favorites → Marketplace records: stores interactions (evidence: `app_main/views.py`)
- Profiles and reviews → Marketplace records: uses marketplace records (evidence: `app_main/models.py`)
- Reports and moderation → Marketplace records: manages reports (evidence: `app_main/admin.py`)
- Marketplace admin → Marketplace records: moderates records (evidence: `app_main/admin.py`)
- Marketplace records → SQL database: persists through ORM (evidence: `app_main/models.py`)
- App startup → Profile creation signal: loads signal (evidence: `app_main/apps.py`)
- Profile creation signal → Marketplace records: creates profiles (evidence: `app_main/signals.py`)
- Shared site context → Marketplace records: reads shared data (evidence: `app_main/context_processors.py`)
- Browse listings → Marketplace pages: renders pages
- Student → Page interactions: uses interactions
- Sample data loader → Marketplace records: creates sample records (evidence: `seed_data.py`)
- Sample data loader → Illustration generator: uses generated images (evidence: `seed_data.py`)
- Openverse image fetch → Student: fetches image candidates (evidence: `download_images.py`)
