# andreii2305/sharprunner architecture

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

- Interactive diagram: https://gitdiagram.com/andreii2305/sharprunner
- Repository: https://github.com/andreii2305/sharprunner

## Overview

SharpRunner is a full-stack C# learning platform. Students authenticate, join a classroom, study lessons, then solve C# challenges in game levels; attempts, scores, and progression are persisted. Teachers manage classroom content and student work, while admins govern accounts and platform activity. The graph emphasizes those documented capabilities and the shown application/API wiring. Many domain routes and frontend pages are not excerpted, so their internal calls are not asserted; dashed links indicate major documented workflows whose exact code path was not sampled.

Main entry points: [`frontend/src/App.jsx`](https://github.com/andreii2305/sharprunner/blob/main/frontend/src/App.jsx) (Web App Router), [`backend/src/app.js`](https://github.com/andreii2305/sharprunner/blob/main/backend/src/app.js) (Express API), [`backend/src/models/User.js`](https://github.com/andreii2305/sharprunner/blob/main/backend/src/models/User.js) (Domain Models), [`frontend/src/pages/game/GamePage.jsx`](https://github.com/andreii2305/sharprunner/blob/main/frontend/src/pages/game/GamePage.jsx) (Coding Game)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Student Web App"]
  node_webapp["Web App Router<br/>[App.jsx]"]
  node_authui["Auth &amp; Session<br/>[auth.js]"]
  node_dashboard["Student Dashboard<br/>[Dashboard.jsx]"]
end

subgraph group_learning["Learning Experience"]
  node_curriculum["Lesson Map<br/>[LessonMapPage.jsx]"]
  node_lessonui["Lesson Content<br/>[LessonRenderer.jsx]"]
  node_gameui["Coding Game<br/>[GamePage.jsx]"]
  node_levels["Level Scenes<br/>[LevelOneScene.js]"]
  node_practiceui["C&#35; Editor"]
  node_assessmentui["Assessment Player"]
end

subgraph group_classroom["Classroom Tools"]
  node_teacherui["Classroom Management"]
  node_builderui["Lesson Builder"]
  node_analyticsui["Teacher Analytics"]
  node_adminui["Admin Governance"]
end

subgraph group_api["Backend API"]
  node_apiapp["Express API<br/>[app.js]"]
  node_authapi["Authentication<br/>[auth.js]"]
  node_progressapi["Progress &amp; Scoring<br/>[progress.js]"]
  node_practiceapi["Practice Runner"]
  node_compiler["Roslyn Compiler Host<br/>[Program.cs]"]
  node_classapi["Classroom Services<br/>[teacher.js]"]
  node_assessmentapi["Assessment Services<br/>[assessments.js]"]
  node_adminapi["Admin Services<br/>[admin.js]"]
  node_fileapi["Lesson File Storage"]
end

subgraph group_data["Persistence"]
  node_models["Domain Models<br/>[User.js]"]
  node_postgres[("PostgreSQL<br/>[database.js]")]
end

node_student(("Student"))
node_teacher(("Teacher"))
node_admin(("Admin"))
node_supabase[("Supabase Storage")]

node_student -.->|"uses"| node_webapp
node_teacher -.->|"uses"| node_webapp
node_admin -.->|"uses"| node_webapp
node_webapp -->|"routes through"| node_authui
node_webapp -->|"routes to"| node_dashboard
node_webapp -->|"routes to"| node_curriculum
node_webapp -->|"routes to"| node_teacherui
node_webapp -->|"routes to"| node_adminui
node_student -.->|"selects lessons"| node_curriculum
node_curriculum -.->|"opens lesson"| node_lessonui
node_student -.->|"plays levels"| node_gameui
node_gameui -.->|"loads scenes"| node_levels
node_gameui -.->|"hosts editor"| node_practiceui
node_student -.->|"takes assessment"| node_assessmentui
node_teacher -.->|"manages classes"| node_teacherui
node_teacher -.->|"creates content"| node_builderui
node_teacher -.->|"reviews metrics"| node_analyticsui
node_admin -.->|"governs platform"| node_adminui
node_apiapp -->|"mounts routes"| node_authapi
node_apiapp -->|"mounts routes"| node_progressapi
node_apiapp -->|"mounts routes"| node_assessmentapi
node_apiapp -->|"mounts routes"| node_classapi
node_apiapp -->|"mounts routes"| node_adminapi
node_apiapp -->|"mounts routes"| node_practiceapi
node_webapp -.->|"requests API"| node_apiapp
node_practiceapi -->|"compiles code"| node_compiler
node_authapi -->|"reads users"| node_models
node_classapi -->|"manages classroom data"| node_models
node_assessmentapi -.->|"stores attempts"| node_models
node_progressapi -.->|"saves progress"| node_models
node_adminapi -->|"governs records"| node_models
node_fileapi -.->|"stores files"| node_supabase
node_fileapi -.->|"uses file records"| node_models
node_models -->|"persists data"| node_postgres

click node_webapp "https://github.com/andreii2305/sharprunner/blob/main/frontend/src/App.jsx"
click node_authui "https://github.com/andreii2305/sharprunner/blob/main/frontend/src/utils/auth.js"
click node_dashboard "https://github.com/andreii2305/sharprunner/blob/main/frontend/src/Components/Dashboard/Dashboard.jsx"
click node_curriculum "https://github.com/andreii2305/sharprunner/blob/main/frontend/src/pages/map/LessonMapPage.jsx"
click node_lessonui "https://github.com/andreii2305/sharprunner/blob/main/frontend/src/Components/LessonRenderer/LessonRenderer.jsx"
click node_gameui "https://github.com/andreii2305/sharprunner/blob/main/frontend/src/pages/game/GamePage.jsx"
click node_levels "https://github.com/andreii2305/sharprunner/blob/main/frontend/src/pages/game/scenes/LevelOneScene.js"
click node_practiceui "https://github.com/andreii2305/sharprunner/blob/main/frontend/src/Components/PracticeCompiler/PracticeCompiler.jsx"
click node_assessmentui "https://github.com/andreii2305/sharprunner/blob/main/frontend/src/pages/student/assessment/AssessmentPlayer.jsx"
click node_teacherui "https://github.com/andreii2305/sharprunner/blob/main/frontend/src/pages/teacher/TeacherClassDetailPage.jsx"
click node_builderui "https://github.com/andreii2305/sharprunner/blob/main/frontend/src/pages/teacher/TeacherLessonBuilderPage.jsx"
click node_analyticsui "https://github.com/andreii2305/sharprunner/blob/main/frontend/src/pages/teacher/TeacherAnalyticsPage.jsx"
click node_adminui "https://github.com/andreii2305/sharprunner/blob/main/frontend/src/pages/admin/AdminDashboardPage.jsx"
click node_apiapp "https://github.com/andreii2305/sharprunner/blob/main/backend/src/app.js"
click node_authapi "https://github.com/andreii2305/sharprunner/blob/main/backend/src/routes/auth.js"
click node_progressapi "https://github.com/andreii2305/sharprunner/blob/main/backend/src/routes/progress.js"
click node_practiceapi "https://github.com/andreii2305/sharprunner/blob/main/backend/src/services/practiceRunnerService.js"
click node_compiler "https://github.com/andreii2305/sharprunner/blob/main/backend/compiler-host/Program.cs"
click node_classapi "https://github.com/andreii2305/sharprunner/blob/main/backend/src/routes/teacher.js"
click node_assessmentapi "https://github.com/andreii2305/sharprunner/blob/main/backend/src/routes/assessments.js"
click node_adminapi "https://github.com/andreii2305/sharprunner/blob/main/backend/src/routes/admin.js"
click node_fileapi "https://github.com/andreii2305/sharprunner/blob/main/backend/src/services/lessonFileStorageService.js"
click node_models "https://github.com/andreii2305/sharprunner/blob/main/backend/src/models/User.js"
click node_postgres "https://github.com/andreii2305/sharprunner/blob/main/backend/src/config/database.js"

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_webapp,node_authui,node_dashboard toneBlue
class node_curriculum,node_lessonui,node_gameui,node_levels,node_practiceui,node_assessmentui,node_supabase toneAmber
class node_teacherui,node_builderui,node_analyticsui,node_adminui toneMint
class node_apiapp,node_authapi,node_progressapi,node_practiceapi,node_compiler,node_classapi,node_assessmentapi,node_adminapi,node_fileapi toneRose
class node_models,node_postgres,node_student,node_teacher,node_admin toneIndigo
```

## Components

### Student Web App

- [Web App Router](https://github.com/andreii2305/sharprunner/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Auth & Session](https://github.com/andreii2305/sharprunner/blob/main/frontend/src/utils/auth.js): `frontend/src/utils/auth.js`
- [Student Dashboard](https://github.com/andreii2305/sharprunner/blob/main/frontend/src/Components/Dashboard/Dashboard.jsx): `frontend/src/Components/Dashboard/Dashboard.jsx`

### Learning Experience

- [Lesson Map](https://github.com/andreii2305/sharprunner/blob/main/frontend/src/pages/map/LessonMapPage.jsx): `frontend/src/pages/map/LessonMapPage.jsx`
- [Lesson Content](https://github.com/andreii2305/sharprunner/blob/main/frontend/src/Components/LessonRenderer/LessonRenderer.jsx): `frontend/src/Components/LessonRenderer/LessonRenderer.jsx`
- [Coding Game](https://github.com/andreii2305/sharprunner/blob/main/frontend/src/pages/game/GamePage.jsx): `frontend/src/pages/game/GamePage.jsx`
- [Level Scenes](https://github.com/andreii2305/sharprunner/blob/main/frontend/src/pages/game/scenes/LevelOneScene.js): `frontend/src/pages/game/scenes/LevelOneScene.js`
- [C# Editor](https://github.com/andreii2305/sharprunner/blob/main/frontend/src/Components/PracticeCompiler/PracticeCompiler.jsx): `frontend/src/Components/PracticeCompiler/PracticeCompiler.jsx`
- [Assessment Player](https://github.com/andreii2305/sharprunner/blob/main/frontend/src/pages/student/assessment/AssessmentPlayer.jsx): `frontend/src/pages/student/assessment/AssessmentPlayer.jsx`

### Classroom Tools

- [Classroom Management](https://github.com/andreii2305/sharprunner/blob/main/frontend/src/pages/teacher/TeacherClassDetailPage.jsx): `frontend/src/pages/teacher/TeacherClassDetailPage.jsx`
- [Lesson Builder](https://github.com/andreii2305/sharprunner/blob/main/frontend/src/pages/teacher/TeacherLessonBuilderPage.jsx): `frontend/src/pages/teacher/TeacherLessonBuilderPage.jsx`
- [Teacher Analytics](https://github.com/andreii2305/sharprunner/blob/main/frontend/src/pages/teacher/TeacherAnalyticsPage.jsx): `frontend/src/pages/teacher/TeacherAnalyticsPage.jsx`
- [Admin Governance](https://github.com/andreii2305/sharprunner/blob/main/frontend/src/pages/admin/AdminDashboardPage.jsx): `frontend/src/pages/admin/AdminDashboardPage.jsx`

### Backend API

- [Express API](https://github.com/andreii2305/sharprunner/blob/main/backend/src/app.js): `backend/src/app.js`
- [Authentication](https://github.com/andreii2305/sharprunner/blob/main/backend/src/routes/auth.js): `backend/src/routes/auth.js`
- [Progress & Scoring](https://github.com/andreii2305/sharprunner/blob/main/backend/src/routes/progress.js): `backend/src/routes/progress.js`
- [Practice Runner](https://github.com/andreii2305/sharprunner/blob/main/backend/src/services/practiceRunnerService.js): `backend/src/services/practiceRunnerService.js`
- [Roslyn Compiler Host](https://github.com/andreii2305/sharprunner/blob/main/backend/compiler-host/Program.cs): `backend/compiler-host/Program.cs`
- [Classroom Services](https://github.com/andreii2305/sharprunner/blob/main/backend/src/routes/teacher.js): `backend/src/routes/teacher.js`
- [Assessment Services](https://github.com/andreii2305/sharprunner/blob/main/backend/src/routes/assessments.js): `backend/src/routes/assessments.js`
- [Admin Services](https://github.com/andreii2305/sharprunner/blob/main/backend/src/routes/admin.js): `backend/src/routes/admin.js`
- [Lesson File Storage](https://github.com/andreii2305/sharprunner/blob/main/backend/src/services/lessonFileStorageService.js): `backend/src/services/lessonFileStorageService.js`

### Persistence

- [Domain Models](https://github.com/andreii2305/sharprunner/blob/main/backend/src/models/User.js): `backend/src/models/User.js`
- [PostgreSQL](https://github.com/andreii2305/sharprunner/blob/main/backend/src/config/database.js): `backend/src/config/database.js`

### Other components

- **Student**
- **Teacher**
- **Admin**
- **Supabase Storage**

## Connections

- Student → Web App Router: uses
- Teacher → Web App Router: uses
- Admin → Web App Router: uses
- Web App Router → Auth & Session: routes through (evidence: `frontend/src/App.jsx`)
- Web App Router → Student Dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Web App Router → Lesson Map: routes to (evidence: `frontend/src/App.jsx`)
- Web App Router → Classroom Management: routes to (evidence: `frontend/src/App.jsx`)
- Web App Router → Admin Governance: routes to (evidence: `frontend/src/App.jsx`)
- Student → Lesson Map: selects lessons
- Lesson Map → Lesson Content: opens lesson
- Student → Coding Game: plays levels
- Coding Game → Level Scenes: loads scenes
- Coding Game → C# Editor: hosts editor
- Student → Assessment Player: takes assessment
- Teacher → Classroom Management: manages classes
- Teacher → Lesson Builder: creates content
- Teacher → Teacher Analytics: reviews metrics
- Admin → Admin Governance: governs platform
- Express API → Authentication: mounts routes (evidence: `backend/src/app.js`)
- Express API → Progress & Scoring: mounts routes (evidence: `backend/src/app.js`)
- Express API → Assessment Services: mounts routes (evidence: `backend/src/app.js`)
- Express API → Classroom Services: mounts routes (evidence: `backend/src/app.js`)
- Express API → Admin Services: mounts routes (evidence: `backend/src/app.js`)
- Express API → Practice Runner: mounts routes (evidence: `backend/src/app.js`)
- Web App Router → Express API: requests API
- Practice Runner → Roslyn Compiler Host: compiles code (evidence: `backend/src/services/practiceRunnerService.js`)
- Authentication → Domain Models: reads users (evidence: `backend/src/routes/auth.js`)
- Classroom Services → Domain Models: manages classroom data (evidence: `backend/src/routes/teacher.js`)
- Assessment Services → Domain Models: stores attempts
- Progress & Scoring → Domain Models: saves progress
- Admin Services → Domain Models: governs records (evidence: `backend/src/routes/admin.js`)
- Lesson File Storage → Supabase Storage: stores files (evidence: `backend/src/services/lessonFileStorageService.js`)
- Lesson File Storage → Domain Models: uses file records
- Domain Models → PostgreSQL: persists data (evidence: `backend/src/models/User.js`)
