# airusdev/student_system_python architecture

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

- Interactive diagram: https://gitdiagram.com/airusdev/student_system_python
- Repository: https://github.com/airusdev/student_system_python

## Overview

This is a command-line student record manager. A user selects a menu action, the system validates input and dispatches through the UI functions, and those functions call the data-access layer to add, update, delete, search, list, or sort student records. The data layer loads and saves JSON records, and creates student IDs. The README documents the menu-to-UI-to-data-access separation; sampled source confirms several calls and persistence behavior, but unsampled operations are represented only where documented.

Main entry points: [`utils.py`](https://github.com/airusdev/student_system_python/blob/master/utils.py) (Option dispatch), [`db_access.py`](https://github.com/airusdev/student_system_python/blob/master/db_access.py) (JSON data access), [`student_system.py`](https://github.com/airusdev/student_system_python/blob/master/student_system.py) (System loop), [`data/database.json`](https://github.com/airusdev/student_system_python/blob/master/data/database.json) (Student records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_loop["System loop<br/>[student_system.py]"]
end

subgraph group_ui["User interaction"]
  node_menu["Menu input<br/>[utils.py]"]
  node_dispatch["Option dispatch<br/>[utils.py]"]
  node_validation["Input validation<br/>[utils.py]"]
  node_add_ui["Add interaction<br/>[utils.py]"]
  node_update_ui["Update interaction<br/>[utils.py]"]
  node_delete_ui["Delete interaction<br/>[utils.py]"]
  node_search_ui["Search interaction<br/>[utils.py]"]
  node_list_ui["List interaction<br/>[utils.py]"]
  node_sort_ui["Sort interaction<br/>[utils.py]"]
end

subgraph group_domain["Student operations"]
  node_add["Add student<br/>[db_access.py]"]
  node_update["Update student<br/>[db_access.py]"]
  node_delete["Delete student<br/>[db_access.py]"]
  node_search["Search student<br/>[db_access.py]"]
  node_list["List students<br/>[db_access.py]"]
  node_sort["Sort students<br/>[db_access.py]"]
  node_idgen["Student ID generation<br/>[db_access.py]"]
end

subgraph group_storage["Persistence"]
  node_db["JSON data access<br/>[db_access.py]"]
  node_records[("Student records<br/>[database.json]")]
end

node_user(("User"))

node_user -->|"chooses option"| node_menu
node_loop -->|"requests choice"| node_menu
node_menu -->|"validates choice"| node_validation
node_loop -->|"dispatches choice"| node_dispatch
node_dispatch -->|"selects action"| node_add_ui
node_dispatch -->|"selects action"| node_update_ui
node_dispatch -->|"selects action"| node_delete_ui
node_dispatch -->|"selects action"| node_search_ui
node_dispatch -->|"selects action"| node_list_ui
node_dispatch -->|"selects action"| node_sort_ui
node_add_ui -->|"collects details"| node_validation
node_add_ui -->|"calls add"| node_add
node_update_ui -->|"calls update"| node_update
node_delete_ui -->|"calls delete"| node_delete
node_search_ui -->|"calls search"| node_search
node_list_ui -->|"calls listing"| node_list
node_sort_ui -->|"calls sorting"| node_sort
node_add -->|"creates identifier"| node_idgen
node_db -->|"loads and saves"| node_records
node_add -->|"persists record"| node_db
node_update -->|"persists changes"| node_db
node_delete -->|"persists changes"| node_db

click node_loop "https://github.com/airusdev/student_system_python/blob/master/student_system.py"
click node_menu "https://github.com/airusdev/student_system_python/blob/master/utils.py"
click node_dispatch "https://github.com/airusdev/student_system_python/blob/master/utils.py"
click node_validation "https://github.com/airusdev/student_system_python/blob/master/utils.py"
click node_add_ui "https://github.com/airusdev/student_system_python/blob/master/utils.py"
click node_update_ui "https://github.com/airusdev/student_system_python/blob/master/utils.py"
click node_delete_ui "https://github.com/airusdev/student_system_python/blob/master/utils.py"
click node_search_ui "https://github.com/airusdev/student_system_python/blob/master/utils.py"
click node_list_ui "https://github.com/airusdev/student_system_python/blob/master/utils.py"
click node_sort_ui "https://github.com/airusdev/student_system_python/blob/master/utils.py"
click node_add "https://github.com/airusdev/student_system_python/blob/master/db_access.py"
click node_update "https://github.com/airusdev/student_system_python/blob/master/db_access.py"
click node_delete "https://github.com/airusdev/student_system_python/blob/master/db_access.py"
click node_search "https://github.com/airusdev/student_system_python/blob/master/db_access.py"
click node_list "https://github.com/airusdev/student_system_python/blob/master/db_access.py"
click node_sort "https://github.com/airusdev/student_system_python/blob/master/db_access.py"
click node_idgen "https://github.com/airusdev/student_system_python/blob/master/db_access.py"
click node_db "https://github.com/airusdev/student_system_python/blob/master/db_access.py"
click node_records "https://github.com/airusdev/student_system_python/blob/master/data/database.json"

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_loop,node_user toneBlue
class node_menu,node_dispatch,node_validation,node_add_ui,node_update_ui,node_delete_ui,node_search_ui,node_list_ui,node_sort_ui toneAmber
class node_add,node_update,node_delete,node_search,node_list,node_sort,node_idgen toneMint
class node_db,node_records toneRose
```

## Components

### Application

- [System loop](https://github.com/airusdev/student_system_python/blob/master/student_system.py): `student_system.py`

### User interaction

- [Menu input](https://github.com/airusdev/student_system_python/blob/master/utils.py): `utils.py`
- [Option dispatch](https://github.com/airusdev/student_system_python/blob/master/utils.py): `utils.py`
- [Input validation](https://github.com/airusdev/student_system_python/blob/master/utils.py): `utils.py`
- [Add interaction](https://github.com/airusdev/student_system_python/blob/master/utils.py): `utils.py`
- [Update interaction](https://github.com/airusdev/student_system_python/blob/master/utils.py): `utils.py`
- [Delete interaction](https://github.com/airusdev/student_system_python/blob/master/utils.py): `utils.py`
- [Search interaction](https://github.com/airusdev/student_system_python/blob/master/utils.py): `utils.py`
- [List interaction](https://github.com/airusdev/student_system_python/blob/master/utils.py): `utils.py`
- [Sort interaction](https://github.com/airusdev/student_system_python/blob/master/utils.py): `utils.py`

### Student operations

- [Add student](https://github.com/airusdev/student_system_python/blob/master/db_access.py): `db_access.py`
- [Update student](https://github.com/airusdev/student_system_python/blob/master/db_access.py): `db_access.py`
- [Delete student](https://github.com/airusdev/student_system_python/blob/master/db_access.py): `db_access.py`
- [Search student](https://github.com/airusdev/student_system_python/blob/master/db_access.py): `db_access.py`
- [List students](https://github.com/airusdev/student_system_python/blob/master/db_access.py): `db_access.py`
- [Sort students](https://github.com/airusdev/student_system_python/blob/master/db_access.py): `db_access.py`
- [Student ID generation](https://github.com/airusdev/student_system_python/blob/master/db_access.py): `db_access.py`

### Persistence

- [JSON data access](https://github.com/airusdev/student_system_python/blob/master/db_access.py): `db_access.py`
- [Student records](https://github.com/airusdev/student_system_python/blob/master/data/database.json): `data/database.json`

### Other components

- **User**

## Connections

- User → Menu input: chooses option (evidence: `README.md`)
- System loop → Menu input: requests choice (evidence: `student_system.py`)
- Menu input → Input validation: validates choice (evidence: `utils.py`)
- System loop → Option dispatch: dispatches choice (evidence: `student_system.py`)
- Option dispatch → Add interaction: selects action (evidence: `README.md`)
- Option dispatch → Update interaction: selects action (evidence: `README.md`)
- Option dispatch → Delete interaction: selects action (evidence: `README.md`)
- Option dispatch → Search interaction: selects action (evidence: `README.md`)
- Option dispatch → List interaction: selects action (evidence: `README.md`)
- Option dispatch → Sort interaction: selects action (evidence: `README.md`)
- Add interaction → Input validation: collects details (evidence: `utils.py`)
- Add interaction → Add student: calls add (evidence: `utils.py`)
- Update interaction → Update student: calls update (evidence: `utils.py`)
- Delete interaction → Delete student: calls delete (evidence: `utils.py`)
- Search interaction → Search student: calls search (evidence: `utils.py`)
- List interaction → List students: calls listing (evidence: `utils.py`)
- Sort interaction → Sort students: calls sorting (evidence: `utils.py`)
- Add student → Student ID generation: creates identifier (evidence: `db_access.py`)
- JSON data access → Student records: loads and saves (evidence: `db_access.py`)
- Add student → JSON data access: persists record (evidence: `README.md`)
- Update student → JSON data access: persists changes (evidence: `README.md`)
- Delete student → JSON data access: persists changes (evidence: `README.md`)
