# eltun2006/mathsystem architecture

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

- Interactive diagram: https://gitdiagram.com/eltun2006/mathsystem
- Repository: https://github.com/eltun2006/mathsystem

## Overview

MathPlatform is a web platform for teachers to organize student groups, create and assign math learning materials and exams, and review student activity. Teachers and students use the browser interface, which sends requests to the ASP.NET controllers; those controllers read and write the shared entity model through Entity Framework. The excerpts show authentication, teacher group/content/statistics operations, and student answer submission. Other frontend interactions and controller behavior are not fully sampled, so the graph omits relationships that cannot be evidenced.

Main entry points: [`public/js/app.js`](https://github.com/eltun2006/mathsystem/blob/main/public/js/app.js) (Browser application), [`src/MathPlatform.Infrastructure/Data/AppDbContext.cs`](https://github.com/eltun2006/mathsystem/blob/main/src/MathPlatform.Infrastructure/Data/AppDbContext.cs) (Entity Framework context), [`src/MathPlatform.API/Controllers/TeacherController.cs`](https://github.com/eltun2006/mathsystem/blob/main/src/MathPlatform.API/Controllers/TeacherController.cs) (Teacher operations), [`Program.cs`](https://github.com/eltun2006/mathsystem/blob/main/Program.cs) (ASP.NET host)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web interface"]
  node_browser["Browser application<br/>[app.js]"]
end

subgraph group_workflows["API workflows"]
  node_auth["Authentication<br/>[AuthController.cs]"]
  node_teacher_ops["Teacher operations"]
  node_student_ops["Student learning"]
end

subgraph group_data["Domain and persistence"]
  node_entities["Domain entities<br/>[DomainEntities.cs]"]
  node_db[("Entity Framework context<br/>[AppDbContext.cs]")]
  node_credentials["Credential generator"]
end

subgraph group_runtime["Application runtime"]
  node_host["ASP.NET host<br/>[Program.cs]"]
end

node_teacher(("Teacher"))
node_student(("Student"))

node_teacher -->|"uses"| node_browser
node_student -->|"uses"| node_browser
node_browser -->|"posts login"| node_auth
node_browser -->|"requests groups, content, stats"| node_teacher_ops
node_browser -->|"posts answers"| node_student_ops
node_auth -->|"reads and writes"| node_db
node_teacher_ops -->|"reads and writes"| node_db
node_teacher_ops -->|"generates credentials"| node_credentials
node_student_ops -->|"reads and writes"| node_db
node_db -->|"maps entities"| node_entities
node_host -->|"configures and seeds"| node_db
node_host -->|"registers service"| node_credentials

click node_browser "https://github.com/eltun2006/mathsystem/blob/main/public/js/app.js"
click node_auth "https://github.com/eltun2006/mathsystem/blob/main/src/MathPlatform.API/Controllers/AuthController.cs"
click node_teacher_ops "https://github.com/eltun2006/mathsystem/blob/main/src/MathPlatform.API/Controllers/TeacherController.cs"
click node_student_ops "https://github.com/eltun2006/mathsystem/blob/main/src/MathPlatform.API/Controllers/StudentController.cs"
click node_entities "https://github.com/eltun2006/mathsystem/blob/main/src/MathPlatform.Core/Entities/DomainEntities.cs"
click node_db "https://github.com/eltun2006/mathsystem/blob/main/src/MathPlatform.Infrastructure/Data/AppDbContext.cs"
click node_credentials "https://github.com/eltun2006/mathsystem/blob/main/src/MathPlatform.Infrastructure/Services/CredentialGeneratorService.cs"
click node_host "https://github.com/eltun2006/mathsystem/blob/main/Program.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_browser toneBlue
class node_auth,node_teacher_ops,node_student_ops toneAmber
class node_entities,node_db,node_credentials toneMint
class node_host toneRose
class node_teacher,node_student toneIndigo
```

## Components

### Web interface

- [Browser application](https://github.com/eltun2006/mathsystem/blob/main/public/js/app.js): `public/js/app.js`

### API workflows

- [Authentication](https://github.com/eltun2006/mathsystem/blob/main/src/MathPlatform.API/Controllers/AuthController.cs): `src/MathPlatform.API/Controllers/AuthController.cs`
- [Teacher operations](https://github.com/eltun2006/mathsystem/blob/main/src/MathPlatform.API/Controllers/TeacherController.cs): `src/MathPlatform.API/Controllers/TeacherController.cs`
- [Student learning](https://github.com/eltun2006/mathsystem/blob/main/src/MathPlatform.API/Controllers/StudentController.cs): `src/MathPlatform.API/Controllers/StudentController.cs`

### Domain and persistence

- [Domain entities](https://github.com/eltun2006/mathsystem/blob/main/src/MathPlatform.Core/Entities/DomainEntities.cs): `src/MathPlatform.Core/Entities/DomainEntities.cs`
- [Entity Framework context](https://github.com/eltun2006/mathsystem/blob/main/src/MathPlatform.Infrastructure/Data/AppDbContext.cs): `src/MathPlatform.Infrastructure/Data/AppDbContext.cs`
- [Credential generator](https://github.com/eltun2006/mathsystem/blob/main/src/MathPlatform.Infrastructure/Services/CredentialGeneratorService.cs): `src/MathPlatform.Infrastructure/Services/CredentialGeneratorService.cs`

### Application runtime

- [ASP.NET host](https://github.com/eltun2006/mathsystem/blob/main/Program.cs): `Program.cs`

### Other components

- **Teacher**
- **Student**

## Connections

- Teacher → Browser application: uses (evidence: `public/js/app.js`)
- Student → Browser application: uses (evidence: `public/js/app.js`)
- Browser application → Authentication: posts login (evidence: `public/js/app.js`)
- Browser application → Teacher operations: requests groups, content, stats (evidence: `public/js/app.js`)
- Browser application → Student learning: posts answers (evidence: `public/js/app.js`)
- Authentication → Entity Framework context: reads and writes (evidence: `src/MathPlatform.API/Controllers/AuthController.cs`)
- Teacher operations → Entity Framework context: reads and writes (evidence: `src/MathPlatform.API/Controllers/TeacherController.cs`)
- Teacher operations → Credential generator: generates credentials (evidence: `src/MathPlatform.API/Controllers/TeacherController.cs`)
- Student learning → Entity Framework context: reads and writes (evidence: `src/MathPlatform.API/Controllers/StudentController.cs`)
- Entity Framework context → Domain entities: maps entities (evidence: `src/MathPlatform.Infrastructure/Data/AppDbContext.cs`)
- ASP.NET host → Entity Framework context: configures and seeds (evidence: `Program.cs`)
- ASP.NET host → Credential generator: registers service (evidence: `Program.cs`)
