# aryanmaheshwari004-cmyk/skillswap-microlearning-platform architecture

> Architecture diagram of the GitHub repository aryanmaheshwari004-cmyk/skillswap-microlearning-platform, 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/aryanmaheshwari004-cmyk/skillswap-microlearning-platform
- Repository: https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform

## Overview

SkillSwap is a web platform for exchanging skills through mentor listings, availability, and scheduled sessions. A learner discovers a skill, checks details and open times, then requests a session; mentors manage listings and availability and handle requests through completion. Users also manage profiles and review completed sessions, while the dashboard summarizes activity. The README documents these capabilities, and sampled PHP endpoints show database-backed booking, session actions, profile updates, and reviews. Frontend-to-end endpoint wiring is not established by the excerpts, so those links are shown only where documented or are omitted.

Main entry points: [`backend/config/database.php`](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/config/database.php) (PDO connection), [`browse-skills.html`](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/browse-skills.html) (Browse skills), [`backend/sessions/book_session.php`](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/sessions/book_session.php) (Book session), [`backend/reviews/submit_review.php`](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/reviews/submit_review.php) (Review submission)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Skill marketplace"]
  node_browse["Browse skills<br/>[browse-skills.html]"]
  node_skilldetail["Skill details<br/>[skill-detail.html]"]
  node_search["Skill search<br/>[search_skills.php]"]
  node_filter["Skill filters<br/>[filter_skills.php]"]
  node_skilldetailapi["Skill detail data"]
  node_myskills["Manage skills<br/>[my-skills.html]"]
end

subgraph group_scheduling["Session scheduling"]
  node_availability["Availability calendar<br/>[availability.html]"]
  node_availabilityapi["Availability data"]
  node_booking["Book session<br/>[book_session.php]"]
  node_sessionactions["Session lifecycle<br/>[session_action.php]"]
  node_sessionsview["Upcoming sessions"]
  node_history["Session history"]
end

subgraph group_identity["Accounts and profiles"]
  node_auth["Authentication"]
  node_profile["Profile management<br/>[update_profile.php]"]
end

subgraph group_engagement["Dashboard and reviews"]
  node_dashboard["Personal dashboard"]
  node_reviews["Review submission<br/>[submit_review.php]"]
  node_reviewfeed["Review feed<br/>[get_reviews.php]"]
end

subgraph group_backend["Backend services"]
  node_database[("MySQL database<br/>[skillswap.sql]")]
  node_dbconnection["PDO connection<br/>[database.php]"]
  node_config["App configuration<br/>[config.php]"]
  node_responses["JSON responses<br/>[response.php]"]
  node_sessionguard["Session guard<br/>[session_guard.php]"]
end

node_learner(("Learner"))
node_mentor(("Mentor"))

node_learner -->|"find skills"| node_browse
node_browse -->|"inspect listing"| node_skilldetail
node_mentor -->|"manage listings"| node_myskills
node_mentor -->|"set open times"| node_availability
node_learner -->|"request session"| node_booking
node_mentor -->|"handle request"| node_sessionactions
node_learner -->|"cancel session"| node_sessionactions
node_sessionsview -.->|"manage sessions"| node_sessionactions
node_learner -->|"review completed session"| node_reviews
node_browse -.->|"search marketplace"| node_search
node_browse -.->|"filter listings"| node_filter
node_skilldetail -.->|"load skill data"| node_skilldetailapi
node_search -->|"queries database"| node_dbconnection
node_booking -->|"reads and writes"| node_dbconnection
node_sessionactions -->|"updates session"| node_dbconnection
node_reviews -->|"writes review"| node_dbconnection
node_reviewfeed -->|"reads reviews"| node_dbconnection
node_profile -->|"updates profile"| node_dbconnection
node_dbconnection -->|"loads settings"| node_config
node_booking -->|"requires login"| node_sessionguard
node_reviews -->|"requires login"| node_sessionguard
node_profile -->|"requires login"| node_sessionguard
node_booking -->|"sends JSON"| node_responses
node_reviews -->|"sends JSON"| node_responses

