# fahmida47/tripmesh architecture

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

- Interactive diagram: https://gitdiagram.com/fahmida47/tripmesh
- Repository: https://github.com/fahmida47/tripmesh

## Overview

TripMesh is a tourism marketplace for tourists and local guides. Its principal workflow is discovering guides and tour offerings, sending a travel or service request, having a guide accept it into a booking, then handling payment and reviews. The React app presents public discovery and role-specific dashboards; Laravel exposes API controllers backed by domain services and Eloquent models. The README also describes profiles, ratings, and booking capabilities. Some frontend-to-API connections are not shown in the sampled source, so those links are omitted.

Main entry points: [`frontend/src/App.jsx`](https://github.com/fahmida47/tripmesh/blob/main/frontend/src/App.jsx) (React app routing), [`backend/app/Http/Controllers/TravelRequestController.php`](https://github.com/fahmida47/tripmesh/blob/main/backend/app/Http/Controllers/TravelRequestController.php) (Travel requests), [`backend/app/Models/Booking.php`](https://github.com/fahmida47/tripmesh/blob/main/backend/app/Models/Booking.php) (Bookings), [`frontend/src/pages/TouristDashboard`](https://github.com/fahmida47/tripmesh/tree/main/frontend/src/pages/TouristDashboard) (Tourist dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web experience"]
  node_webapp["React app routing<br/>[App.jsx]"]
  node_explore["Explore tours<br/>[Explore.jsx]"]
  node_tourist_ui["Tourist dashboard"]
  node_guide_ui["Guide dashboard"]
end

subgraph group_identity["Accounts and profiles"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_profiles["Tourist and guide profiles<br/>[GuideProfile.php]"]
end

subgraph group_marketplace["Marketplace workflow"]
  node_offerings["Guide tour offerings"]
  node_requests["Travel requests"]
  node_request_service["Request processing"]
  node_service_request[("Service request<br/>[ServiceRequest.php]")]
  node_booking[("Bookings<br/>[Booking.php]")]
  node_payments["Payments and payouts"]
end

subgraph group_engagement["Trust and operations"]
  node_review_ui["Review screens<br/>[ReviewForm.jsx]"]
  node_review_controller["Review endpoints"]
  node_review_service["Review rules<br/>[ReviewService.php]"]
  node_review_store[("Reviews<br/>[Review.php]")]
  node_chat["Chat<br/>[ChatBox.jsx]"]
  node_notifications["Notifications"]
  node_admin["Administration"]
end

node_traveler(("Tourist"))
node_guide(("Local guide"))

node_traveler -->|"uses"| node_webapp
node_guide -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_explore
node_webapp -->|"routes to"| node_tourist_ui
node_webapp -->|"routes to"| node_guide_ui
node_webapp -->|"routes to"| node_review_ui
node_webapp -->|"routes to"| node_chat
node_explore -.->|"browses"| node_offerings
node_tourist_ui -.->|"submits requests"| node_requests
node_guide_ui -.->|"manages requests"| node_requests
node_requests -->|"delegates to"| node_request_service
node_requests -->|"creates"| node_service_request
node_requests -->|"creates"| node_booking
node_service_request -->|"has booking"| node_booking
node_booking -->|"has payment"| node_payments
node_tourist_ui -.->|"manages payments"| node_payments
node_review_ui -.->|"submits reviews"| node_review_controller
node_review_controller -->|"delegates to"| node_review_service
node_review_service -->|"checks eligibility"| node_booking
node_review_service -->|"creates and reads"| node_review_store
node_booking -->|"has review"| node_review_store
node_admin -->|"oversees"| node_payments
node_admin -->|"moderates"| node_review_store

click node_webapp "https://github.com/fahmida47/tripmesh/blob/main/frontend/src/App.jsx"
click node_explore "https://github.com/fahmida47/tripmesh/blob/main/frontend/src/pages/Explore/Explore.jsx"
click node_tourist_ui "https://github.com/fahmida47/tripmesh/tree/main/frontend/src/pages/TouristDashboard"
click node_guide_ui "https://github.com/fahmida47/tripmesh/tree/main/frontend/src/pages/GuideDashboard"
click node_auth "https://github.com/fahmida47/tripmesh/blob/main/backend/app/Http/Controllers/AuthController.php"
click node_profiles "https://github.com/fahmida47/tripmesh/blob/main/backend/app/Models/Guide/GuideProfile.php"
click node_offerings "https://github.com/fahmida47/tripmesh/blob/main/backend/app/Http/Controllers/Guide/TourServiceController.php"
click node_requests "https://github.com/fahmida47/tripmesh/blob/main/backend/app/Http/Controllers/TravelRequestController.php"
click node_request_service "https://github.com/fahmida47/tripmesh/blob/main/backend/app/Services/TravelRequestService.php"
click node_service_request "https://github.com/fahmida47/tripmesh/blob/main/backend/app/Models/ServiceRequest.php"
click node_booking "https://github.com/fahmida47/tripmesh/blob/main/backend/app/Models/Booking.php"
click node_payments "https://github.com/fahmida47/tripmesh/blob/main/backend/app/Http/Controllers/PaymentController.php"
click node_review_ui "https://github.com/fahmida47/tripmesh/blob/main/frontend/src/pages/TouristDashboard/Reviews/ReviewForm.jsx"
click node_review_controller "https://github.com/fahmida47/tripmesh/blob/main/backend/app/Http/Controllers/ReviewController.php"
click node_review_service "https://github.com/fahmida47/tripmesh/blob/main/backend/app/Services/ReviewService.php"
click node_review_store "https://github.com/fahmida47/tripmesh/blob/main/backend/app/Models/Review.php"
click node_chat "https://github.com/fahmida47/tripmesh/blob/main/frontend/src/pages/Chat/ChatBox.jsx"
click node_notifications "https://github.com/fahmida47/tripmesh/blob/main/backend/app/Http/Controllers/NotificationController.php"
click node_admin "https://github.com/fahmida47/tripmesh/blob/main/backend/app/Http/Controllers/AdminController.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_webapp,node_explore,node_tourist_ui,node_guide_ui toneBlue
class node_auth,node_profiles toneAmber
class node_offerings,node_requests,node_request_service,node_service_request,node_booking,node_payments toneMint
class node_review_ui,node_review_controller,node_review_service,node_review_store,node_chat,node_notifications,node_admin toneRose
class node_traveler,node_guide toneIndigo
```

## Components

### Web experience

- [React app routing](https://github.com/fahmida47/tripmesh/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Explore tours](https://github.com/fahmida47/tripmesh/blob/main/frontend/src/pages/Explore/Explore.jsx): `frontend/src/pages/Explore/Explore.jsx`
- [Tourist dashboard](https://github.com/fahmida47/tripmesh/tree/main/frontend/src/pages/TouristDashboard): `frontend/src/pages/TouristDashboard`
- [Guide dashboard](https://github.com/fahmida47/tripmesh/tree/main/frontend/src/pages/GuideDashboard): `frontend/src/pages/GuideDashboard`

### Accounts and profiles

- [Authentication](https://github.com/fahmida47/tripmesh/blob/main/backend/app/Http/Controllers/AuthController.php): `backend/app/Http/Controllers/AuthController.php`
- [Tourist and guide profiles](https://github.com/fahmida47/tripmesh/blob/main/backend/app/Models/Guide/GuideProfile.php): `backend/app/Models/Guide/GuideProfile.php`

### Marketplace workflow

- [Guide tour offerings](https://github.com/fahmida47/tripmesh/blob/main/backend/app/Http/Controllers/Guide/TourServiceController.php): `backend/app/Http/Controllers/Guide/TourServiceController.php`
- [Travel requests](https://github.com/fahmida47/tripmesh/blob/main/backend/app/Http/Controllers/TravelRequestController.php): `backend/app/Http/Controllers/TravelRequestController.php`
- [Request processing](https://github.com/fahmida47/tripmesh/blob/main/backend/app/Services/TravelRequestService.php): `backend/app/Services/TravelRequestService.php`
- [Service request](https://github.com/fahmida47/tripmesh/blob/main/backend/app/Models/ServiceRequest.php): `backend/app/Models/ServiceRequest.php`
- [Bookings](https://github.com/fahmida47/tripmesh/blob/main/backend/app/Models/Booking.php): `backend/app/Models/Booking.php`
- [Payments and payouts](https://github.com/fahmida47/tripmesh/blob/main/backend/app/Http/Controllers/PaymentController.php): `backend/app/Http/Controllers/PaymentController.php`

### Trust and operations

- [Review screens](https://github.com/fahmida47/tripmesh/blob/main/frontend/src/pages/TouristDashboard/Reviews/ReviewForm.jsx): `frontend/src/pages/TouristDashboard/Reviews/ReviewForm.jsx`
- [Review endpoints](https://github.com/fahmida47/tripmesh/blob/main/backend/app/Http/Controllers/ReviewController.php): `backend/app/Http/Controllers/ReviewController.php`
- [Review rules](https://github.com/fahmida47/tripmesh/blob/main/backend/app/Services/ReviewService.php): `backend/app/Services/ReviewService.php`
- [Reviews](https://github.com/fahmida47/tripmesh/blob/main/backend/app/Models/Review.php): `backend/app/Models/Review.php`
- [Chat](https://github.com/fahmida47/tripmesh/blob/main/frontend/src/pages/Chat/ChatBox.jsx): `frontend/src/pages/Chat/ChatBox.jsx`
- [Notifications](https://github.com/fahmida47/tripmesh/blob/main/backend/app/Http/Controllers/NotificationController.php): `backend/app/Http/Controllers/NotificationController.php`
- [Administration](https://github.com/fahmida47/tripmesh/blob/main/backend/app/Http/Controllers/AdminController.php): `backend/app/Http/Controllers/AdminController.php`

### Other components

- **Tourist**
- **Local guide**

## Connections

- Tourist → React app routing: uses (evidence: `README.md`)
- Local guide → React app routing: uses (evidence: `README.md`)
- React app routing → Explore tours: routes to (evidence: `frontend/src/App.jsx`)
- React app routing → Tourist dashboard: routes to (evidence: `frontend/src/App.jsx`)
- React app routing → Guide dashboard: routes to (evidence: `frontend/src/App.jsx`)
- React app routing → Review screens: routes to (evidence: `frontend/src/App.jsx`)
- React app routing → Chat: routes to (evidence: `frontend/src/App.jsx`)
- Explore tours → Guide tour offerings: browses
- Tourist dashboard → Travel requests: submits requests
- Guide dashboard → Travel requests: manages requests
- Travel requests → Request processing: delegates to (evidence: `backend/app/Http/Controllers/TravelRequestController.php`)
- Travel requests → Service request: creates (evidence: `backend/app/Http/Controllers/TravelRequestController.php`)
- Travel requests → Bookings: creates (evidence: `backend/app/Http/Controllers/TravelRequestController.php`)
- Service request → Bookings: has booking (evidence: `backend/app/Models/ServiceRequest.php`)
- Bookings → Payments and payouts: has payment (evidence: `backend/app/Models/Booking.php`)
- Tourist dashboard → Payments and payouts: manages payments
- Review screens → Review endpoints: submits reviews
- Review endpoints → Review rules: delegates to (evidence: `backend/app/Http/Controllers/ReviewController.php`)
- Review rules → Bookings: checks eligibility (evidence: `backend/app/Services/ReviewService.php`)
- Review rules → Reviews: creates and reads (evidence: `backend/app/Services/ReviewService.php`)
- Bookings → Reviews: has review (evidence: `backend/app/Models/Booking.php`)
- Administration → Payments and payouts: oversees (evidence: `backend/app/Http/Controllers/AdminController.php`)
- Administration → Reviews: moderates (evidence: `backend/app/Http/Controllers/AdminController.php`)
