# hemangi-makwana/csc210_project7_group5 architecture

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

- Interactive diagram: https://gitdiagram.com/hemangi-makwana/csc210_project7_group5
- Repository: https://github.com/hemangi-makwana/csc210_project7_group5

## Overview

Skill Exchange is a peer-to-peer learning platform: users discover mentors, manage skill profiles, arrange sessions, and build trust through reviews and verification. The main flow runs from the React application through its API client to the Express service and persistent data; the README also describes algorithmic support for search, recommendations, and booking. The graph preserves documented product branches even where their implementations were not sampled. Backend endpoint details and several UI-to-API links are only partially evidenced, so those relationships are omitted rather than inferred.

Main entry points: [`frontend/src/App.jsx`](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/App.jsx) (React application), [`backend/server.js`](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/backend/server.js) (REST API service), [`backend/dsa/reputationEngine.js`](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/backend/dsa/reputationEngine.js) (Reputation engine), [`frontend/src/api/client.js`](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/api/client.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_app["React application<br/>[App.jsx]"]
  node_auth["Authentication state<br/>[AuthContext.jsx]"]
  node_discovery["Mentor discovery<br/>[MentorSearch.jsx]"]
  node_profiles["Skill profiles<br/>[SkillProfile.jsx]"]
  node_sessions["Session booking<br/>[SessionBooking.jsx]"]
  node_history["Learning history"]
  node_recommendations["Mentor recommendations"]
  node_messages["Peer messaging<br/>[Messages.jsx]"]
  node_verification["Teacher verification"]
  node_reviewer["Reviewer portal<br/>[ReviewerPortal.jsx]"]
  node_course_requests["Course requests<br/>[CourseRequests.jsx]"]
  node_api["API client<br/>[client.js]"]
end

subgraph group_backend["Backend service"]
  node_gateway["REST API service<br/>[server.js]"]
end

subgraph group_algorithms["DSA engine"]
  node_search_engine["Skill lookup<br/>[hashTable.js]"]
  node_network["Mentor network<br/>[graph.js]"]
  node_ranking["Recommendation ranking<br/>[heap.js]"]
  node_booking_queue["Booking queue<br/>[queue.js]"]
  node_reputation["Reputation engine"]
  node_decision_tree["Decision tree<br/>[decisionTree.js]"]
end

subgraph group_data["Persistence and messaging"]
  node_database[("Persistent records<br/>[index.js]")]
  node_email["Email delivery<br/>[emailService.js]"]
end

node_users(("Learners and mentors"))
node_smtp["SMTP service"]

node_users -->|"use"| node_app
node_app -->|"requests"| node_api
node_app -->|"routes with"| node_auth
node_app -->|"routes to"| node_discovery
node_app -->|"routes to"| node_profiles
node_app -->|"routes to"| node_sessions
node_app -->|"routes to"| node_history
node_app -->|"routes to"| node_recommendations
node_app -->|"routes to"| node_messages
node_app -->|"routes to"| node_verification
node_app -->|"routes to"| node_reviewer
node_app -->|"routes to"| node_course_requests
node_api -->|"REST requests"| node_gateway
node_gateway -->|"queries"| node_database
node_gateway -->|"uses"| node_search_engine
node_gateway -->|"uses"| node_network
node_gateway -->|"uses"| node_ranking
node_gateway -->|"uses"| node_booking_queue
node_gateway -->|"uses"| node_decision_tree
node_gateway -->|"uses"| node_reputation
node_reputation -->|"indexes reviews"| node_search_engine
node_reputation -->|"ranks teachers"| node_ranking
node_gateway -.->|"calls"| node_email
node_email -->|"sends mail"| node_smtp
node_gateway -.->|"FIFO booking"| node_booking_queue
node_gateway -.->|"discovers paths"| node_network

click node_app "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/App.jsx"
click node_auth "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/context/AuthContext.jsx"
click node_discovery "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/pages/MentorSearch.jsx"
click node_profiles "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/pages/SkillProfile.jsx"
click node_sessions "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/pages/SessionBooking.jsx"
click node_history "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/pages/LearningHistory.jsx"
click node_recommendations "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/pages/Recommendations.jsx"
click node_messages "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/pages/Messages.jsx"
click node_verification "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/pages/TeacherVerification.jsx"
click node_reviewer "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/pages/ReviewerPortal.jsx"
click node_course_requests "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/pages/CourseRequests.jsx"
click node_api "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/api/client.js"
click node_gateway "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/backend/server.js"
click node_search_engine "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/backend/dsa/hashTable.js"
click node_network "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/backend/dsa/graph.js"
click node_ranking "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/backend/dsa/heap.js"
click node_booking_queue "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/backend/dsa/queue.js"
click node_reputation "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/backend/dsa/reputationEngine.js"
click node_decision_tree "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/backend/dsa/decisionTree.js"
click node_database "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/backend/db/index.js"
click node_email "https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/backend/services/emailService.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_app,node_auth,node_discovery,node_profiles,node_sessions,node_history,node_recommendations,node_messages,node_verification,node_reviewer,node_course_requests,node_api toneBlue
class node_gateway toneAmber
class node_search_engine,node_network,node_ranking,node_booking_queue,node_reputation,node_decision_tree toneMint
class node_database,node_email toneRose
class node_users,node_smtp toneIndigo
```

## Components

### Web application

- [React application](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Authentication state](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Mentor discovery](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/pages/MentorSearch.jsx): `frontend/src/pages/MentorSearch.jsx`
- [Skill profiles](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/pages/SkillProfile.jsx): `frontend/src/pages/SkillProfile.jsx`
- [Session booking](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/pages/SessionBooking.jsx): `frontend/src/pages/SessionBooking.jsx`
- [Learning history](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/pages/LearningHistory.jsx): `frontend/src/pages/LearningHistory.jsx`
- [Mentor recommendations](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/pages/Recommendations.jsx): `frontend/src/pages/Recommendations.jsx`
- [Peer messaging](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/pages/Messages.jsx): `frontend/src/pages/Messages.jsx`
- [Teacher verification](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/pages/TeacherVerification.jsx): `frontend/src/pages/TeacherVerification.jsx`
- [Reviewer portal](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/pages/ReviewerPortal.jsx): `frontend/src/pages/ReviewerPortal.jsx`
- [Course requests](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/pages/CourseRequests.jsx): `frontend/src/pages/CourseRequests.jsx`
- [API client](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/frontend/src/api/client.js): `frontend/src/api/client.js`

### Backend service

- [REST API service](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/backend/server.js): `backend/server.js`

### DSA engine

- [Skill lookup](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/backend/dsa/hashTable.js): `backend/dsa/hashTable.js`
- [Mentor network](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/backend/dsa/graph.js): `backend/dsa/graph.js`
- [Recommendation ranking](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/backend/dsa/heap.js): `backend/dsa/heap.js`
- [Booking queue](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/backend/dsa/queue.js): `backend/dsa/queue.js`
- [Reputation engine](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/backend/dsa/reputationEngine.js): `backend/dsa/reputationEngine.js`
- [Decision tree](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/backend/dsa/decisionTree.js): `backend/dsa/decisionTree.js`

### Persistence and messaging

- [Persistent records](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/backend/db/index.js): `backend/db/index.js`
- [Email delivery](https://github.com/hemangi-makwana/csc210_project7_group5/blob/main/backend/services/emailService.js): `backend/services/emailService.js`

### Other components

- **Learners and mentors**
- **SMTP service**

## Connections

- Learners and mentors → React application: use (evidence: `README.md`)
- React application → API client: requests (evidence: `README.md`)
- React application → Authentication state: routes with (evidence: `frontend/src/App.jsx`)
- React application → Mentor discovery: routes to (evidence: `frontend/src/App.jsx`)
- React application → Skill profiles: routes to (evidence: `frontend/src/App.jsx`)
- React application → Session booking: routes to (evidence: `frontend/src/App.jsx`)
- React application → Learning history: routes to (evidence: `frontend/src/App.jsx`)
- React application → Mentor recommendations: routes to (evidence: `frontend/src/App.jsx`)
- React application → Peer messaging: routes to (evidence: `frontend/src/App.jsx`)
- React application → Teacher verification: routes to (evidence: `frontend/src/App.jsx`)
- React application → Reviewer portal: routes to (evidence: `frontend/src/App.jsx`)
- React application → Course requests: routes to (evidence: `frontend/src/App.jsx`)
- API client → REST API service: REST requests (evidence: `README.md`)
- REST API service → Persistent records: queries (evidence: `backend/server.js`)
- REST API service → Skill lookup: uses (evidence: `backend/server.js`)
- REST API service → Mentor network: uses (evidence: `backend/server.js`)
- REST API service → Recommendation ranking: uses (evidence: `backend/server.js`)
- REST API service → Booking queue: uses (evidence: `backend/server.js`)
- REST API service → Decision tree: uses (evidence: `backend/server.js`)
- REST API service → Reputation engine: uses (evidence: `backend/server.js`)
- Reputation engine → Skill lookup: indexes reviews (evidence: `backend/dsa/reputationEngine.js`)
- Reputation engine → Recommendation ranking: ranks teachers (evidence: `backend/dsa/reputationEngine.js`)
- REST API service → Email delivery: calls (evidence: `backend/server.js`)
- Email delivery → SMTP service: sends mail (evidence: `backend/services/emailService.js`)
- REST API service → Booking queue: FIFO booking (evidence: `README.md`)
- REST API service → Mentor network: discovers paths (evidence: `README.md`)
