# ashamethedestroyer/engineers-mathematical-guide architecture

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

- Interactive diagram: https://gitdiagram.com/ashamethedestroyer/engineers-mathematical-guide
- Repository: https://github.com/ashamethedestroyer/engineers-mathematical-guide

## Overview

Mathware is a web-based mathematics learning guide for engineering learners, with a React frontend and NestJS API. The user-facing path is discovering courses, modules, lessons, learning tracks, and math equations; related backend resources expose CRUD endpoints for course content, ratings, and tags. Registration and profiles, plus an admin dashboard, are distinct product areas. The README describes the learning goal, while the sampled files chiefly establish routing and selected API calls; unsampled integrations and persistence details are therefore not asserted.

Main entry points: [`frontend/src/routes/discover.routes.tsx`](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/routes/discover.routes.tsx) (Discovery routes), [`frontend/src/routes.tsx`](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/routes.tsx) (App routes), [`frontend/src/pages/DiscoverPage/pages/CoursePage.tsx`](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/pages/DiscoverPage/pages/CoursePage.tsx) (Course page), [`frontend/src/hooks/useExtendedQuery.ts`](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/hooks/useExtendedQuery.ts) (Query hook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Learning frontend"]
  node_routes["App routes<br/>[routes.tsx]"]
  node_discover_routes["Discovery routes"]
  node_course_page["Course page<br/>[CoursePage.tsx]"]
  node_track_page["Learning track page"]
  node_lesson_page["Lesson page<br/>[LessonPage.tsx]"]
  node_equations_page["Equation pages"]
  node_modules_page["Modules page<br/>[ModulesPage.tsx]"]
  node_query_hook["Query hook"]
  node_query_manager["HTTP query layer<br/>[HTTPManager.ts]"]
  node_learning_track_list["Track listing"]
  node_equation_detail["Equation detail"]
end

subgraph group_identity["Accounts and profiles"]
  node_auth_controller["Auth endpoints<br/>[auth.controller.ts]"]
  node_auth_service["Authentication<br/>[auth.service.ts]"]
  node_auth_dtos["Login and signup DTOs<br/>[signup.dto.ts]"]
  node_mailer["Mail service<br/>[mailer.service.ts]"]
end

subgraph group_content["Learning content API"]
  node_course_controller["Course endpoints"]
  node_course_service["Course operations<br/>[course.service.ts]"]
  node_chapter_controller["Chapter endpoints"]
  node_math_controller["Equation endpoints"]
  node_question_controller["Question endpoints"]
end

subgraph group_engagement["Learning interactions"]
  node_rating_controller["Rating endpoints"]
  node_tag_controller["Course-tag endpoints"]
  node_enrollment_controller["Enrollment endpoints"]
end

node_learner(("Learner"))

node_learner -->|"opens app"| node_routes
node_routes -->|"composes routes"| node_discover_routes
node_discover_routes -->|"routes to"| node_course_page
node_discover_routes -->|"routes to"| node_track_page
node_discover_routes -->|"routes to"| node_lesson_page
node_discover_routes -->|"routes to"| node_equations_page
node_discover_routes -->|"routes to"| node_modules_page
node_discover_routes -->|"routes to"| node_discover_routes
node_learner -.->|"registers or logs in"| node_auth_controller
node_auth_controller -->|"delegates to"| node_auth_service
node_auth_service -->|"sends mail"| node_mailer
node_learner -.->|"requests courses"| node_course_controller
node_course_controller -->|"delegates to"| node_course_service
node_learner -.->|"requests chapters"| node_chapter_controller
node_learner -.->|"requests equations"| node_math_controller
node_learner -.->|"requests questions"| node_question_controller
node_learner -.->|"rates courses"| node_rating_controller
node_rating_controller -->|"updates course rating"| node_course_service
node_learner -.->|"manages course tags"| node_tag_controller
node_learner -.->|"manages enrollment"| node_enrollment_controller
node_course_page -.->|"loads data"| node_query_hook
node_query_hook -.->|"requests data"| node_query_manager

click node_routes "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/routes.tsx"
click node_discover_routes "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/routes/discover.routes.tsx"
click node_course_page "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/pages/DiscoverPage/pages/CoursePage.tsx"
click node_track_page "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/pages/DiscoverPage/pages/LearningTrackPage.tsx"
click node_lesson_page "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/pages/DiscoverPage/pages/LessonPage.tsx"
click node_equations_page "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/pages/DiscoverPage/pages/MathEquationsPage.tsx"
click node_modules_page "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/pages/DiscoverPage/pages/ModulesPage.tsx"
click node_query_hook "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/hooks/useExtendedQuery.ts"
click node_auth_controller "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/auth/auth.controller.ts"
click node_auth_service "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/auth/auth.service.ts"
click node_auth_dtos "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/auth/dto/signup.dto.ts"
click node_course_controller "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/course/course.controller.ts"
click node_course_service "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/course/course.service.ts"
click node_chapter_controller "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/chapter/chapter.controller.ts"
click node_math_controller "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/math-equation/math-equation.controller.ts"
click node_question_controller "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/question/question.controller.ts"
click node_rating_controller "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/course-rating/course-rating.controller.ts"
click node_tag_controller "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/courses-tags/courses-tags.controller.ts"
click node_enrollment_controller "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/user-enrolled-courses/user-enrolled-courses.controller.ts"
click node_mailer "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/mailer/mailer.service.ts"
click node_query_manager "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/managers/HTTPManager.ts"
click node_learning_track_list "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/pages/DiscoverPage/pages/LearningTracksPage.tsx"
click node_equation_detail "https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/pages/DiscoverPage/pages/MathEquationPage.tsx"

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_routes,node_discover_routes,node_course_page,node_track_page,node_lesson_page,node_equations_page,node_modules_page,node_query_hook,node_query_manager,node_learning_track_list,node_equation_detail toneBlue
class node_auth_controller,node_auth_service,node_auth_dtos,node_mailer toneAmber
class node_course_controller,node_course_service,node_chapter_controller,node_math_controller,node_question_controller toneMint
class node_rating_controller,node_tag_controller,node_enrollment_controller toneRose
class node_learner toneIndigo
```

## Components

### Learning frontend

- [App routes](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/routes.tsx): `frontend/src/routes.tsx`
- [Discovery routes](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/routes/discover.routes.tsx): `frontend/src/routes/discover.routes.tsx`
- [Course page](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/pages/DiscoverPage/pages/CoursePage.tsx): `frontend/src/pages/DiscoverPage/pages/CoursePage.tsx`
- [Learning track page](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/pages/DiscoverPage/pages/LearningTrackPage.tsx): `frontend/src/pages/DiscoverPage/pages/LearningTrackPage.tsx`
- [Lesson page](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/pages/DiscoverPage/pages/LessonPage.tsx): `frontend/src/pages/DiscoverPage/pages/LessonPage.tsx`
- [Equation pages](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/pages/DiscoverPage/pages/MathEquationsPage.tsx): `frontend/src/pages/DiscoverPage/pages/MathEquationsPage.tsx`
- [Modules page](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/pages/DiscoverPage/pages/ModulesPage.tsx): `frontend/src/pages/DiscoverPage/pages/ModulesPage.tsx`
- [Query hook](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/hooks/useExtendedQuery.ts): `frontend/src/hooks/useExtendedQuery.ts`
- [HTTP query layer](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/managers/HTTPManager.ts): `frontend/src/managers/HTTPManager.ts`
- [Track listing](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/pages/DiscoverPage/pages/LearningTracksPage.tsx): `frontend/src/pages/DiscoverPage/pages/LearningTracksPage.tsx`
- [Equation detail](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/frontend/src/pages/DiscoverPage/pages/MathEquationPage.tsx): `frontend/src/pages/DiscoverPage/pages/MathEquationPage.tsx`

### Accounts and profiles

- [Auth endpoints](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/auth/auth.controller.ts): `backend/src/auth/auth.controller.ts`
- [Authentication](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/auth/auth.service.ts): `backend/src/auth/auth.service.ts`
- [Login and signup DTOs](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/auth/dto/signup.dto.ts): `backend/src/auth/dto/signup.dto.ts`
- [Mail service](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/mailer/mailer.service.ts): `backend/src/mailer/mailer.service.ts`

### Learning content API

- [Course endpoints](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/course/course.controller.ts): `backend/src/course/course.controller.ts`
- [Course operations](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/course/course.service.ts): `backend/src/course/course.service.ts`
- [Chapter endpoints](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/chapter/chapter.controller.ts): `backend/src/chapter/chapter.controller.ts`
- [Equation endpoints](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/math-equation/math-equation.controller.ts): `backend/src/math-equation/math-equation.controller.ts`
- [Question endpoints](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/question/question.controller.ts): `backend/src/question/question.controller.ts`

### Learning interactions

- [Rating endpoints](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/course-rating/course-rating.controller.ts): `backend/src/course-rating/course-rating.controller.ts`
- [Course-tag endpoints](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/courses-tags/courses-tags.controller.ts): `backend/src/courses-tags/courses-tags.controller.ts`
- [Enrollment endpoints](https://github.com/ashamethedestroyer/engineers-mathematical-guide/blob/master/backend/src/user-enrolled-courses/user-enrolled-courses.controller.ts): `backend/src/user-enrolled-courses/user-enrolled-courses.controller.ts`

### Other components

- **Learner**

## Connections

- Learner → App routes: opens app (evidence: `frontend/src/routes.tsx`)
- App routes → Discovery routes: composes routes (evidence: `frontend/src/routes.tsx`)
- Discovery routes → Course page: routes to (evidence: `frontend/src/routes/discover.routes.tsx`)
- Discovery routes → Learning track page: routes to (evidence: `frontend/src/routes/discover.routes.tsx`)
- Discovery routes → Lesson page: routes to (evidence: `frontend/src/routes/discover.routes.tsx`)
- Discovery routes → Equation pages: routes to (evidence: `frontend/src/routes/discover.routes.tsx`)
- Discovery routes → Modules page: routes to (evidence: `frontend/src/routes/discover.routes.tsx`)
- Discovery routes → Discovery routes: routes to (evidence: `frontend/src/routes/discover.routes.tsx`)
- Learner → Auth endpoints: registers or logs in (evidence: `backend/src/auth/auth.controller.ts`)
- Auth endpoints → Authentication: delegates to (evidence: `backend/src/auth/auth.controller.ts`)
- Authentication → Mail service: sends mail (evidence: `backend/src/auth/auth.service.ts`)
- Learner → Course endpoints: requests courses (evidence: `backend/src/course/course.controller.ts`)
- Course endpoints → Course operations: delegates to (evidence: `backend/src/course/course.controller.ts`)
- Learner → Chapter endpoints: requests chapters (evidence: `backend/src/chapter/chapter.controller.ts`)
- Learner → Equation endpoints: requests equations (evidence: `backend/src/math-equation/math-equation.controller.ts`)
- Learner → Question endpoints: requests questions (evidence: `backend/src/question/question.controller.ts`)
- Learner → Rating endpoints: rates courses (evidence: `backend/src/course-rating/course-rating.controller.ts`)
- Rating endpoints → Course operations: updates course rating (evidence: `backend/src/course-rating/course-rating.controller.ts`)
- Learner → Course-tag endpoints: manages course tags (evidence: `backend/src/courses-tags/courses-tags.controller.ts`)
- Learner → Enrollment endpoints: manages enrollment (evidence: `backend/src/user-enrolled-courses/user-enrolled-courses.controller.ts`)
- Course page → Query hook: loads data
- Query hook → HTTP query layer: requests data
