# justinberzamina/student_prototype architecture

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

- Interactive diagram: https://gitdiagram.com/justinberzamina/student_prototype
- Repository: https://github.com/justinberzamina/student_prototype

## Overview

This is a small PyQt student-management desktop app. At startup, main.py creates the database schema and wires the student service into the window. The user can add students through the form or view the student list; the view delegates these actions to the service, which uses a repository to write and read SQLite records. Student construction normalizes and validates name and email. The README is empty, so this map reflects the sampled source and tree only.

Main entry points: [`main.py`](https://github.com/justinberzamina/student_prototype/blob/main/main.py) (Application startup), [`features/students/view.py`](https://github.com/justinberzamina/student_prototype/blob/main/features/students/view.py) (Student window), [`features/students/repository.py`](https://github.com/justinberzamina/student_prototype/blob/main/features/students/repository.py) (Student repository), [`features/students/service.py`](https://github.com/justinberzamina/student_prototype/blob/main/features/students/service.py) (Student service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and UI"]
  node_entry["Application startup<br/>[main.py]"]
  node_view["Student window<br/>[view.py]"]
end

subgraph group_students["Student domain"]
  node_service["Student service<br/>[service.py]"]
  node_model["Student model<br/>[model.py]"]
end

subgraph group_persistence["Persistence"]
  node_repository["Student repository<br/>[repository.py]"]
  node_database["Database access<br/>[database.py]"]
end

node_user(("User"))
node_sqlite[("SQLite database")]

node_user -->|"starts"| node_entry
node_entry -->|"creates schema"| node_database
node_entry -->|"constructs"| node_service
node_entry -->|"opens"| node_view
node_user -->|"interacts"| node_view
node_view -->|"constructs"| node_model
node_view -->|"adds or lists"| node_service
node_service -->|"delegates"| node_repository
node_repository -->|"maps records"| node_model
node_repository -->|"queries"| node_database
node_database -->|"reads and writes"| node_sqlite

click node_entry "https://github.com/justinberzamina/student_prototype/blob/main/main.py"
click node_view "https://github.com/justinberzamina/student_prototype/blob/main/features/students/view.py"
click node_service "https://github.com/justinberzamina/student_prototype/blob/main/features/students/service.py"
click node_model "https://github.com/justinberzamina/student_prototype/blob/main/features/students/model.py"
click node_repository "https://github.com/justinberzamina/student_prototype/blob/main/features/students/repository.py"
click node_database "https://github.com/justinberzamina/student_prototype/blob/main/database/database.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_entry,node_view,node_user toneBlue
class node_service,node_model,node_sqlite toneAmber
class node_repository,node_database toneMint
```

## Components

### App and UI

- [Application startup](https://github.com/justinberzamina/student_prototype/blob/main/main.py): `main.py`
- [Student window](https://github.com/justinberzamina/student_prototype/blob/main/features/students/view.py): `features/students/view.py`

### Student domain

- [Student service](https://github.com/justinberzamina/student_prototype/blob/main/features/students/service.py): `features/students/service.py`
- [Student model](https://github.com/justinberzamina/student_prototype/blob/main/features/students/model.py): `features/students/model.py`

### Persistence

- [Student repository](https://github.com/justinberzamina/student_prototype/blob/main/features/students/repository.py): `features/students/repository.py`
- [Database access](https://github.com/justinberzamina/student_prototype/blob/main/database/database.py): `database/database.py`

### Other components

- **User**
- **SQLite database**

## Connections

- User → Application startup: starts
- Application startup → Database access: creates schema
- Application startup → Student service: constructs
- Application startup → Student window: opens
- User → Student window: interacts
- Student window → Student model: constructs
- Student window → Student service: adds or lists
- Student service → Student repository: delegates
- Student repository → Student model: maps records
- Student repository → Database access: queries
- Database access → SQLite database: reads and writes