click node_browse "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/browse-skills.html"
click node_skilldetail "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/skill-detail.html"
click node_search "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/api/search_skills.php"
click node_filter "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/api/filter_skills.php"
click node_skilldetailapi "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/api/get_skill_detail.php"
click node_myskills "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/my-skills.html"
click node_availability "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/availability.html"
click node_availabilityapi "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/sessions/set_availability.php"
click node_booking "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/sessions/book_session.php"
click node_sessionactions "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/sessions/session_action.php"
click node_sessionsview "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/upcoming-sessions.html"
click node_history "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/api/get_session_history.php"
click node_auth "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/tree/main/backend/auth"
click node_profile "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/profile/update_profile.php"
click node_dashboard "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/api/get_dashboard_data.php"
click node_reviews "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/reviews/submit_review.php"
click node_reviewfeed "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/api/get_reviews.php"
click node_database "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/database/skillswap.sql"
click node_dbconnection "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/config/database.php"
click node_config "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/config/config.php"
click node_responses "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/includes/response.php"
click node_sessionguard "https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/includes/session_guard.php"

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_browse,node_skilldetail,node_search,node_filter,node_skilldetailapi,node_myskills toneBlue
class node_availability,node_availabilityapi,node_booking,node_sessionactions,node_sessionsview,node_history toneAmber
class node_auth,node_profile toneMint
class node_dashboard,node_reviews,node_reviewfeed toneRose
class node_database,node_dbconnection,node_config,node_responses,node_sessionguard,node_learner,node_mentor toneIndigo
```

## Components

### Skill marketplace

- [Browse skills](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/browse-skills.html): `browse-skills.html`
- [Skill details](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/skill-detail.html): `skill-detail.html`
- [Skill search](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/api/search_skills.php): `backend/api/search_skills.php`
- [Skill filters](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/api/filter_skills.php): `backend/api/filter_skills.php`
- [Skill detail data](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/api/get_skill_detail.php): `backend/api/get_skill_detail.php`
- [Manage skills](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/my-skills.html): `my-skills.html`

### Session scheduling

- [Availability calendar](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/availability.html): `availability.html`
- [Availability data](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/sessions/set_availability.php): `backend/sessions/set_availability.php`
- [Book session](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/sessions/book_session.php): `backend/sessions/book_session.php`
- [Session lifecycle](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/sessions/session_action.php): `backend/sessions/session_action.php`
- [Upcoming sessions](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/upcoming-sessions.html): `upcoming-sessions.html`
- [Session history](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/api/get_session_history.php): `backend/api/get_session_history.php`

### Accounts and profiles

- [Authentication](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/tree/main/backend/auth): `backend/auth`
- [Profile management](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/profile/update_profile.php): `backend/profile/update_profile.php`

### Dashboard and reviews

- [Personal dashboard](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/api/get_dashboard_data.php): `backend/api/get_dashboard_data.php`
- [Review submission](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/reviews/submit_review.php): `backend/reviews/submit_review.php`
- [Review feed](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/api/get_reviews.php): `backend/api/get_reviews.php`

### Backend services

- [MySQL database](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/database/skillswap.sql): `database/skillswap.sql`
- [PDO connection](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/config/database.php): `backend/config/database.php`
- [App configuration](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/config/config.php): `backend/config/config.php`
- [JSON responses](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/includes/response.php): `backend/includes/response.php`
- [Session guard](https://github.com/aryanmaheshwari004-cmyk/skillswap-microlearning-platform/blob/main/backend/includes/session_guard.php): `backend/includes/session_guard.php`

### Other components

- **Learner**
- **Mentor**

## Connections

- Learner → Browse skills: find skills (evidence: `README.md`)
- Browse skills → Skill details: inspect listing (evidence: `README.md`)
- Mentor → Manage skills: manage listings (evidence: `README.md`)
- Mentor → Availability calendar: set open times (evidence: `README.md`)
- Learner → Book session: request session (evidence: `README.md`)
- Mentor → Session lifecycle: handle request (evidence: `README.md`)
- Learner → Session lifecycle: cancel session (evidence: `README.md`)
- Upcoming sessions → Session lifecycle: manage sessions
- Learner → Review submission: review completed session (evidence: `README.md`)
- Browse skills → Skill search: search marketplace
- Browse skills → Skill filters: filter listings
- Skill details → Skill detail data: load skill data
- Skill search → PDO connection: queries database (evidence: `backend/api/search_skills.php`)
- Book session → PDO connection: reads and writes (evidence: `backend/sessions/book_session.php`)
- Session lifecycle → PDO connection: updates session (evidence: `backend/sessions/session_action.php`)
- Review submission → PDO connection: writes review (evidence: `backend/reviews/submit_review.php`)
- Review feed → PDO connection: reads reviews (evidence: `backend/api/get_reviews.php`)
- Profile management → PDO connection: updates profile (evidence: `backend/profile/update_profile.php`)
- PDO connection → App configuration: loads settings (evidence: `backend/config/database.php`)
- Book session → Session guard: requires login (evidence: `backend/sessions/book_session.php`)
- Review submission → Session guard: requires login (evidence: `backend/reviews/submit_review.php`)
- Profile management → Session guard: requires login (evidence: `backend/profile/update_profile.php`)
- Book session → JSON responses: sends JSON (evidence: `backend/sessions/book_session.php`)
- Review submission → JSON responses: sends JSON (evidence: `backend/reviews/submit_review.php`)
