# aymanalmtreigpt-cyber/schoolevaluationerp architecture

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

- Interactive diagram: https://gitdiagram.com/aymanalmtreigpt-cyber/schoolevaluationerp
- Repository: https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp

## Overview

SchoolEvaluationERP is a WPF desktop ERP for configuring school staff and evaluator templates, recording weekly evaluations, reviewing history, and producing monthly incentive reports and accounting exports. Users enter through login and permission-aware navigation; the main workflow moves from master data and templates to weekly scoring, historical review, and monthly reporting. The graph also includes user administration, score balancing, incentive settings, and database backup. Several service-to-view links are supported by the SOURCE INDEX; unsampled relationships are omitted rather than inferred.

Main entry points: [`SchoolEvaluationERP/MainWindow.xaml.cs`](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/MainWindow.xaml.cs) (Main navigation), [`SchoolEvaluationERP/Views/ScoreEntryView.xaml.cs`](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/ScoreEntryView.xaml.cs) (Weekly score entry), [`SchoolEvaluationERP/Services/AuthService.cs`](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/AuthService.cs) (Authentication and RBAC), [`SchoolEvaluationERP/Views/TemplatesView.xaml.cs`](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/TemplatesView.xaml.cs) (Template designer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and administration"]
  node_login["Login"]
  node_navigation["Main navigation<br/>[MainWindow.xaml.cs]"]
  node_user_admin["User management"]
  node_auth["Authentication and RBAC<br/>[AuthService.cs]"]
end

subgraph group_setup["Evaluation setup"]
  node_master_view["Master data"]
  node_master_dialogs["Master data dialogs"]
  node_master_service["Master data service"]
  node_templates_view["Template designer"]
  node_template_service["Template service<br/>[TemplateService.cs]"]
  node_template_exports["Template exports"]
  node_template_excel["Template Excel tools"]
end

subgraph group_scoring["Scoring and history"]
  node_score_entry["Weekly score entry"]
  node_weekly_service["Weekly evaluation service"]
  node_history["Evaluation history"]
  node_grid_helper["Score grid navigation"]
  node_selection_behavior["Grid selection behavior"]
end

subgraph group_finance["Incentives and reporting"]
  node_incentive_settings["Incentive settings"]
  node_balancing["Score balancing"]
  node_incentive_service["Incentive and balancing service"]
  node_calculator["Incentive calculator"]
  node_final_view["Monthly final report"]
  node_final_service["Report and accounting exports"]
end

subgraph group_platform["Data services"]
  node_backup_view["Database backup screen"]
  node_backup_service["Database backup service"]
  node_config["Application configuration"]
  node_schema["Database schema service"]
end

node_user(("User"))
node_sql[("SQL Server")]

node_user -->|"signs in"| node_login
node_login -->|"authenticates"| node_auth
node_navigation -->|"checks permissions"| node_auth
node_navigation -.->|"opens screen"| node_master_view
node_navigation -.->|"opens screen"| node_templates_view
node_navigation -.->|"opens screen"| node_score_entry
node_navigation -.->|"opens screen"| node_history
node_navigation -.->|"opens screen"| node_final_view
node_user_admin -->|"manages accounts"| node_auth
node_master_view -->|"manages records"| node_master_service
node_master_dialogs -->|"loads and saves"| node_master_service
node_templates_view -->|"manages templates"| node_template_service
node_templates_view -->|"exports forms"| node_template_exports
node_templates_view -->|"uses Excel tools"| node_template_excel
node_score_entry -->|"loads and saves"| node_weekly_service
node_history -->|"queries history"| node_weekly_service
node_score_entry -->|"uses navigation"| node_grid_helper
node_history -->|"uses navigation"| node_grid_helper
node_score_entry -.->|"uses selection"| node_selection_behavior
node_incentive_settings -->|"configures incentives"| node_incentive_service
node_balancing -->|"balances scores"| node_incentive_service
node_balancing -->|"loads evaluations"| node_weekly_service
node_score_entry -->|"calculates incentives"| node_calculator
node_final_view -->|"builds report"| node_final_service
node_final_service -->|"calculates awards"| node_calculator
node_backup_view -->|"backs up database"| node_backup_service
node_auth -->|"reads settings"| node_config
node_auth -->|"ensures schema"| node_schema
node_master_service -->|"queries and writes"| node_sql
node_template_service -->|"ensures schema"| node_schema
node_weekly_service -->|"ensures schema"| node_schema
node_final_service -->|"ensures schema"| node_schema
node_backup_service -->|"backs up and restores"| node_sql

click node_login "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/LoginWindow.xaml.cs"
click node_navigation "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/MainWindow.xaml.cs"
click node_user_admin "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/UserManagementView.xaml.cs"
click node_auth "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/AuthService.cs"
click node_master_view "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/MasterDataView.xaml.cs"
click node_master_dialogs "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/EmployeeDialog.xaml.cs"
click node_master_service "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/MasterDataService.cs"
click node_templates_view "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/TemplatesView.xaml.cs"
click node_template_service "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/TemplateService.cs"
click node_template_exports "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/TemplatePdfExportService.cs"
click node_template_excel "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/TemplateExcelExportService.cs"
click node_score_entry "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/ScoreEntryView.xaml.cs"
click node_weekly_service "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/WeeklyEvaluationService.cs"
click node_history "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/HistoryLogView.xaml.cs"
click node_grid_helper "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/ScoreGridNavigationHelper.cs"
click node_selection_behavior "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/DataGridSelectionBehavior.cs"
click node_incentive_settings "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/IncentiveBasicsView.xaml.cs"
click node_balancing "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/ScoreBalancingView.xaml.cs"
click node_incentive_service "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/IncentiveAndBalancingService.cs"
click node_calculator "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/IncentiveCalculatorService.cs"
click node_final_view "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/FinalReportView.xaml.cs"
click node_final_service "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/FinalReportService.cs"
click node_backup_view "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/DatabaseBackupView.xaml.cs"
click node_backup_service "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/DatabaseBackupService.cs"
click node_config "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/AppConfigService.cs"
click node_schema "https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/DatabaseSchemaService.cs"

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_login,node_navigation,node_user_admin,node_auth,node_user toneBlue
class node_master_view,node_master_dialogs,node_master_service,node_templates_view,node_template_service,node_template_exports,node_template_excel,node_sql toneAmber
class node_score_entry,node_weekly_service,node_history,node_grid_helper,node_selection_behavior toneMint
class node_incentive_settings,node_balancing,node_incentive_service,node_calculator,node_final_view,node_final_service toneRose
class node_backup_view,node_backup_service,node_config,node_schema toneIndigo
```

## Components

### Access and administration

- [Login](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/LoginWindow.xaml.cs): `SchoolEvaluationERP/Views/LoginWindow.xaml.cs`
- [Main navigation](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/MainWindow.xaml.cs): `SchoolEvaluationERP/MainWindow.xaml.cs`
- [User management](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/UserManagementView.xaml.cs): `SchoolEvaluationERP/Views/UserManagementView.xaml.cs`
- [Authentication and RBAC](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/AuthService.cs): `SchoolEvaluationERP/Services/AuthService.cs`

### Evaluation setup

- [Master data](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/MasterDataView.xaml.cs): `SchoolEvaluationERP/Views/MasterDataView.xaml.cs`
- [Master data dialogs](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/EmployeeDialog.xaml.cs): `SchoolEvaluationERP/Views/EmployeeDialog.xaml.cs`
- [Master data service](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/MasterDataService.cs): `SchoolEvaluationERP/Services/MasterDataService.cs`
- [Template designer](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/TemplatesView.xaml.cs): `SchoolEvaluationERP/Views/TemplatesView.xaml.cs`
- [Template service](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/TemplateService.cs): `SchoolEvaluationERP/Services/TemplateService.cs`
- [Template exports](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/TemplatePdfExportService.cs): `SchoolEvaluationERP/Services/TemplatePdfExportService.cs`
- [Template Excel tools](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/TemplateExcelExportService.cs): `SchoolEvaluationERP/Services/TemplateExcelExportService.cs`

### Scoring and history

- [Weekly score entry](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/ScoreEntryView.xaml.cs): `SchoolEvaluationERP/Views/ScoreEntryView.xaml.cs`
- [Weekly evaluation service](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/WeeklyEvaluationService.cs): `SchoolEvaluationERP/Services/WeeklyEvaluationService.cs`
- [Evaluation history](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/HistoryLogView.xaml.cs): `SchoolEvaluationERP/Views/HistoryLogView.xaml.cs`
- [Score grid navigation](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/ScoreGridNavigationHelper.cs): `SchoolEvaluationERP/Views/ScoreGridNavigationHelper.cs`
- [Grid selection behavior](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/DataGridSelectionBehavior.cs): `SchoolEvaluationERP/Views/DataGridSelectionBehavior.cs`

### Incentives and reporting

- [Incentive settings](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/IncentiveBasicsView.xaml.cs): `SchoolEvaluationERP/Views/IncentiveBasicsView.xaml.cs`
- [Score balancing](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/ScoreBalancingView.xaml.cs): `SchoolEvaluationERP/Views/ScoreBalancingView.xaml.cs`
- [Incentive and balancing service](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/IncentiveAndBalancingService.cs): `SchoolEvaluationERP/Services/IncentiveAndBalancingService.cs`
- [Incentive calculator](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/IncentiveCalculatorService.cs): `SchoolEvaluationERP/Services/IncentiveCalculatorService.cs`
- [Monthly final report](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/FinalReportView.xaml.cs): `SchoolEvaluationERP/Views/FinalReportView.xaml.cs`
- [Report and accounting exports](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/FinalReportService.cs): `SchoolEvaluationERP/Services/FinalReportService.cs`

### Data services

- [Database backup screen](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Views/DatabaseBackupView.xaml.cs): `SchoolEvaluationERP/Views/DatabaseBackupView.xaml.cs`
- [Database backup service](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/DatabaseBackupService.cs): `SchoolEvaluationERP/Services/DatabaseBackupService.cs`
- [Application configuration](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/AppConfigService.cs): `SchoolEvaluationERP/Services/AppConfigService.cs`
- [Database schema service](https://github.com/aymanalmtreigpt-cyber/schoolevaluationerp/blob/main/SchoolEvaluationERP/Services/DatabaseSchemaService.cs): `SchoolEvaluationERP/Services/DatabaseSchemaService.cs`

### Other components

- **User**
- **SQL Server**

## Connections

- User → Login: signs in (evidence: `SchoolEvaluationERP/Views/LoginWindow.xaml.cs`)
- Login → Authentication and RBAC: authenticates (evidence: `SchoolEvaluationERP/Views/LoginWindow.xaml.cs`)
- Main navigation → Authentication and RBAC: checks permissions (evidence: `SchoolEvaluationERP/MainWindow.xaml.cs`)
- Main navigation → Master data: opens screen
- Main navigation → Template designer: opens screen
- Main navigation → Weekly score entry: opens screen
- Main navigation → Evaluation history: opens screen
- Main navigation → Monthly final report: opens screen
- User management → Authentication and RBAC: manages accounts (evidence: `SchoolEvaluationERP/Views/UserManagementView.xaml.cs`)
- Master data → Master data service: manages records (evidence: `SchoolEvaluationERP/Views/MasterDataView.xaml.cs`)
- Master data dialogs → Master data service: loads and saves (evidence: `SchoolEvaluationERP/Views/EmployeeDialog.xaml.cs`)
- Template designer → Template service: manages templates (evidence: `SchoolEvaluationERP/Views/TemplatesView.xaml.cs`)
- Template designer → Template exports: exports forms (evidence: `SchoolEvaluationERP/Views/TemplatesView.xaml.cs`)
- Template designer → Template Excel tools: uses Excel tools (evidence: `SchoolEvaluationERP/Views/TemplatesView.xaml.cs`)
- Weekly score entry → Weekly evaluation service: loads and saves (evidence: `SchoolEvaluationERP/Views/ScoreEntryView.xaml.cs`)
- Evaluation history → Weekly evaluation service: queries history (evidence: `SchoolEvaluationERP/Views/HistoryLogView.xaml.cs`)
- Weekly score entry → Score grid navigation: uses navigation (evidence: `SchoolEvaluationERP/Views/ScoreEntryView.xaml.cs`)
- Evaluation history → Score grid navigation: uses navigation (evidence: `SchoolEvaluationERP/Views/HistoryLogView.xaml.cs`)
- Weekly score entry → Grid selection behavior: uses selection
- Incentive settings → Incentive and balancing service: configures incentives (evidence: `SchoolEvaluationERP/Views/IncentiveBasicsView.xaml.cs`)
- Score balancing → Incentive and balancing service: balances scores (evidence: `SchoolEvaluationERP/Views/ScoreBalancingView.xaml.cs`)
- Score balancing → Weekly evaluation service: loads evaluations (evidence: `SchoolEvaluationERP/Views/ScoreBalancingView.xaml.cs`)
- Weekly score entry → Incentive calculator: calculates incentives (evidence: `SchoolEvaluationERP/Views/ScoreEntryView.xaml.cs`)
- Monthly final report → Report and accounting exports: builds report (evidence: `SchoolEvaluationERP/Views/FinalReportView.xaml.cs`)
- Report and accounting exports → Incentive calculator: calculates awards (evidence: `SchoolEvaluationERP/Services/FinalReportService.cs`)
- Database backup screen → Database backup service: backs up database (evidence: `SchoolEvaluationERP/Views/DatabaseBackupView.xaml.cs`)
- Authentication and RBAC → Application configuration: reads settings (evidence: `SchoolEvaluationERP/Services/AuthService.cs`)
- Authentication and RBAC → Database schema service: ensures schema (evidence: `SchoolEvaluationERP/Services/AuthService.cs`)
- Master data service → SQL Server: queries and writes (evidence: `SchoolEvaluationERP/Services/MasterDataService.cs`)
- Template service → Database schema service: ensures schema (evidence: `SchoolEvaluationERP/Services/TemplateService.cs`)
- Weekly evaluation service → Database schema service: ensures schema (evidence: `SchoolEvaluationERP/Services/WeeklyEvaluationService.cs`)
- Report and accounting exports → Database schema service: ensures schema (evidence: `SchoolEvaluationERP/Services/FinalReportService.cs`)
- Database backup service → SQL Server: backs up and restores (evidence: `SchoolEvaluationERP/Services/DatabaseBackupService.cs`)
