How sebastienlaraque/student-management works
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: student_controller.py Student controller · student_repository.py Repository contract · student.py Student model · cli_app.py Interactive CLI
Components 15
CLI delivery
- Interactive CLI
src/frameworks/cli/cli_app.py - CLI entry point
main_cli.py - Student controller
src/interface_adapters/controllers/student_controller.py - Student presenter
src/interface_adapters/presenters/student_presenter.py
Application operations
- Add student
src/use_cases/add_student.py - Get student
src/use_cases/get_student.py - List students
src/use_cases/list_students.py - Update student
src/use_cases/update_student.py - Delete student
src/use_cases/delete_student.py - Repository contract
src/use_cases/interfaces/student_repository.py
Student domain
- Student model
src/entities/student.py
Persistence adapters
- In-memory repository
src/interface_adapters/repositories/in_memory_student_repository.py - SQLite repository
src/interface_adapters/repositories/sqlite_student_repository.py - SQLite database
Other components
- CLI user
Connections 24
- CLI entry point → Interactive CLI: starts
main_cli.py - CLI entry point → In-memory repository: configures
main_cli.py - CLI user → Interactive CLI: uses
src/frameworks/cli/cli_app.py - Interactive CLI → Student controller: invokes
src/frameworks/cli/cli_app.py - Interactive CLI → Student presenter: formats display
src/frameworks/cli/cli_app.py - Student controller → Add student: executes
src/interface_adapters/controllers/student_controller.py - Student controller → Get student: executes
src/interface_adapters/controllers/student_controller.py - Student controller → List students: executes
src/interface_adapters/controllers/student_controller.py - Student controller → Update student: executes
src/interface_adapters/controllers/student_controller.py - Student controller → Delete student: executes
src/interface_adapters/controllers/student_controller.py - Student controller → Student presenter: serializes results
src/interface_adapters/controllers/student_controller.py - Add student → Repository contract: saves through
src/use_cases/add_student.py - Get student → Repository contract: looks up through
src/use_cases/get_student.py - List students → Repository contract: lists through
src/use_cases/list_students.py - Update student → Repository contract: reads and updates
src/use_cases/update_student.py - Delete student → Repository contract: checks and deletes
src/use_cases/delete_student.py - Add student → Student model: creates
src/use_cases/add_student.py - Update student → Student model: rebuilds
src/use_cases/update_student.py - Repository contract → Student model: uses records
src/use_cases/interfaces/student_repository.py - In-memory repository → Repository contract: implements
src/interface_adapters/repositories/in_memory_student_repository.py - SQLite repository → Repository contract: implements
src/interface_adapters/repositories/sqlite_student_repository.py - In-memory repository → Student model: stores records
src/interface_adapters/repositories/in_memory_student_repository.py - SQLite repository → Student model: maps records
src/interface_adapters/repositories/sqlite_student_repository.py - SQLite repository → SQLite database: reads and writes
src/interface_adapters/repositories/sqlite_student_repository.py