# modsunxx/uni-tutor architecture

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

- Interactive diagram: https://gitdiagram.com/modsunxx/uni-tutor
- Repository: https://github.com/modsunxx/uni-tutor

## Overview

Uni-Tutor is a student tutoring marketplace: students register, discover courses and tutors, and use role-specific dashboards; tutors apply, manage courses and availability, while admins review tutor applications. The graph separates authentication, discovery/profile, course operations, and shared Supabase services. Some major route files were indexed but not fully excerpted, so their detailed runtime calls are not inferred; documented capabilities are retained with evidence limits noted.

Main entry points: [`src/utils/supabase/client.ts`](https://github.com/modsunxx/uni-tutor/blob/main/src/utils/supabase/client.ts) (Browser Client), [`src/app/(auth)/register/page.tsx`](https://github.com/modsunxx/uni-tutor/blob/main/src/app/(auth)/register/page.tsx) (Registration), [`src/app/search/page.tsx`](https://github.com/modsunxx/uni-tutor/blob/main/src/app/search/page.tsx) (Course Search), [`src/app/courses/[id]/page.tsx`](https://github.com/modsunxx/uni-tutor/blob/main/src/app/courses/%5Bid%5D/page.tsx) (Course Detail)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity &amp; Roles"]
  node_register["Registration<br/>[page.tsx]"]
  node_login["Login<br/>[page.tsx]"]
  node_navbar["Session Navigation<br/>[Navbar.tsx]"]
end

subgraph group_discovery["Discovery &amp; Profiles"]
  node_search["Course Search<br/>[page.tsx]"]
  node_profile["Public Profile<br/>[page.tsx]"]
  node_profile_edit["Profile Editing<br/>[page.tsx]"]
  node_profile_root["Profile Route<br/>[page.tsx]"]
end

subgraph group_learning["Courses &amp; Dashboards"]
  node_course_detail["Course Detail<br/>[page.tsx]"]
  node_dashboard["Role Dashboard<br/>[page.tsx]"]
  node_learner_dash["Learner Dashboard<br/>[page.tsx]"]
  node_tutor_dash["Tutor Dashboard<br/>[page.tsx]"]
  node_admin_dash["Admin Review<br/>[page.tsx]"]
  node_course_create["Course Creation<br/>[page.tsx]"]
  node_course_manage["Course Management<br/>[page.tsx]"]
end

subgraph group_services["Supabase Services"]
  node_supabase_client["Browser Client<br/>[client.ts]"]
  node_database[("Supabase Database")]
  node_auth_service["Supabase Auth"]
  node_storage["Supabase Storage"]
end

node_student(("Student"))
node_google(("Google OAuth"))

node_student -->|"registers"| node_register
node_student -->|"searches"| node_search
node_register -->|"uses client"| node_supabase_client
node_login -->|"uses client"| node_supabase_client
node_register -->|"OAuth sign-in"| node_auth_service
node_auth_service -->|"federates"| node_google
node_navbar -->|"uses client"| node_supabase_client
node_search -->|"uses client"| node_supabase_client
node_profile -->|"uses client"| node_supabase_client
node_profile_edit -->|"uses client"| node_supabase_client
node_profile_root -.->|"routes to"| node_profile
node_course_detail -->|"uses client"| node_supabase_client
node_dashboard -->|"uses client"| node_supabase_client
node_learner_dash -->|"uses client"| node_supabase_client
node_tutor_dash -->|"uses client"| node_supabase_client
node_admin_dash -->|"uses client"| node_supabase_client
node_course_create -->|"uses client"| node_supabase_client
node_course_manage -->|"uses client"| node_supabase_client
node_supabase_client -->|"connects to"| node_database
node_supabase_client -->|"connects to"| node_auth_service
node_register -.->|"uploads transcript"| node_storage
node_admin_dash -.->|"reviews transcript"| node_storage
node_search -.->|"opens course"| node_course_detail
node_learner_dash -.->|"opens booking"| node_course_detail
node_dashboard -->|"links creation"| node_course_create

click node_register "https://github.com/modsunxx/uni-tutor/blob/main/src/app/(auth)/register/page.tsx"
click node_login "https://github.com/modsunxx/uni-tutor/blob/main/src/app/(auth)/login/page.tsx"
click node_navbar "https://github.com/modsunxx/uni-tutor/blob/main/src/components/Navbar.tsx"
click node_search "https://github.com/modsunxx/uni-tutor/blob/main/src/app/search/page.tsx"
click node_profile "https://github.com/modsunxx/uni-tutor/blob/main/src/app/profile/%5Bid%5D/page.tsx"
click node_profile_edit "https://github.com/modsunxx/uni-tutor/blob/main/src/app/profile/edit/page.tsx"
click node_profile_root "https://github.com/modsunxx/uni-tutor/blob/main/src/app/profile/page.tsx"
click node_course_detail "https://github.com/modsunxx/uni-tutor/blob/main/src/app/courses/%5Bid%5D/page.tsx"
click node_dashboard "https://github.com/modsunxx/uni-tutor/blob/main/src/app/dashboard/page.tsx"
click node_learner_dash "https://github.com/modsunxx/uni-tutor/blob/main/src/app/dashboard/learner/page.tsx"
click node_tutor_dash "https://github.com/modsunxx/uni-tutor/blob/main/src/app/dashboard/tutor/page.tsx"
click node_admin_dash "https://github.com/modsunxx/uni-tutor/blob/main/src/app/dashboard/admin/page.tsx"
click node_course_create "https://github.com/modsunxx/uni-tutor/blob/main/src/app/dashboard/tutor/courses/new/page.tsx"
click node_course_manage "https://github.com/modsunxx/uni-tutor/blob/main/src/app/dashboard/tutor/courses/%5Bid%5D/page.tsx"
click node_supabase_client "https://github.com/modsunxx/uni-tutor/blob/main/src/utils/supabase/client.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_register,node_login,node_navbar toneBlue
class node_search,node_profile,node_profile_edit,node_profile_root toneAmber
class node_course_detail,node_dashboard,node_learner_dash,node_tutor_dash,node_admin_dash,node_course_create,node_course_manage toneMint
class node_supabase_client,node_database,node_auth_service,node_storage toneRose
class node_student,node_google toneIndigo
```

## Components

### Identity & Roles

- [Registration](https://github.com/modsunxx/uni-tutor/blob/main/src/app/(auth)/register/page.tsx): `src/app/(auth)/register/page.tsx`
- [Login](https://github.com/modsunxx/uni-tutor/blob/main/src/app/(auth)/login/page.tsx): `src/app/(auth)/login/page.tsx`
- [Session Navigation](https://github.com/modsunxx/uni-tutor/blob/main/src/components/Navbar.tsx): `src/components/Navbar.tsx`

### Discovery & Profiles

- [Course Search](https://github.com/modsunxx/uni-tutor/blob/main/src/app/search/page.tsx): `src/app/search/page.tsx`
- [Public Profile](https://github.com/modsunxx/uni-tutor/blob/main/src/app/profile/%5Bid%5D/page.tsx): `src/app/profile/[id]/page.tsx`
- [Profile Editing](https://github.com/modsunxx/uni-tutor/blob/main/src/app/profile/edit/page.tsx): `src/app/profile/edit/page.tsx`
- [Profile Route](https://github.com/modsunxx/uni-tutor/blob/main/src/app/profile/page.tsx): `src/app/profile/page.tsx`

### Courses & Dashboards

- [Course Detail](https://github.com/modsunxx/uni-tutor/blob/main/src/app/courses/%5Bid%5D/page.tsx): `src/app/courses/[id]/page.tsx`
- [Role Dashboard](https://github.com/modsunxx/uni-tutor/blob/main/src/app/dashboard/page.tsx): `src/app/dashboard/page.tsx`
- [Learner Dashboard](https://github.com/modsunxx/uni-tutor/blob/main/src/app/dashboard/learner/page.tsx): `src/app/dashboard/learner/page.tsx`
- [Tutor Dashboard](https://github.com/modsunxx/uni-tutor/blob/main/src/app/dashboard/tutor/page.tsx): `src/app/dashboard/tutor/page.tsx`
- [Admin Review](https://github.com/modsunxx/uni-tutor/blob/main/src/app/dashboard/admin/page.tsx): `src/app/dashboard/admin/page.tsx`
- [Course Creation](https://github.com/modsunxx/uni-tutor/blob/main/src/app/dashboard/tutor/courses/new/page.tsx): `src/app/dashboard/tutor/courses/new/page.tsx`
- [Course Management](https://github.com/modsunxx/uni-tutor/blob/main/src/app/dashboard/tutor/courses/%5Bid%5D/page.tsx): `src/app/dashboard/tutor/courses/[id]/page.tsx`

### Supabase Services

- [Browser Client](https://github.com/modsunxx/uni-tutor/blob/main/src/utils/supabase/client.ts): `src/utils/supabase/client.ts`
- **Supabase Database**
- **Supabase Auth**
- **Supabase Storage**

### Other components

- **Student**
- **Google OAuth**

## Connections

- Student → Registration: registers (evidence: `README.md`)
- Student → Course Search: searches (evidence: `README.md`)
- Registration → Browser Client: uses client (evidence: `src/app/(auth)/register/page.tsx`)
- Login → Browser Client: uses client (evidence: `src/app/(auth)/login/page.tsx`)
- Registration → Supabase Auth: OAuth sign-in (evidence: `src/app/(auth)/register/page.tsx`)
- Supabase Auth → Google OAuth: federates (evidence: `README.md`)
- Session Navigation → Browser Client: uses client (evidence: `src/components/Navbar.tsx`)
- Course Search → Browser Client: uses client (evidence: `src/app/search/page.tsx`)
- Public Profile → Browser Client: uses client (evidence: `src/app/profile/[id]/page.tsx`)
- Profile Editing → Browser Client: uses client (evidence: `src/app/profile/edit/page.tsx`)
- Profile Route → Public Profile: routes to
- Course Detail → Browser Client: uses client (evidence: `src/app/courses/[id]/page.tsx`)
- Role Dashboard → Browser Client: uses client (evidence: `src/app/dashboard/page.tsx`)
- Learner Dashboard → Browser Client: uses client (evidence: `src/app/dashboard/learner/page.tsx`)
- Tutor Dashboard → Browser Client: uses client (evidence: `src/app/dashboard/tutor/page.tsx`)
- Admin Review → Browser Client: uses client (evidence: `src/app/dashboard/admin/page.tsx`)
- Course Creation → Browser Client: uses client (evidence: `src/app/dashboard/tutor/courses/new/page.tsx`)
- Course Management → Browser Client: uses client (evidence: `src/app/dashboard/tutor/courses/[id]/page.tsx`)
- Browser Client → Supabase Database: connects to (evidence: `README.md`)
- Browser Client → Supabase Auth: connects to (evidence: `README.md`)
- Registration → Supabase Storage: uploads transcript (evidence: `README.md`)
- Admin Review → Supabase Storage: reviews transcript (evidence: `README.md`)
- Course Search → Course Detail: opens course
- Learner Dashboard → Course Detail: opens booking
- Role Dashboard → Course Creation: links creation (evidence: `src/app/dashboard/page.tsx`)
