# nvhau-k14/hochinhtugiac architecture

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

- Interactive diagram: https://gitdiagram.com/nvhau-k14/hochinhtugiac
- Repository: https://github.com/nvhau-k14/hochinhtugiac

## Overview

QuadWeb is an ASP.NET Core MVC learning website for Grade 8 quadrilaterals, backed by Neo4j. Learners browse shape theory, practice questions, take a scored quiz, and use search, comparison, graph, and leaderboard features. The graph shows the documented MVC-to-service-to-repository flow and the sampled Neo4j access. Several UI and controller-to-view details are supported by the README rather than inspected source; unsampled links are omitted.

Main entry points: [`src/QuadWeb/Services/ShapeService.cs`](https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Services/ShapeService.cs) (Shape services), [`src/QuadWeb/Services/QuizService.cs`](https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Services/QuizService.cs) (Quiz scoring), [`src/QuadWeb/Services/Neo4jDriverService.cs`](https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Services/Neo4jDriverService.cs) (Neo4j driver), [`src/QuadWeb/Repositories/ShapeRepository.cs`](https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Repositories/ShapeRepository.cs) (Shape knowledge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning content"]
  node_shapes["Shape browsing"]
  node_shape_detail["Shape theory"]
  node_shape_service["Shape services<br/>[ShapeService.cs]"]
  node_shape_repo["Shape knowledge<br/>[ShapeRepository.cs]"]
end

subgraph group_assessment["Practice and results"]
  node_practice["Shape practice"]
  node_quiz["Quiz taking<br/>[QuizController.cs]"]
  node_quiz_service["Quiz scoring<br/>[QuizService.cs]"]
  node_question_repo["Question data"]
  node_leaderboard["Class leaderboard"]
end

subgraph group_discovery["Knowledge discovery"]
  node_search["Knowledge search"]
  node_compare["Shape comparison"]
  node_graph_api["Hierarchy graph API"]
end

subgraph group_platform["Identity and data"]
  node_learner_middleware["Learner identity"]
  node_learner_service["Learner services<br/>[LearnerService.cs]"]
  node_learner_repo["Learner records"]
  node_driver["Neo4j driver"]
end

node_learner(("Learner"))
node_neo4j[("Neo4j graph database")]

node_learner -->|"visits site"| node_learner_middleware
node_learner_middleware -.->|"identifies requests"| node_shapes
node_shapes -->|"requests shapes"| node_shape_service
node_shape_service -->|"delegates queries"| node_shape_repo
node_shape_repo -->|"runs Cypher"| node_driver
node_shape_repo -->|"builds details"| node_shape_detail
node_learner -->|"practices"| node_practice
node_practice -->|"loads shape"| node_shape_service
node_practice -->|"checks answers"| node_quiz_service
node_quiz_service -->|"delegates questions"| node_question_repo
node_question_repo -->|"queries and saves"| node_driver
node_learner -->|"takes quiz"| node_quiz
node_quiz -->|"submits answers"| node_quiz_service
node_quiz_service -.->|"identifies learner"| node_learner_service
node_learner -->|"views scores"| node_leaderboard
node_leaderboard -->|"requests rankings"| node_learner_service
node_learner_service -->|"delegates records"| node_learner_repo
node_learner_repo -->|"queries Neo4j"| node_driver
node_learner -->|"searches knowledge"| node_search
node_search -->|"requests matches"| node_shape_service
node_learner -->|"compares shapes"| node_compare
node_compare -->|"requests comparison"| node_shape_service
node_learner -->|"opens hierarchy"| node_graph_api
node_graph_api -->|"requests graph data"| node_shape_service
node_driver -->|"opens sessions"| node_neo4j

click node_shapes "https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Controllers/ShapesController.cs"
click node_shape_detail "https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Models/ShapeDetailViewModel.cs"
click node_shape_service "https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Services/ShapeService.cs"
click node_shape_repo "https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Repositories/ShapeRepository.cs"
click node_practice "https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Controllers/PracticeController.cs"
click node_quiz "https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Controllers/QuizController.cs"
click node_quiz_service "https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Services/QuizService.cs"
click node_question_repo "https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Repositories/QuestionRepository.cs"
click node_leaderboard "https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Controllers/LeaderboardController.cs"
click node_search "https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Controllers/SearchController.cs"
click node_compare "https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Controllers/CompareController.cs"
click node_graph_api "https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Controllers/GraphApiController.cs"
click node_learner_middleware "https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Middleware/LearnerMiddleware.cs"
click node_learner_service "https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Services/LearnerService.cs"
click node_learner_repo "https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Repositories/LearnerRepository.cs"
click node_driver "https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Services/Neo4jDriverService.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_shapes,node_shape_detail,node_shape_service,node_shape_repo toneBlue
class node_practice,node_quiz,node_quiz_service,node_question_repo,node_leaderboard,node_neo4j toneAmber
class node_search,node_compare,node_graph_api toneMint
class node_learner_middleware,node_learner_service,node_learner_repo,node_driver toneRose
class node_learner toneIndigo
```

## Components

### Learning content

- [Shape browsing](https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Controllers/ShapesController.cs): `src/QuadWeb/Controllers/ShapesController.cs`
- [Shape theory](https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Models/ShapeDetailViewModel.cs): `src/QuadWeb/Models/ShapeDetailViewModel.cs`
- [Shape services](https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Services/ShapeService.cs): `src/QuadWeb/Services/ShapeService.cs`
- [Shape knowledge](https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Repositories/ShapeRepository.cs): `src/QuadWeb/Repositories/ShapeRepository.cs`

### Practice and results

- [Shape practice](https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Controllers/PracticeController.cs): `src/QuadWeb/Controllers/PracticeController.cs`
- [Quiz taking](https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Controllers/QuizController.cs): `src/QuadWeb/Controllers/QuizController.cs`
- [Quiz scoring](https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Services/QuizService.cs): `src/QuadWeb/Services/QuizService.cs`
- [Question data](https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Repositories/QuestionRepository.cs): `src/QuadWeb/Repositories/QuestionRepository.cs`
- [Class leaderboard](https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Controllers/LeaderboardController.cs): `src/QuadWeb/Controllers/LeaderboardController.cs`

### Knowledge discovery

- [Knowledge search](https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Controllers/SearchController.cs): `src/QuadWeb/Controllers/SearchController.cs`
- [Shape comparison](https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Controllers/CompareController.cs): `src/QuadWeb/Controllers/CompareController.cs`
- [Hierarchy graph API](https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Controllers/GraphApiController.cs): `src/QuadWeb/Controllers/GraphApiController.cs`

### Identity and data

- [Learner identity](https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Middleware/LearnerMiddleware.cs): `src/QuadWeb/Middleware/LearnerMiddleware.cs`
- [Learner services](https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Services/LearnerService.cs): `src/QuadWeb/Services/LearnerService.cs`
- [Learner records](https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Repositories/LearnerRepository.cs): `src/QuadWeb/Repositories/LearnerRepository.cs`
- [Neo4j driver](https://github.com/nvhau-k14/hochinhtugiac/blob/main/src/QuadWeb/Services/Neo4jDriverService.cs): `src/QuadWeb/Services/Neo4jDriverService.cs`

### Other components

- **Learner**
- **Neo4j graph database**

## Connections

- Learner → Learner identity: visits site (evidence: `README.md`)
- Learner identity → Shape browsing: identifies requests (evidence: `src/QuadWeb/Controllers/ShapesController.cs`)
- Shape browsing → Shape services: requests shapes (evidence: `src/QuadWeb/Controllers/ShapesController.cs`)
- Shape services → Shape knowledge: delegates queries (evidence: `src/QuadWeb/Services/ShapeService.cs`)
- Shape knowledge → Neo4j driver: runs Cypher (evidence: `src/QuadWeb/Repositories/ShapeRepository.cs`)
- Shape knowledge → Shape theory: builds details (evidence: `src/QuadWeb/Repositories/ShapeRepository.cs`)
- Learner → Shape practice: practices (evidence: `README.md`)
- Shape practice → Shape services: loads shape (evidence: `src/QuadWeb/Controllers/PracticeController.cs`)
- Shape practice → Quiz scoring: checks answers (evidence: `src/QuadWeb/Controllers/PracticeController.cs`)
- Quiz scoring → Question data: delegates questions (evidence: `src/QuadWeb/Services/QuizService.cs`)
- Question data → Neo4j driver: queries and saves (evidence: `src/QuadWeb/Repositories/QuestionRepository.cs`)
- Learner → Quiz taking: takes quiz (evidence: `README.md`)
- Quiz taking → Quiz scoring: submits answers (evidence: `src/QuadWeb/Controllers/QuizController.cs`)
- Quiz scoring → Learner services: identifies learner
- Learner → Class leaderboard: views scores (evidence: `README.md`)
- Class leaderboard → Learner services: requests rankings (evidence: `src/QuadWeb/Controllers/LeaderboardController.cs`)
- Learner services → Learner records: delegates records (evidence: `src/QuadWeb/Services/LearnerService.cs`)
- Learner records → Neo4j driver: queries Neo4j (evidence: `src/QuadWeb/Repositories/LearnerRepository.cs`)
- Learner → Knowledge search: searches knowledge (evidence: `README.md`)
- Knowledge search → Shape services: requests matches (evidence: `src/QuadWeb/Controllers/SearchController.cs`)
- Learner → Shape comparison: compares shapes (evidence: `README.md`)
- Shape comparison → Shape services: requests comparison (evidence: `src/QuadWeb/Controllers/CompareController.cs`)
- Learner → Hierarchy graph API: opens hierarchy (evidence: `README.md`)
- Hierarchy graph API → Shape services: requests graph data (evidence: `src/QuadWeb/Controllers/GraphApiController.cs`)
- Neo4j driver → Neo4j graph database: opens sessions (evidence: `src/QuadWeb/Services/Neo4jDriverService.cs`)
