# nazzz1324/lk-case2 architecture

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

- Interactive diagram: https://gitdiagram.com/nazzz1324/lk-case2
- Repository: https://github.com/nazzz1324/lk-case2

## Overview

This is a competency-assessment system with a React role-based interface and a .NET account/assessment API; the README also describes an Express backend as a frontend stub. The documented workflow covers administrator setup of users, groups, disciplines, competencies, indicators and professional roles; teachers score students; students view their profiles, disciplines and competencies. The graph keeps these domain stages distinct and includes authentication, persistence and shared result handling. Edges are limited to README statements and relationships visible in the SOURCE INDEX; unsampled frontend-to-backend wiring is not asserted.

Main entry points: [`client/src/App.tsx`](https://github.com/nazzz1324/lk-case2/blob/master/client/src/App.tsx) (Routes and shell), [`Account.Application/Services/AuthService.cs`](https://github.com/nazzz1324/lk-case2/blob/master/Account.Application/Services/AuthService.cs) (Authentication service), [`Account.DAL/Repositories/BaseRepository.cs`](https://github.com/nazzz1324/lk-case2/blob/master/Account.DAL/Repositories/BaseRepository.cs) (Repository layer), [`Account.api/Controllers`](https://github.com/nazzz1324/lk-case2/tree/master/Account.api/Controllers) (Assessment endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Role-based UI"]
  node_admin["Admin management"]
  node_teacherui["Teacher scoring UI"]
  node_studentui["Student views"]
  node_loginui["Login page<br/>[Login.tsx]"]
  node_app["Routes and shell<br/>[App.tsx]"]
end

subgraph group_api["API and services"]
  node_authcontroller["Auth endpoints<br/>[AuthController.cs]"]
  node_assessmentcontrollers["Assessment endpoints<br/>[Controllers]"]
  node_authservice["Authentication service<br/>[AuthService.cs]"]
  node_studentservice["Student service<br/>[StudentService.cs]"]
  node_teacherservice["Teacher scoring service<br/>[TeacherService.cs]"]
  node_catalogservices["Catalog services<br/>[Services]"]
end

subgraph group_domain["Assessment domain"]
  node_results["Result and errors<br/>[BaseResult.cs]"]
  node_accounts["Accounts and roles<br/>[User.cs]"]
  node_assessmentmodel["Assessment entities<br/>[Competence.cs]"]
  node_peoplemodel["Students and teachers<br/>[Student.cs]"]
end

subgraph group_data["Persistence"]
  node_repositories["Repository layer<br/>[BaseRepository.cs]"]
  node_unitofwork["Unit of work<br/>[UnitOfWork.cs]"]
  node_db[("Application database")]
end

node_adminactor(("Administrator"))
node_teacheractor(("Teacher"))
node_studentactor(("Student"))
node_expressstub["Express stub<br/>[index.ts]"]

node_adminactor -->|"manages"| node_admin
node_teacheractor -->|"scores students"| node_teacherui
node_studentactor -->|"views progress"| node_studentui
node_app -->|"routes to"| node_loginui
node_app -->|"routes to"| node_admin
node_app -->|"routes to"| node_teacherui
node_app -->|"routes to"| node_studentui
node_loginui -.->|"auth wiring unclear"| node_authcontroller
node_authcontroller -.->|"delegates"| node_authservice
node_assessmentcontrollers -->|"delegates"| node_catalogservices
node_assessmentcontrollers -.->|"delegates"| node_studentservice
node_assessmentcontrollers -.->|"delegates"| node_teacherservice
node_authservice -->|"uses repositories"| node_repositories
node_studentservice -->|"uses repositories"| node_repositories
node_teacherservice -->|"uses repositories"| node_repositories
node_repositories -->|"uses context"| node_db
node_unitofwork -.->|"coordinates persistence"| node_db
node_authservice -->|"handles accounts"| node_accounts
node_studentservice -->|"reads student data"| node_peoplemodel
node_teacherservice -->|"handles scores"| node_assessmentmodel
node_authservice -->|"returns results"| node_results
node_expressstub -.->|"serves UI unclear"| node_app

click node_admin "https://github.com/nazzz1324/lk-case2/tree/master/client/src/pages/admin"
click node_teacherui "https://github.com/nazzz1324/lk-case2/tree/master/client/src/pages/teacher"
click node_studentui "https://github.com/nazzz1324/lk-case2/tree/master/client/src/pages/student"
click node_loginui "https://github.com/nazzz1324/lk-case2/blob/master/client/src/pages/Login.tsx"
click node_app "https://github.com/nazzz1324/lk-case2/blob/master/client/src/App.tsx"
click node_authcontroller "https://github.com/nazzz1324/lk-case2/blob/master/Account.api/Controllers/AuthController.cs"
click node_assessmentcontrollers "https://github.com/nazzz1324/lk-case2/tree/master/Account.api/Controllers"
click node_authservice "https://github.com/nazzz1324/lk-case2/blob/master/Account.Application/Services/AuthService.cs"
click node_studentservice "https://github.com/nazzz1324/lk-case2/blob/master/Account.Application/Services/StudentService.cs"
click node_teacherservice "https://github.com/nazzz1324/lk-case2/blob/master/Account.Application/Services/TeacherService.cs"
click node_catalogservices "https://github.com/nazzz1324/lk-case2/tree/master/Account.Application/Services"
click node_results "https://github.com/nazzz1324/lk-case2/blob/master/Account.Domain/Result/BaseResult.cs"
click node_accounts "https://github.com/nazzz1324/lk-case2/blob/master/Account.Domain/Entity/AuthRoleEntities/User.cs"
click node_assessmentmodel "https://github.com/nazzz1324/lk-case2/blob/master/Account.Domain/Entity/Competence.cs"
click node_peoplemodel "https://github.com/nazzz1324/lk-case2/blob/master/Account.Domain/Entity/Student.cs"
click node_repositories "https://github.com/nazzz1324/lk-case2/blob/master/Account.DAL/Repositories/BaseRepository.cs"
click node_unitofwork "https://github.com/nazzz1324/lk-case2/blob/master/Account.DAL/Repositories/UnitOfWork.cs"
click node_db "https://github.com/nazzz1324/lk-case2/blob/master/Account.DAL/ApplicationDbContext.cs"
click node_expressstub "https://github.com/nazzz1324/lk-case2/blob/master/server/index.ts"

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_admin,node_teacherui,node_studentui,node_loginui,node_app toneBlue
class node_authcontroller,node_assessmentcontrollers,node_authservice,node_studentservice,node_teacherservice,node_catalogservices toneAmber
class node_results,node_accounts,node_assessmentmodel,node_peoplemodel toneMint
class node_repositories,node_unitofwork,node_db toneRose
class node_adminactor,node_teacheractor,node_studentactor toneIndigo
class node_expressstub toneTeal
```

## Components

### Role-based UI

- [Admin management](https://github.com/nazzz1324/lk-case2/tree/master/client/src/pages/admin): `client/src/pages/admin`
- [Teacher scoring UI](https://github.com/nazzz1324/lk-case2/tree/master/client/src/pages/teacher): `client/src/pages/teacher`
- [Student views](https://github.com/nazzz1324/lk-case2/tree/master/client/src/pages/student): `client/src/pages/student`
- [Login page](https://github.com/nazzz1324/lk-case2/blob/master/client/src/pages/Login.tsx): `client/src/pages/Login.tsx`
- [Routes and shell](https://github.com/nazzz1324/lk-case2/blob/master/client/src/App.tsx): `client/src/App.tsx`

### API and services

- [Auth endpoints](https://github.com/nazzz1324/lk-case2/blob/master/Account.api/Controllers/AuthController.cs): `Account.api/Controllers/AuthController.cs`
- [Assessment endpoints](https://github.com/nazzz1324/lk-case2/tree/master/Account.api/Controllers): `Account.api/Controllers`
- [Authentication service](https://github.com/nazzz1324/lk-case2/blob/master/Account.Application/Services/AuthService.cs): `Account.Application/Services/AuthService.cs`
- [Student service](https://github.com/nazzz1324/lk-case2/blob/master/Account.Application/Services/StudentService.cs): `Account.Application/Services/StudentService.cs`
- [Teacher scoring service](https://github.com/nazzz1324/lk-case2/blob/master/Account.Application/Services/TeacherService.cs): `Account.Application/Services/TeacherService.cs`
- [Catalog services](https://github.com/nazzz1324/lk-case2/tree/master/Account.Application/Services): `Account.Application/Services`

### Assessment domain

- [Result and errors](https://github.com/nazzz1324/lk-case2/blob/master/Account.Domain/Result/BaseResult.cs): `Account.Domain/Result/BaseResult.cs`
- [Accounts and roles](https://github.com/nazzz1324/lk-case2/blob/master/Account.Domain/Entity/AuthRoleEntities/User.cs): `Account.Domain/Entity/AuthRoleEntities/User.cs`
- [Assessment entities](https://github.com/nazzz1324/lk-case2/blob/master/Account.Domain/Entity/Competence.cs): `Account.Domain/Entity/Competence.cs`
- [Students and teachers](https://github.com/nazzz1324/lk-case2/blob/master/Account.Domain/Entity/Student.cs): `Account.Domain/Entity/Student.cs`

### Persistence

- [Repository layer](https://github.com/nazzz1324/lk-case2/blob/master/Account.DAL/Repositories/BaseRepository.cs): `Account.DAL/Repositories/BaseRepository.cs`
- [Unit of work](https://github.com/nazzz1324/lk-case2/blob/master/Account.DAL/Repositories/UnitOfWork.cs): `Account.DAL/Repositories/UnitOfWork.cs`
- [Application database](https://github.com/nazzz1324/lk-case2/blob/master/Account.DAL/ApplicationDbContext.cs): `Account.DAL/ApplicationDbContext.cs`

### Other components

- **Administrator**
- **Teacher**
- **Student**
- [Express stub](https://github.com/nazzz1324/lk-case2/blob/master/server/index.ts): `server/index.ts`

## Connections

- Administrator → Admin management: manages
- Teacher → Teacher scoring UI: scores students
- Student → Student views: views progress
- Routes and shell → Login page: routes to (evidence: `client/src/App.tsx`)
- Routes and shell → Admin management: routes to (evidence: `client/src/App.tsx`)
- Routes and shell → Teacher scoring UI: routes to (evidence: `client/src/App.tsx`)
- Routes and shell → Student views: routes to (evidence: `client/src/App.tsx`)
- Login page → Auth endpoints: auth wiring unclear
- Auth endpoints → Authentication service: delegates
- Assessment endpoints → Catalog services: delegates (evidence: `Account.api/Controllers/CompetenceController.cs`)
- Assessment endpoints → Student service: delegates
- Assessment endpoints → Teacher scoring service: delegates
- Authentication service → Repository layer: uses repositories (evidence: `Account.Application/Services/AuthService.cs`)
- Student service → Repository layer: uses repositories (evidence: `Account.Application/Services/StudentService.cs`)
- Teacher scoring service → Repository layer: uses repositories (evidence: `Account.Application/Services/TeacherService.cs`)
- Repository layer → Application database: uses context (evidence: `Account.DAL/Repositories/BaseRepository.cs`)
- Unit of work → Application database: coordinates persistence
- Authentication service → Accounts and roles: handles accounts (evidence: `Account.Application/Services/AuthService.cs`)
- Student service → Students and teachers: reads student data (evidence: `Account.Application/Services/StudentService.cs`)
- Teacher scoring service → Assessment entities: handles scores (evidence: `Account.Application/Services/TeacherService.cs`)
- Authentication service → Result and errors: returns results (evidence: `Account.Application/Services/AuthService.cs`)
- Express stub → Routes and shell: serves UI unclear
