# vhinas07-rgb/schoolpj architecture

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

- Interactive diagram: https://gitdiagram.com/vhinas07-rgb/schoolpj
- Repository: https://github.com/vhinas07-rgb/schoolpj

## Overview

This is a Django course-catalog site. Visitors can browse courses, optionally filter by category, and open an active course’s detail page. URL configuration dispatches requests to the catalog views, which query course/category models and render HTML templates. Staff can manage courses and categories through Django admin. The sampled code establishes these main paths; it does not show the template contents or the runtime database operations beyond the ORM queries and SQLite configuration.

Main entry points: [`courses/views.py`](https://github.com/vhinas07-rgb/schoolpj/blob/main/courses/views.py) (Catalog views), [`courses/models.py`](https://github.com/vhinas07-rgb/schoolpj/blob/main/courses/models.py) (Courses and categories), [`schoolpj/urls.py`](https://github.com/vhinas07-rgb/schoolpj/blob/main/schoolpj/urls.py) (Project routes), [`courses/urls.py`](https://github.com/vhinas07-rgb/schoolpj/blob/main/courses/urls.py) (Course routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Course catalog"]
  node_catalog_views["Catalog views<br/>[views.py]"]
  node_home_template["Catalog page<br/>[home.html]"]
  node_detail_template["Course detail<br/>[detail.html]"]
end

subgraph group_content["Catalog content"]
  node_course_data["Courses and categories<br/>[models.py]"]
  node_catalog_db[("SQLite database")]
  node_admin["Course admin<br/>[admin.py]"]
end

subgraph group_platform["Django platform"]
  node_project_routes["Project routes<br/>[urls.py]"]
  node_course_routes["Course routes<br/>[urls.py]"]
end

node_visitor(("Visitor"))
node_staff(("Staff user"))

node_visitor -->|"requests pages"| node_project_routes
node_project_routes -->|"includes routes"| node_course_routes
node_course_routes -->|"dispatches requests"| node_catalog_views
node_catalog_views -->|"queries courses"| node_course_data
node_catalog_views -->|"renders results"| node_home_template
node_catalog_views -->|"renders course"| node_detail_template
node_course_data -.->|"stored via ORM"| node_catalog_db
node_staff -->|"opens admin"| node_project_routes
node_admin -->|"registers models"| node_course_data

click node_project_routes "https://github.com/vhinas07-rgb/schoolpj/blob/main/schoolpj/urls.py"
click node_course_routes "https://github.com/vhinas07-rgb/schoolpj/blob/main/courses/urls.py"
click node_catalog_views "https://github.com/vhinas07-rgb/schoolpj/blob/main/courses/views.py"
click node_home_template "https://github.com/vhinas07-rgb/schoolpj/blob/main/templates/home.html"
click node_detail_template "https://github.com/vhinas07-rgb/schoolpj/blob/main/templates/detail.html"
click node_course_data "https://github.com/vhinas07-rgb/schoolpj/blob/main/courses/models.py"
click node_admin "https://github.com/vhinas07-rgb/schoolpj/blob/main/courses/admin.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_catalog_views,node_home_template,node_detail_template,node_staff toneBlue
class node_course_data,node_catalog_db,node_admin toneAmber
class node_project_routes,node_course_routes toneMint
class node_visitor toneIndigo
```

## Components

### Course catalog

- [Catalog views](https://github.com/vhinas07-rgb/schoolpj/blob/main/courses/views.py): `courses/views.py`
- [Catalog page](https://github.com/vhinas07-rgb/schoolpj/blob/main/templates/home.html): `templates/home.html`
- [Course detail](https://github.com/vhinas07-rgb/schoolpj/blob/main/templates/detail.html): `templates/detail.html`

### Catalog content

- [Courses and categories](https://github.com/vhinas07-rgb/schoolpj/blob/main/courses/models.py): `courses/models.py`
- **SQLite database**
- [Course admin](https://github.com/vhinas07-rgb/schoolpj/blob/main/courses/admin.py): `courses/admin.py`

### Django platform

- [Project routes](https://github.com/vhinas07-rgb/schoolpj/blob/main/schoolpj/urls.py): `schoolpj/urls.py`
- [Course routes](https://github.com/vhinas07-rgb/schoolpj/blob/main/courses/urls.py): `courses/urls.py`

### Other components

- **Visitor**
- **Staff user**

## Connections

- Visitor → Project routes: requests pages (evidence: `schoolpj/urls.py`)
- Project routes → Course routes: includes routes (evidence: `schoolpj/urls.py`)
- Course routes → Catalog views: dispatches requests (evidence: `courses/urls.py`)
- Catalog views → Courses and categories: queries courses (evidence: `courses/views.py`)
- Catalog views → Catalog page: renders results (evidence: `courses/views.py`)
- Catalog views → Course detail: renders course (evidence: `courses/views.py`)
- Courses and categories → SQLite database: stored via ORM
- Staff user → Project routes: opens admin (evidence: `schoolpj/urls.py`)
- Course admin → Courses and categories: registers models (evidence: `courses/admin.py`)
