# sebastienlaraque/student-management architecture

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

- Interactive diagram: https://gitdiagram.com/sebastienlaraque/student-management
- Repository: https://github.com/sebastienlaraque/student-management

## Overview

Student Management is a CLI application for creating, listing, viewing, updating, and deleting student records. The principal workflow runs from the interactive CLI through a controller, which orchestrates individual use cases; the controller formats returned records through a presenter for delivery. Use cases depend on a repository contract, implemented by in-memory and SQLite adapters. The domain model validates student data. Source excerpts show the CLI and controller flow and both repository implementations; wiring is limited to the indexed entry point, and no web delivery implementation is shown.

Main entry points: [`src/interface_adapters/controllers/student_controller.py`](https://github.com/sebastienlaraque/student-management/blob/main/src/interface_adapters/controllers/student_controller.py) (Student controller), [`src/use_cases/interfaces/student_repository.py`](https://github.com/sebastienlaraque/student-management/blob/main/src/use_cases/interfaces/student_repository.py) (Repository contract), [`src/entities/student.py`](https://github.com/sebastienlaraque/student-management/blob/main/src/entities/student.py) (Student model), [`src/frameworks/cli/cli_app.py`](https://github.com/sebastienlaraque/student-management/blob/main/src/frameworks/cli/cli_app.py) (Interactive CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_delivery["CLI delivery"]
  node_cli["Interactive CLI<br/>[cli_app.py]"]
  node_entry["CLI entry point<br/>[main_cli.py]"]
  node_controller["Student controller"]
  node_presenter["Student presenter"]
end

subgraph group_application["Application operations"]
  node_add["Add student<br/>[add_student.py]"]
  node_get["Get student<br/>[get_student.py]"]
  node_list["List students<br/>[list_students.py]"]
  node_update["Update student<br/>[update_student.py]"]
  node_delete["Delete student<br/>[delete_student.py]"]
  node_repo_port["Repository contract"]
end

subgraph group_domain["Student domain"]
  node_student["Student model<br/>[student.py]"]
end

subgraph group_persistence["Persistence adapters"]
  node_memory_repo["In-memory repository"]
  node_sqlite_repo["SQLite repository"]
  node_sqlite[("SQLite database")]
end

node_user(("CLI user"))

node_entry -->|"starts"| node_cli
node_entry -->|"configures"| node_memory_repo
node_user -->|"uses"| node_cli
node_cli -->|"invokes"| node_controller
node_cli -->|"formats display"| node_presenter
node_controller -->|"executes"| node_add
node_controller -->|"executes"| node_get
node_controller -->|"executes"| node_list
node_controller -->|"executes"| node_update
node_controller -->|"executes"| node_delete
node_controller -->|"serializes results"| node_presenter
node_add -->|"saves through"| node_repo_port
node_get -->|"looks up through"| node_repo_port
node_list -->|"lists through"| node_repo_port
node_update -->|"reads and updates"| node_repo_port
node_delete -->|"checks and deletes"| node_repo_port
node_add -->|"creates"| node_student
node_update -->|"rebuilds"| node_student
node_repo_port -->|"uses records"| node_student
node_memory_repo -->|"implements"| node_repo_port
node_sqlite_repo -->|"implements"| node_repo_port
node_memory_repo -->|"stores records"| node_student
node_sqlite_repo -->|"maps records"| node_student
node_sqlite_repo -->|"reads and writes"| node_sqlite

click node_cli "https://github.com/sebastienlaraque/student-management/blob/main/src/frameworks/cli/cli_app.py"
click node_entry "https://github.com/sebastienlaraque/student-management/blob/main/main_cli.py"
click node_controller "https://github.com/sebastienlaraque/student-management/blob/main/src/interface_adapters/controllers/student_controller.py"
click node_presenter "https://github.com/sebastienlaraque/student-management/blob/main/src/interface_adapters/presenters/student_presenter.py"
click node_add "https://github.com/sebastienlaraque/student-management/blob/main/src/use_cases/add_student.py"
click node_get "https://github.com/sebastienlaraque/student-management/blob/main/src/use_cases/get_student.py"
click node_list "https://github.com/sebastienlaraque/student-management/blob/main/src/use_cases/list_students.py"
click node_update "https://github.com/sebastienlaraque/student-management/blob/main/src/use_cases/update_student.py"
click node_delete "https://github.com/sebastienlaraque/student-management/blob/main/src/use_cases/delete_student.py"
click node_student "https://github.com/sebastienlaraque/student-management/blob/main/src/entities/student.py"
click node_repo_port "https://github.com/sebastienlaraque/student-management/blob/main/src/use_cases/interfaces/student_repository.py"
click node_memory_repo "https://github.com/sebastienlaraque/student-management/blob/main/src/interface_adapters/repositories/in_memory_student_repository.py"
click node_sqlite_repo "https://github.com/sebastienlaraque/student-management/blob/main/src/interface_adapters/repositories/sqlite_student_repository.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_cli,node_entry,node_controller,node_presenter,node_user toneBlue
class node_add,node_get,node_list,node_update,node_delete,node_repo_port toneAmber
class node_student toneMint
class node_memory_repo,node_sqlite_repo,node_sqlite toneRose
```

## Components

### CLI delivery

- [Interactive CLI](https://github.com/sebastienlaraque/student-management/blob/main/src/frameworks/cli/cli_app.py): `src/frameworks/cli/cli_app.py`
- [CLI entry point](https://github.com/sebastienlaraque/student-management/blob/main/main_cli.py): `main_cli.py`
- [Student controller](https://github.com/sebastienlaraque/student-management/blob/main/src/interface_adapters/controllers/student_controller.py): `src/interface_adapters/controllers/student_controller.py`
- [Student presenter](https://github.com/sebastienlaraque/student-management/blob/main/src/interface_adapters/presenters/student_presenter.py): `src/interface_adapters/presenters/student_presenter.py`

### Application operations

- [Add student](https://github.com/sebastienlaraque/student-management/blob/main/src/use_cases/add_student.py): `src/use_cases/add_student.py`
- [Get student](https://github.com/sebastienlaraque/student-management/blob/main/src/use_cases/get_student.py): `src/use_cases/get_student.py`
- [List students](https://github.com/sebastienlaraque/student-management/blob/main/src/use_cases/list_students.py): `src/use_cases/list_students.py`
- [Update student](https://github.com/sebastienlaraque/student-management/blob/main/src/use_cases/update_student.py): `src/use_cases/update_student.py`
- [Delete student](https://github.com/sebastienlaraque/student-management/blob/main/src/use_cases/delete_student.py): `src/use_cases/delete_student.py`
- [Repository contract](https://github.com/sebastienlaraque/student-management/blob/main/src/use_cases/interfaces/student_repository.py): `src/use_cases/interfaces/student_repository.py`

### Student domain

- [Student model](https://github.com/sebastienlaraque/student-management/blob/main/src/entities/student.py): `src/entities/student.py`

### Persistence adapters

- [In-memory repository](https://github.com/sebastienlaraque/student-management/blob/main/src/interface_adapters/repositories/in_memory_student_repository.py): `src/interface_adapters/repositories/in_memory_student_repository.py`
- [SQLite repository](https://github.com/sebastienlaraque/student-management/blob/main/src/interface_adapters/repositories/sqlite_student_repository.py): `src/interface_adapters/repositories/sqlite_student_repository.py`
- **SQLite database**

### Other components

- **CLI user**

## Connections

- CLI entry point → Interactive CLI: starts (evidence: `main_cli.py`)
- CLI entry point → In-memory repository: configures (evidence: `main_cli.py`)
- CLI user → Interactive CLI: uses (evidence: `src/frameworks/cli/cli_app.py`)
- Interactive CLI → Student controller: invokes (evidence: `src/frameworks/cli/cli_app.py`)
- Interactive CLI → Student presenter: formats display (evidence: `src/frameworks/cli/cli_app.py`)
- Student controller → Add student: executes (evidence: `src/interface_adapters/controllers/student_controller.py`)
- Student controller → Get student: executes (evidence: `src/interface_adapters/controllers/student_controller.py`)
- Student controller → List students: executes (evidence: `src/interface_adapters/controllers/student_controller.py`)
- Student controller → Update student: executes (evidence: `src/interface_adapters/controllers/student_controller.py`)
- Student controller → Delete student: executes (evidence: `src/interface_adapters/controllers/student_controller.py`)
- Student controller → Student presenter: serializes results (evidence: `src/interface_adapters/controllers/student_controller.py`)
- Add student → Repository contract: saves through (evidence: `src/use_cases/add_student.py`)
- Get student → Repository contract: looks up through (evidence: `src/use_cases/get_student.py`)
- List students → Repository contract: lists through (evidence: `src/use_cases/list_students.py`)
- Update student → Repository contract: reads and updates (evidence: `src/use_cases/update_student.py`)
- Delete student → Repository contract: checks and deletes (evidence: `src/use_cases/delete_student.py`)
- Add student → Student model: creates (evidence: `src/use_cases/add_student.py`)
- Update student → Student model: rebuilds (evidence: `src/use_cases/update_student.py`)
- Repository contract → Student model: uses records (evidence: `src/use_cases/interfaces/student_repository.py`)
- In-memory repository → Repository contract: implements (evidence: `src/interface_adapters/repositories/in_memory_student_repository.py`)
- SQLite repository → Repository contract: implements (evidence: `src/interface_adapters/repositories/sqlite_student_repository.py`)
- In-memory repository → Student model: stores records (evidence: `src/interface_adapters/repositories/in_memory_student_repository.py`)
- SQLite repository → Student model: maps records (evidence: `src/interface_adapters/repositories/sqlite_student_repository.py`)
- SQLite repository → SQLite database: reads and writes (evidence: `src/interface_adapters/repositories/sqlite_student_repository.py`)
