# syrianjunior/my-cpp-project architecture

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

- Interactive diagram: https://gitdiagram.com/syrianjunior/my-cpp-project
- Repository: https://github.com/syrianjunior/my-cpp-project

## Overview

This is a terminal-based student/session manager. The user enters through the main menu, which lists active students and dispatches to add a student, add products, end a session, or view the session log. Ending a session computes an invoice and records it; student records and ended-session logs are stored in separate text files. UI screens share console-rendering and input-validation helpers, while the student model owns time/price calculations and file persistence. The README is empty; relationships below are based on the shown source and SOURCE INDEX. Duplicate “(1)” headers are not part of the active include paths shown.

Main entry points: [`clsMainScreen.h`](https://github.com/syrianjunior/my-cpp-project/blob/main/clsMainScreen.h) (Main menu), [`clsStudent.h`](https://github.com/syrianjunior/my-cpp-project/blob/main/clsStudent.h) (Student model), [`clsScreen.h`](https://github.com/syrianjunior/my-cpp-project/blob/main/clsScreen.h) (Screen rendering), [`clsListScreen.h`](https://github.com/syrianjunior/my-cpp-project/blob/main/clsListScreen.h) (Active list)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_program["Program loop<br/>[main.cpp]"]
end

subgraph group_screens["Menu and screens"]
  node_menu["Main menu<br/>[clsMainScreen.h]"]
  node_add["Add student"]
  node_list["Active list<br/>[clsListScreen.h]"]
  node_end["End session<br/>[clsEndStuScreen.h]"]
  node_products["Add products<br/>[clsUpdateScreen.h]"]
  node_logview["Session log view<br/>[clsLogScreen.h]"]
end

subgraph group_domain["Session domain"]
  node_student["Student model<br/>[clsStudent.h]"]
  node_studentdata[("Active records<br/>[Student.txt]")]
  node_logdata[("Session log<br/>[Log.txt]")]
end

subgraph group_support["Console support"]
  node_screen["Screen rendering<br/>[clsScreen.h]"]
  node_validate["Input validation<br/>[clsInputValidate.h]"]
  node_strings["String utilities<br/>[clsString.h]"]
end

node_user(("Terminal user"))

node_user -.->|"uses"| node_program
node_program -->|"calls"| node_menu
node_menu -->|"displays"| node_list
node_menu -->|"reads choices"| node_validate
node_menu -->|"dispatches"| node_add
node_menu -->|"dispatches"| node_end
node_menu -->|"dispatches"| node_logview
node_menu -->|"dispatches"| node_products
node_add -->|"displays"| node_list
node_add -->|"reads details"| node_validate
node_add -->|"creates and saves"| node_student
node_end -->|"selects from"| node_list
node_end -->|"reads confirmation"| node_validate
node_end -->|"deletes session"| node_student
node_products -->|"displays"| node_list
node_products -->|"reads selection"| node_validate
node_products -->|"updates and saves"| node_student
node_list -->|"loads records"| node_student
node_logview -->|"loads log"| node_student
node_student -->|"reads and writes"| node_studentdata
node_student -->|"reads and appends"| node_logdata
node_student -->|"splits records"| node_strings
node_menu -->|"inherits rendering"| node_screen
node_add -->|"inherits rendering"| node_screen
node_list -->|"inherits rendering"| node_screen
node_end -->|"inherits rendering"| node_screen
node_products -->|"inherits rendering"| node_screen
node_logview -->|"inherits rendering"| node_screen
node_validate -->|"uses colors"| node_screen

click node_program "https://github.com/syrianjunior/my-cpp-project/blob/main/main.cpp"
click node_menu "https://github.com/syrianjunior/my-cpp-project/blob/main/clsMainScreen.h"
click node_add "https://github.com/syrianjunior/my-cpp-project/blob/main/clsAddStudentScreen.h"
click node_list "https://github.com/syrianjunior/my-cpp-project/blob/main/clsListScreen.h"
click node_end "https://github.com/syrianjunior/my-cpp-project/blob/main/clsEndStuScreen.h"
click node_products "https://github.com/syrianjunior/my-cpp-project/blob/main/clsUpdateScreen.h"
click node_logview "https://github.com/syrianjunior/my-cpp-project/blob/main/clsLogScreen.h"
click node_student "https://github.com/syrianjunior/my-cpp-project/blob/main/clsStudent.h"
click node_studentdata "https://github.com/syrianjunior/my-cpp-project/blob/main/Student.txt"
click node_logdata "https://github.com/syrianjunior/my-cpp-project/blob/main/Log.txt"
click node_screen "https://github.com/syrianjunior/my-cpp-project/blob/main/clsScreen.h"
click node_validate "https://github.com/syrianjunior/my-cpp-project/blob/main/clsInputValidate.h"
click node_strings "https://github.com/syrianjunior/my-cpp-project/blob/main/clsString.h"

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_program,node_user toneBlue
class node_menu,node_add,node_list,node_end,node_products,node_logview toneAmber
class node_student,node_studentdata,node_logdata toneMint
class node_screen,node_validate,node_strings toneRose
```

## Components

### Application entry

- [Program loop](https://github.com/syrianjunior/my-cpp-project/blob/main/main.cpp): `main.cpp`

### Menu and screens

- [Main menu](https://github.com/syrianjunior/my-cpp-project/blob/main/clsMainScreen.h): `clsMainScreen.h`
- [Add student](https://github.com/syrianjunior/my-cpp-project/blob/main/clsAddStudentScreen.h): `clsAddStudentScreen.h`
- [Active list](https://github.com/syrianjunior/my-cpp-project/blob/main/clsListScreen.h): `clsListScreen.h`
- [End session](https://github.com/syrianjunior/my-cpp-project/blob/main/clsEndStuScreen.h): `clsEndStuScreen.h`
- [Add products](https://github.com/syrianjunior/my-cpp-project/blob/main/clsUpdateScreen.h): `clsUpdateScreen.h`
- [Session log view](https://github.com/syrianjunior/my-cpp-project/blob/main/clsLogScreen.h): `clsLogScreen.h`

### Session domain

- [Student model](https://github.com/syrianjunior/my-cpp-project/blob/main/clsStudent.h): `clsStudent.h`
- [Active records](https://github.com/syrianjunior/my-cpp-project/blob/main/Student.txt): `Student.txt`
- [Session log](https://github.com/syrianjunior/my-cpp-project/blob/main/Log.txt): `Log.txt`

### Console support

- [Screen rendering](https://github.com/syrianjunior/my-cpp-project/blob/main/clsScreen.h): `clsScreen.h`
- [Input validation](https://github.com/syrianjunior/my-cpp-project/blob/main/clsInputValidate.h): `clsInputValidate.h`
- [String utilities](https://github.com/syrianjunior/my-cpp-project/blob/main/clsString.h): `clsString.h`

### Other components

- **Terminal user**

## Connections

- Terminal user → Program loop: uses
- Program loop → Main menu: calls (evidence: `main.cpp`)
- Main menu → Active list: displays (evidence: `clsMainScreen.h`)
- Main menu → Input validation: reads choices (evidence: `clsMainScreen.h`)
- Main menu → Add student: dispatches (evidence: `clsMainScreen.h`)
- Main menu → End session: dispatches (evidence: `clsMainScreen.h`)
- Main menu → Session log view: dispatches (evidence: `clsMainScreen.h`)
- Main menu → Add products: dispatches (evidence: `clsMainScreen.h`)
- Add student → Active list: displays (evidence: `clsAddStudentScreen.h`)
- Add student → Input validation: reads details (evidence: `clsAddStudentScreen.h`)
- Add student → Student model: creates and saves (evidence: `clsAddStudentScreen.h`)
- End session → Active list: selects from (evidence: `clsEndStuScreen.h`)
- End session → Input validation: reads confirmation (evidence: `clsEndStuScreen.h`)
- End session → Student model: deletes session (evidence: `clsEndStuScreen.h`)
- Add products → Active list: displays (evidence: `clsUpdateScreen.h`)
- Add products → Input validation: reads selection (evidence: `clsUpdateScreen.h`)
- Add products → Student model: updates and saves (evidence: `clsUpdateScreen.h`)
- Active list → Student model: loads records (evidence: `clsListScreen.h`)
- Session log view → Student model: loads log (evidence: `clsLogScreen.h`)
- Student model → Active records: reads and writes (evidence: `clsStudent.h`)
- Student model → Session log: reads and appends (evidence: `clsStudent.h`)
- Student model → String utilities: splits records (evidence: `clsStudent.h`)
- Main menu → Screen rendering: inherits rendering (evidence: `clsMainScreen.h`)
- Add student → Screen rendering: inherits rendering (evidence: `clsAddStudentScreen.h`)
- Active list → Screen rendering: inherits rendering (evidence: `clsListScreen.h`)
- End session → Screen rendering: inherits rendering (evidence: `clsEndStuScreen.h`)
- Add products → Screen rendering: inherits rendering (evidence: `clsUpdateScreen.h`)
- Session log view → Screen rendering: inherits rendering (evidence: `clsLogScreen.h`)
- Input validation → Screen rendering: uses colors (evidence: `clsInputValidate.h`)
