# yarajabr2005-svg/yt2utor architecture

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

- Interactive diagram: https://gitdiagram.com/yarajabr2005-svg/yt2utor
- Repository: https://github.com/yarajabr2005-svg/yt2utor

## Overview

YT2UTOR is a tutor-matching platform for learners and verified experts. Its principal workflow is discovering tutors against skills and real-time availability, then requesting and managing a lesson booking; completed lessons can be reviewed. The backend also provides semantic, urgency-aware recommendations, profile and skill management, and email notifications. The frontend supplies authentication and role-specific workspaces. Some backend views and endpoint wiring were not sampled, so frontend-to-backend routing is shown as unverified rather than asserted.

Main entry points: [`backend/apps/bookings/services.py`](https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/bookings/services.py) (Booking service), [`frontend/src/pages/AppWorkspace.jsx`](https://github.com/yarajabr2005-svg/yt2utor/blob/main/frontend/src/pages/AppWorkspace.jsx) (Role workspaces), [`backend/apps/ai/services.py`](https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/ai/services.py) (AI recommendations), [`backend/apps/reviews/services.py`](https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/reviews/services.py) (Reviews)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_auth_pages["Auth pages<br/>[LoginPage.jsx]"]
  node_workspace["Role workspaces<br/>[AppWorkspace.jsx]"]
  node_student_view["Student workspace"]
  node_tutor_view["Tutor workspace<br/>[TutorWorkspace.jsx]"]
  node_admin_view["Admin workspace<br/>[AdminWorkspace.jsx]"]
  node_feedback_ui["Feedback UI"]
end

subgraph group_identity["Identity and profiles"]
  node_auth_state["Auth state<br/>[AuthContext.jsx]"]
  node_auth_api["Auth API client<br/>[auth.js]"]
  node_user_profiles[("User profiles<br/>[models.py]")]
  node_user_services["User services<br/>[services.py]"]
end

subgraph group_discovery["Tutor discovery"]
  node_skills[("Tutor skills<br/>[models.py]")]
  node_availability[("Availability slots<br/>[models.py]")]
  node_recommendations["AI recommendations<br/>[services.py]"]
  node_embeddings[("Tutor embeddings<br/>[models.py]")]
end

subgraph group_sessions["Lessons and feedback"]
  node_bookings["Booking service<br/>[services.py]"]
  node_booking_records[("Bookings<br/>[models.py]")]
  node_reviews["Reviews<br/>[services.py]"]
  node_review_records[("Review records<br/>[models.py]")]
end

subgraph group_messaging["Notifications"]
  node_notifications["Email notifications<br/>[services.py]"]
end

node_learners(("Learners"))
node_experts(("Tutors"))
node_api_router["API routing<br/>[urls.py]"]

node_learners -.->|"sign in"| node_auth_pages
node_experts -.->|"sign in"| node_auth_pages
node_auth_state -->|"calls"| node_auth_api
node_auth_api -.->|"requests profile"| node_user_profiles
node_workspace -->|"selects role view"| node_student_view
node_workspace -->|"selects role view"| node_tutor_view
node_workspace -->|"selects role view"| node_admin_view
node_auth_pages -->|"uses auth"| node_auth_state
node_student_view -.->|"requests platform data"| node_api_router
node_tutor_view -.->|"requests platform data"| node_api_router
node_recommendations -->|"reads and ranks"| node_embeddings
node_recommendations -->|"filters tutors"| node_skills
node_recommendations -->|"checks times"| node_availability
node_bookings -->|"creates and updates"| node_booking_records
node_bookings -->|"checks slot"| node_availability
node_bookings -->|"validates teaching"| node_skills
node_bookings -->|"sends booking emails"| node_notifications
node_reviews -->|"validates completion"| node_booking_records
node_reviews -->|"creates and reads"| node_review_records
node_reviews -->|"updates tutor rating"| node_user_profiles
node_user_services -->|"sends account email"| node_notifications
node_feedback_ui -.->|"shows feedback"| node_learners

click node_auth_pages "https://github.com/yarajabr2005-svg/yt2utor/blob/main/frontend/src/pages/Auth/LoginPage.jsx"
click node_workspace "https://github.com/yarajabr2005-svg/yt2utor/blob/main/frontend/src/pages/AppWorkspace.jsx"
click node_student_view "https://github.com/yarajabr2005-svg/yt2utor/blob/main/frontend/src/pages/workspace/StudentWorkspace.jsx"
click node_tutor_view "https://github.com/yarajabr2005-svg/yt2utor/blob/main/frontend/src/pages/workspace/TutorWorkspace.jsx"
click node_admin_view "https://github.com/yarajabr2005-svg/yt2utor/blob/main/frontend/src/pages/workspace/AdminWorkspace.jsx"
click node_auth_state "https://github.com/yarajabr2005-svg/yt2utor/blob/main/frontend/src/context/AuthContext.jsx"
click node_auth_api "https://github.com/yarajabr2005-svg/yt2utor/blob/main/frontend/src/api/auth.js"
click node_user_profiles "https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/users/models.py"
click node_user_services "https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/users/services.py"
click node_skills "https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/skills/models.py"
click node_availability "https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/availability/models.py"
click node_recommendations "https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/ai/services.py"
click node_embeddings "https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/ai/models.py"
click node_bookings "https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/bookings/services.py"
click node_booking_records "https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/bookings/models.py"
click node_reviews "https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/reviews/services.py"
click node_review_records "https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/reviews/models.py"
click node_notifications "https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/notifications/services.py"
click node_feedback_ui "https://github.com/yarajabr2005-svg/yt2utor/blob/main/frontend/src/context/FeedbackContext.jsx"
click node_api_router "https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/config/urls.py"

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_auth_pages,node_workspace,node_student_view,node_tutor_view,node_admin_view,node_feedback_ui toneBlue
class node_auth_state,node_auth_api,node_user_profiles,node_user_services toneAmber
class node_skills,node_availability,node_recommendations,node_embeddings,node_api_router toneMint
class node_bookings,node_booking_records,node_reviews,node_review_records toneRose
class node_notifications,node_learners,node_experts toneIndigo
```

## Components

### Web client

- [Auth pages](https://github.com/yarajabr2005-svg/yt2utor/blob/main/frontend/src/pages/Auth/LoginPage.jsx): `frontend/src/pages/Auth/LoginPage.jsx`
- [Role workspaces](https://github.com/yarajabr2005-svg/yt2utor/blob/main/frontend/src/pages/AppWorkspace.jsx): `frontend/src/pages/AppWorkspace.jsx`
- [Student workspace](https://github.com/yarajabr2005-svg/yt2utor/blob/main/frontend/src/pages/workspace/StudentWorkspace.jsx): `frontend/src/pages/workspace/StudentWorkspace.jsx`
- [Tutor workspace](https://github.com/yarajabr2005-svg/yt2utor/blob/main/frontend/src/pages/workspace/TutorWorkspace.jsx): `frontend/src/pages/workspace/TutorWorkspace.jsx`
- [Admin workspace](https://github.com/yarajabr2005-svg/yt2utor/blob/main/frontend/src/pages/workspace/AdminWorkspace.jsx): `frontend/src/pages/workspace/AdminWorkspace.jsx`
- [Feedback UI](https://github.com/yarajabr2005-svg/yt2utor/blob/main/frontend/src/context/FeedbackContext.jsx): `frontend/src/context/FeedbackContext.jsx`

### Identity and profiles

- [Auth state](https://github.com/yarajabr2005-svg/yt2utor/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Auth API client](https://github.com/yarajabr2005-svg/yt2utor/blob/main/frontend/src/api/auth.js): `frontend/src/api/auth.js`
- [User profiles](https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/users/models.py): `backend/apps/users/models.py`
- [User services](https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/users/services.py): `backend/apps/users/services.py`

### Tutor discovery

- [Tutor skills](https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/skills/models.py): `backend/apps/skills/models.py`
- [Availability slots](https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/availability/models.py): `backend/apps/availability/models.py`
- [AI recommendations](https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/ai/services.py): `backend/apps/ai/services.py`
- [Tutor embeddings](https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/ai/models.py): `backend/apps/ai/models.py`

### Lessons and feedback

- [Booking service](https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/bookings/services.py): `backend/apps/bookings/services.py`
- [Bookings](https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/bookings/models.py): `backend/apps/bookings/models.py`
- [Reviews](https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/reviews/services.py): `backend/apps/reviews/services.py`
- [Review records](https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/reviews/models.py): `backend/apps/reviews/models.py`

### Notifications

- [Email notifications](https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/apps/notifications/services.py): `backend/apps/notifications/services.py`

### Other components

- **Learners**
- **Tutors**
- [API routing](https://github.com/yarajabr2005-svg/yt2utor/blob/main/backend/config/urls.py): `backend/config/urls.py`

## Connections

- Learners → Auth pages: sign in (evidence: `README.md`)
- Tutors → Auth pages: sign in (evidence: `README.md`)
- Auth state → Auth API client: calls (evidence: `frontend/src/context/AuthContext.jsx`)
- Auth API client → User profiles: requests profile
- Role workspaces → Student workspace: selects role view (evidence: `frontend/src/pages/AppWorkspace.jsx`)
- Role workspaces → Tutor workspace: selects role view (evidence: `frontend/src/pages/AppWorkspace.jsx`)
- Role workspaces → Admin workspace: selects role view (evidence: `frontend/src/pages/AppWorkspace.jsx`)
- Auth pages → Auth state: uses auth (evidence: `frontend/src/pages/Auth/LoginPage.jsx`)
- Student workspace → API routing: requests platform data
- Tutor workspace → API routing: requests platform data
- AI recommendations → Tutor embeddings: reads and ranks (evidence: `backend/apps/ai/services.py`)
- AI recommendations → Tutor skills: filters tutors (evidence: `backend/apps/ai/services.py`)
- AI recommendations → Availability slots: checks times (evidence: `backend/apps/ai/services.py`)
- Booking service → Bookings: creates and updates (evidence: `backend/apps/bookings/services.py`)
- Booking service → Availability slots: checks slot (evidence: `backend/apps/bookings/services.py`)
- Booking service → Tutor skills: validates teaching (evidence: `backend/apps/bookings/services.py`)
- Booking service → Email notifications: sends booking emails (evidence: `backend/apps/bookings/services.py`)
- Reviews → Bookings: validates completion (evidence: `backend/apps/reviews/services.py`)
- Reviews → Review records: creates and reads (evidence: `backend/apps/reviews/services.py`)
- Reviews → User profiles: updates tutor rating (evidence: `backend/apps/reviews/services.py`)
- User services → Email notifications: sends account email (evidence: `backend/apps/users/services.py`)
- Feedback UI → Learners: shows feedback
