# maghandas/skillswap architecture

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

- Interactive diagram: https://gitdiagram.com/maghandas/skillswap
- Repository: https://github.com/maghandas/skillswap

## Overview

SkillSwap is a server-rendered Laravel peer-to-peer skill marketplace. Users authenticate, discover skills and sessions, teachers publish sessions, students book them, and eligible users review completed sessions; role-specific dashboards and admin management support these activities. The graph groups route dispatch, catalogue and teaching-skill management, session/booking/review lifecycle, and identity/admin functions. Relationship evidence is limited to the README, the route index, and the supplied source excerpts; unsampled controller behavior is represented only where the README documents it.

Main entry points: [`routes/web.php`](https://github.com/maghandas/skillswap/blob/master/routes/web.php) (Web routes), [`app/Http/Controllers/SkillController.php`](https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/SkillController.php) (Skill management), [`app/Http/Controllers/SessionController.php`](https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/SessionController.php) (Session management), [`app/Http/Controllers/UserSkillController.php`](https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/UserSkillController.php) (Teaching skills)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Web and identity"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_auth_routes["Auth routes<br/>[auth.php]"]
  node_registration["Registration"]
  node_login["Login and verification"]
  node_role_guard["Role middleware<br/>[RoleMiddleware.php]"]
  node_blade_ui["Blade pages"]
end

subgraph group_catalogue["Skills catalogue"]
  node_skill_catalogue["Skill management"]
  node_category_management["Category management"]
  node_user_skills["Teaching skills"]
  node_skill_model["Skill records<br/>[Skill.php]"]
  node_category_model["Category records<br/>[Category.php]"]
  node_user_skill_model["User skill links<br/>[UserSkill.php]"]
end

subgraph group_learning["Sessions and feedback"]
  node_session_management["Session management"]
  node_booking_management["Session bookings"]
  node_review_management["Session reviews"]
  node_session_model["Session records<br/>[Session.php]"]
  node_booking_model["Booking records<br/>[SessionBooking.php]"]
  node_review_model["Review records<br/>[Review.php]"]
end

subgraph group_management["Roles and administration"]
  node_user_model["User accounts<br/>[User.php]"]
  node_user_admin["User administration<br/>[UserController.php]"]
end

node_browser(("Browser user"))
node_database[("Application database")]
node_public_disk[("Public image disk")]

node_browser -->|"sends requests"| node_web_routes
node_web_routes -->|"routes catalogue"| node_skill_catalogue
node_web_routes -->|"routes categories"| node_category_management
node_web_routes -->|"routes skill links"| node_user_skills
node_web_routes -->|"routes sessions"| node_session_management
node_web_routes -->|"routes bookings"| node_booking_management
node_web_routes -->|"routes reviews"| node_review_management
node_web_routes -->|"routes users"| node_user_admin
node_web_routes -->|"includes auth routes"| node_auth_routes
node_auth_routes -->|"routes registration"| node_registration
node_auth_routes -->|"routes login"| node_login
node_registration -->|"creates account"| node_user_model
node_skill_catalogue -->|"reads and updates"| node_skill_model
node_skill_catalogue -->|"uses categories"| node_category_model
node_skill_catalogue -.->|"stores images"| node_public_disk
node_category_management -.->|"manages records"| node_category_model
node_user_skills -->|"manages links"| node_user_skill_model
node_user_skills -->|"loads skills"| node_skill_model
node_user_skills -->|"loads users"| node_user_model
node_session_management -->|"creates and reads"| node_session_model
node_session_management -->|"loads skills"| node_skill_model
node_session_management -->|"loads bookings"| node_booking_model
node_booking_management -.->|"updates bookings"| node_booking_model
node_review_management -->|"checks sessions"| node_session_model
node_review_management -->|"creates reviews"| node_review_model
node_review_management -->|"renders review pages"| node_blade_ui
node_skill_catalogue -.->|"renders catalogue"| node_blade_ui
node_session_management -->|"renders session pages"| node_blade_ui
node_browser -->|"views pages"| node_blade_ui
node_user_admin -.->|"manages accounts"| node_user_model
node_role_guard -.->|"guards role routes"| node_web_routes
node_skill_model -.->|"persists records"| node_database
node_category_model -.->|"persists records"| node_database
node_user_skill_model -.->|"persists links"| node_database
node_session_model -.->|"persists sessions"| node_database
node_booking_model -.->|"persists bookings"| node_database
node_review_model -.->|"persists reviews"| node_database
node_user_model -.->|"persists accounts"| node_database

click node_web_routes "https://github.com/maghandas/skillswap/blob/master/routes/web.php"
click node_auth_routes "https://github.com/maghandas/skillswap/blob/master/routes/auth.php"
click node_registration "https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/Auth/RegisteredUserController.php"
click node_login "https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_role_guard "https://github.com/maghandas/skillswap/blob/master/app/Http/Middleware/RoleMiddleware.php"
click node_blade_ui "https://github.com/maghandas/skillswap/tree/master/resources/views"
click node_skill_catalogue "https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/SkillController.php"
click node_category_management "https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/CategoryController.php"
click node_user_skills "https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/UserSkillController.php"
click node_skill_model "https://github.com/maghandas/skillswap/blob/master/app/Models/Skill.php"
click node_category_model "https://github.com/maghandas/skillswap/blob/master/app/Models/Category.php"
click node_user_skill_model "https://github.com/maghandas/skillswap/blob/master/app/Models/UserSkill.php"
click node_session_management "https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/SessionController.php"
click node_booking_management "https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/SessionBookingController.php"
click node_review_management "https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/ReviewController.php"
click node_session_model "https://github.com/maghandas/skillswap/blob/master/app/Models/Session.php"
click node_booking_model "https://github.com/maghandas/skillswap/blob/master/app/Models/SessionBooking.php"
click node_review_model "https://github.com/maghandas/skillswap/blob/master/app/Models/Review.php"
click node_user_model "https://github.com/maghandas/skillswap/blob/master/app/Models/User.php"
click node_user_admin "https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/UserController.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_web_routes,node_auth_routes,node_registration,node_login,node_role_guard,node_blade_ui,node_browser toneBlue
class node_skill_catalogue,node_category_management,node_user_skills,node_skill_model,node_category_model,node_user_skill_model,node_database,node_public_disk toneAmber
class node_session_management,node_booking_management,node_review_management,node_session_model,node_booking_model,node_review_model toneMint
class node_user_model,node_user_admin toneRose
```

## Components

### Web and identity

- [Web routes](https://github.com/maghandas/skillswap/blob/master/routes/web.php): `routes/web.php`
- [Auth routes](https://github.com/maghandas/skillswap/blob/master/routes/auth.php): `routes/auth.php`
- [Registration](https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/Auth/RegisteredUserController.php): `app/Http/Controllers/Auth/RegisteredUserController.php`
- [Login and verification](https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/Auth/AuthenticatedSessionController.php): `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [Role middleware](https://github.com/maghandas/skillswap/blob/master/app/Http/Middleware/RoleMiddleware.php): `app/Http/Middleware/RoleMiddleware.php`
- [Blade pages](https://github.com/maghandas/skillswap/tree/master/resources/views): `resources/views`

### Skills catalogue

- [Skill management](https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/SkillController.php): `app/Http/Controllers/SkillController.php`
- [Category management](https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/CategoryController.php): `app/Http/Controllers/CategoryController.php`
- [Teaching skills](https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/UserSkillController.php): `app/Http/Controllers/UserSkillController.php`
- [Skill records](https://github.com/maghandas/skillswap/blob/master/app/Models/Skill.php): `app/Models/Skill.php`
- [Category records](https://github.com/maghandas/skillswap/blob/master/app/Models/Category.php): `app/Models/Category.php`
- [User skill links](https://github.com/maghandas/skillswap/blob/master/app/Models/UserSkill.php): `app/Models/UserSkill.php`

### Sessions and feedback

- [Session management](https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/SessionController.php): `app/Http/Controllers/SessionController.php`
- [Session bookings](https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/SessionBookingController.php): `app/Http/Controllers/SessionBookingController.php`
- [Session reviews](https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/ReviewController.php): `app/Http/Controllers/ReviewController.php`
- [Session records](https://github.com/maghandas/skillswap/blob/master/app/Models/Session.php): `app/Models/Session.php`
- [Booking records](https://github.com/maghandas/skillswap/blob/master/app/Models/SessionBooking.php): `app/Models/SessionBooking.php`
- [Review records](https://github.com/maghandas/skillswap/blob/master/app/Models/Review.php): `app/Models/Review.php`

### Roles and administration

- [User accounts](https://github.com/maghandas/skillswap/blob/master/app/Models/User.php): `app/Models/User.php`
- [User administration](https://github.com/maghandas/skillswap/blob/master/app/Http/Controllers/UserController.php): `app/Http/Controllers/UserController.php`

### Other components

- **Browser user**
- **Application database**
- **Public image disk**

## Connections

- Browser user → Web routes: sends requests (evidence: `README.md`)
- Web routes → Skill management: routes catalogue (evidence: `routes/web.php`)
- Web routes → Category management: routes categories (evidence: `routes/web.php`)
- Web routes → Teaching skills: routes skill links (evidence: `routes/web.php`)
- Web routes → Session management: routes sessions (evidence: `routes/web.php`)
- Web routes → Session bookings: routes bookings (evidence: `routes/web.php`)
- Web routes → Session reviews: routes reviews (evidence: `routes/web.php`)
- Web routes → User administration: routes users (evidence: `routes/web.php`)
- Web routes → Auth routes: includes auth routes (evidence: `routes/web.php`)
- Auth routes → Registration: routes registration (evidence: `routes/auth.php`)
- Auth routes → Login and verification: routes login (evidence: `routes/auth.php`)
- Registration → User accounts: creates account (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- Skill management → Skill records: reads and updates (evidence: `app/Http/Controllers/SkillController.php`)
- Skill management → Category records: uses categories (evidence: `app/Http/Controllers/SkillController.php`)
- Skill management → Public image disk: stores images (evidence: `README.md`)
- Category management → Category records: manages records
- Teaching skills → User skill links: manages links (evidence: `app/Http/Controllers/UserSkillController.php`)
- Teaching skills → Skill records: loads skills (evidence: `app/Http/Controllers/UserSkillController.php`)
- Teaching skills → User accounts: loads users (evidence: `app/Http/Controllers/UserSkillController.php`)
- Session management → Session records: creates and reads (evidence: `app/Http/Controllers/SessionController.php`)
- Session management → Skill records: loads skills (evidence: `app/Http/Controllers/SessionController.php`)
- Session management → Booking records: loads bookings (evidence: `app/Http/Controllers/SessionController.php`)
- Session bookings → Booking records: updates bookings (evidence: `README.md`)
- Session reviews → Session records: checks sessions (evidence: `app/Http/Controllers/ReviewController.php`)
- Session reviews → Review records: creates reviews (evidence: `app/Http/Controllers/ReviewController.php`)
- Session reviews → Blade pages: renders review pages (evidence: `app/Http/Controllers/ReviewController.php`)
- Skill management → Blade pages: renders catalogue
- Session management → Blade pages: renders session pages (evidence: `app/Http/Controllers/SessionController.php`)
- Browser user → Blade pages: views pages (evidence: `README.md`)
- User administration → User accounts: manages accounts
- Role middleware → Web routes: guards role routes (evidence: `README.md`)
- Skill records → Application database: persists records (evidence: `README.md`)
- Category records → Application database: persists records (evidence: `README.md`)
- User skill links → Application database: persists links (evidence: `README.md`)
- Session records → Application database: persists sessions (evidence: `README.md`)
- Booking records → Application database: persists bookings (evidence: `README.md`)
- Review records → Application database: persists reviews (evidence: `README.md`)
- User accounts → Application database: persists accounts (evidence: `README.md`)
