# alikhan2106/1st-project-an- architecture

> Architecture diagram of the GitHub repository alikhan2106/1st-project-an-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alikhan2106/1st-project-an-
- Repository: https://github.com/alikhan2106/1st-project-an-

## Overview

Tourism360 is a tourism-planning prototype with tourist exploration and itinerary planning, plus hotel-partner and tourism-administration dashboards. The main workflow is a visitor selecting preferences and generating a crowd-aware itinerary from local sample attractions; hotel staff can manage guest recommendations and experiences, while administrators view destination crowd indicators. The frontend routes among these views. Backend excerpts show only a health endpoint and a MongoDB connector; no excerpt shows the connector being invoked or the frontend calling the backend, so those are shown as separate backend responsibilities.

Main entry points: [`FRONTEND/src/App.jsx`](https://github.com/alikhan2106/1st-project-an-/blob/main/FRONTEND/src/App.jsx) (View router), [`FRONTEND/src/components/TouristView.jsx`](https://github.com/alikhan2106/1st-project-an-/blob/main/FRONTEND/src/components/TouristView.jsx) (Explore view), [`FRONTEND/src/utils/planner.js`](https://github.com/alikhan2106/1st-project-an-/blob/main/FRONTEND/src/utils/planner.js) (Itinerary generator), [`FRONTEND/src/main.jsx`](https://github.com/alikhan2106/1st-project-an-/blob/main/FRONTEND/src/main.jsx) (React entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Tourism frontend"]
  node_entry["React entry<br/>[main.jsx]"]
  node_app["View router<br/>[App.jsx]"]
  node_navigation["Navigation<br/>[Navbar.jsx]"]
end

subgraph group_planning["Tourist planning"]
  node_explore["Explore view<br/>[TouristView.jsx]"]
  node_planner["Itinerary generator<br/>[planner.js]"]
  node_tourism_data["Attractions and businesses<br/>[mockData.js]"]
end

subgraph group_partners["Partner operations"]
  node_hotel_ops["Hotel dashboard<br/>[HotelDashboard.jsx]"]
  node_tourism_admin["Tourism admin<br/>[TourismAdmin.jsx]"]
end

subgraph group_backend["Backend services"]
  node_api["Health endpoint<br/>[index.js]"]
  node_db_connector["MongoDB connector<br/>[db.js]"]
end

node_visitor(("Visitor"))
node_mongo[("MongoDB")]
node_api_client(("API client"))

node_entry -->|"renders"| node_app
node_app -->|"renders"| node_navigation
node_app -->|"routes to"| node_explore
node_app -->|"routes to"| node_hotel_ops
node_app -->|"routes to"| node_tourism_admin
node_explore -->|"generates with"| node_planner
node_planner -->|"filters"| node_tourism_data
node_db_connector -->|"connects to"| node_mongo
node_api_client -->|"requests health"| node_api

click node_entry "https://github.com/alikhan2106/1st-project-an-/blob/main/FRONTEND/src/main.jsx"
click node_app "https://github.com/alikhan2106/1st-project-an-/blob/main/FRONTEND/src/App.jsx"
click node_navigation "https://github.com/alikhan2106/1st-project-an-/blob/main/FRONTEND/src/components/Navbar.jsx"
click node_explore "https://github.com/alikhan2106/1st-project-an-/blob/main/FRONTEND/src/components/TouristView.jsx"
click node_planner "https://github.com/alikhan2106/1st-project-an-/blob/main/FRONTEND/src/utils/planner.js"
click node_tourism_data "https://github.com/alikhan2106/1st-project-an-/blob/main/FRONTEND/src/data/mockData.js"
click node_hotel_ops "https://github.com/alikhan2106/1st-project-an-/blob/main/FRONTEND/src/components/HotelDashboard.jsx"
click node_tourism_admin "https://github.com/alikhan2106/1st-project-an-/blob/main/FRONTEND/src/components/TourismAdmin.jsx"
click node_api "https://github.com/alikhan2106/1st-project-an-/blob/main/BACKEND/index.js"
click node_db_connector "https://github.com/alikhan2106/1st-project-an-/blob/main/BACKEND/db.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_entry,node_app,node_navigation,node_api_client toneBlue
class node_explore,node_planner,node_tourism_data,node_mongo toneAmber
class node_hotel_ops,node_tourism_admin toneMint
class node_api,node_db_connector toneRose
class node_visitor toneIndigo
```

## Components

### Tourism frontend

- [React entry](https://github.com/alikhan2106/1st-project-an-/blob/main/FRONTEND/src/main.jsx): `FRONTEND/src/main.jsx`
- [View router](https://github.com/alikhan2106/1st-project-an-/blob/main/FRONTEND/src/App.jsx): `FRONTEND/src/App.jsx`
- [Navigation](https://github.com/alikhan2106/1st-project-an-/blob/main/FRONTEND/src/components/Navbar.jsx): `FRONTEND/src/components/Navbar.jsx`

### Tourist planning

- [Explore view](https://github.com/alikhan2106/1st-project-an-/blob/main/FRONTEND/src/components/TouristView.jsx): `FRONTEND/src/components/TouristView.jsx`
- [Itinerary generator](https://github.com/alikhan2106/1st-project-an-/blob/main/FRONTEND/src/utils/planner.js): `FRONTEND/src/utils/planner.js`
- [Attractions and businesses](https://github.com/alikhan2106/1st-project-an-/blob/main/FRONTEND/src/data/mockData.js): `FRONTEND/src/data/mockData.js`

### Partner operations

- [Hotel dashboard](https://github.com/alikhan2106/1st-project-an-/blob/main/FRONTEND/src/components/HotelDashboard.jsx): `FRONTEND/src/components/HotelDashboard.jsx`
- [Tourism admin](https://github.com/alikhan2106/1st-project-an-/blob/main/FRONTEND/src/components/TourismAdmin.jsx): `FRONTEND/src/components/TourismAdmin.jsx`

### Backend services

- [Health endpoint](https://github.com/alikhan2106/1st-project-an-/blob/main/BACKEND/index.js): `BACKEND/index.js`
- [MongoDB connector](https://github.com/alikhan2106/1st-project-an-/blob/main/BACKEND/db.js): `BACKEND/db.js`

### Other components

- **Visitor**
- **MongoDB**
- **API client**

## Connections

- React entry → View router: renders (evidence: `FRONTEND/src/main.jsx`)
- View router → Navigation: renders (evidence: `FRONTEND/src/App.jsx`)
- View router → Explore view: routes to (evidence: `FRONTEND/src/App.jsx`)
- View router → Hotel dashboard: routes to (evidence: `FRONTEND/src/App.jsx`)
- View router → Tourism admin: routes to (evidence: `FRONTEND/src/App.jsx`)
- Explore view → Itinerary generator: generates with (evidence: `FRONTEND/src/components/TouristView.jsx`)
- Itinerary generator → Attractions and businesses: filters (evidence: `FRONTEND/src/utils/planner.js`)
- MongoDB connector → MongoDB: connects to (evidence: `BACKEND/db.js`)
- API client → Health endpoint: requests health (evidence: `BACKEND/index.js`)
