# mightysyed12345-sketch/wanderlustee architecture

> Architecture diagram of the GitHub repository mightysyed12345-sketch/wanderlustee, 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/mightysyed12345-sketch/wanderlustee
- Repository: https://github.com/mightysyed12345-sketch/wanderlustee

## Overview

Wanderlust is an Express/EJS stay-discovery application backed by MongoDB. A visitor browses or searches stays, opens listing details, and can register or log in to create listings and reviews; listing pages can include mapped locations. The Explore interface adds category filtering, tax display, save controls, destination search, and an in-browser trip planner. The graph separates request routing, domain handlers, persistence, and presentation. Some UI and account behavior is represented from README/source-index evidence; their unsampled implementation details are not inferred.

Main entry points: [`app.js`](https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/app.js) (Express app), [`routes/listing.js`](https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/routes/listing.js) (Listing routes), [`controllers/listing.js`](https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/controllers/listing.js) (Listing handlers), [`routes/review.js`](https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/routes/review.js) (Review routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Web runtime"]
  node_app["Express app<br/>[app.js]"]
  node_listing_routes["Listing routes<br/>[listing.js]"]
  node_review_routes["Review routes<br/>[review.js]"]
  node_user_routes["User routes<br/>[user.js]"]
  node_request_middleware["Request middleware<br/>[middleware.js]"]
end

subgraph group_stays["Stay discovery"]
  node_listing_handlers["Listing handlers<br/>[listing.js]"]
  node_listing_data[("Listing model<br/>[listing.js]")]
  node_seed_data["Sample stays<br/>[data.js]"]
  node_cloud_storage["Image storage config<br/>[cloudConfig.js]"]
end

subgraph group_accounts["Accounts and reviews"]
  node_review_handlers["Review handlers<br/>[reviews.js]"]
  node_review_data[("Review model<br/>[review.js]")]
  node_user_handlers["User handlers<br/>[users.js]"]
  node_user_data[("User model<br/>[user.js]")]
end

subgraph group_experience["Browser experience"]
  node_listing_views["Listing views"]
  node_account_views["Account views"]
  node_explore_ui["Explore interface<br/>[explore.js]"]
  node_map_ui["Listing map<br/>[map.js]"]
end

node_visitor(("Visitor"))
node_cloudinary[("Cloudinary")]
node_mapbox{{"Mapbox geocoding"}}

node_visitor -->|"requests pages"| node_app
node_app -->|"mounts routes"| node_listing_routes
node_app -->|"mounts routes"| node_review_routes
node_app -->|"mounts routes"| node_user_routes
node_app -->|"connects database"| node_listing_data
node_app -->|"seeds empty production DB"| node_seed_data
node_listing_routes -->|"guards and validates"| node_request_middleware
node_listing_routes -->|"dispatches"| node_listing_handlers
node_listing_routes -->|"configures uploads"| node_cloud_storage
node_listing_handlers -->|"queries and saves"| node_listing_data
node_listing_handlers -->|"renders pages"| node_listing_views
node_listing_handlers -.->|"geocodes destinations"| node_mapbox
node_cloud_storage -.->|"stores images"| node_cloudinary
node_review_routes -->|"guards and validates"| node_request_middleware
node_review_routes -->|"dispatches"| node_review_handlers
node_review_handlers -->|"updates reviews"| node_listing_data
node_review_handlers -->|"saves and deletes"| node_review_data
node_user_routes -->|"checks access"| node_request_middleware
node_user_routes -->|"dispatches"| node_user_handlers
node_user_handlers -->|"uses accounts"| node_user_data
node_user_handlers -.->|"renders account pages"| node_account_views
node_listing_views -.->|"supports explore features"| node_explore_ui
node_listing_views -.->|"presents listing maps"| node_map_ui
node_explore_ui -->|"shows recommendations"| node_visitor

click node_app "https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/app.js"
click node_listing_routes "https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/routes/listing.js"
click node_review_routes "https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/routes/review.js"
click node_user_routes "https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/routes/user.js"
click node_request_middleware "https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/middleware.js"
click node_listing_handlers "https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/controllers/listing.js"
click node_listing_data "https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/models/listing.js"
click node_seed_data "https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/init/data.js"
click node_review_handlers "https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/controllers/reviews.js"
click node_review_data "https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/models/review.js"
click node_user_handlers "https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/controllers/users.js"
click node_user_data "https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/models/user.js"
click node_listing_views "https://github.com/mightysyed12345-sketch/wanderlustee/tree/main/views/listings"
click node_account_views "https://github.com/mightysyed12345-sketch/wanderlustee/tree/main/views/users"
click node_explore_ui "https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/public/js/explore.js"
click node_map_ui "https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/public/js/map.js"
click node_cloud_storage "https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/views/cloudConfig.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_listing_routes,node_review_routes,node_user_routes,node_request_middleware toneBlue
class node_listing_handlers,node_listing_data,node_seed_data,node_cloud_storage,node_cloudinary toneAmber
class node_review_handlers,node_review_data,node_user_handlers,node_user_data toneMint
class node_listing_views,node_account_views,node_explore_ui,node_map_ui toneRose
class node_visitor,node_mapbox toneIndigo
```

## Components

### Web runtime

- [Express app](https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/app.js): `app.js`
- [Listing routes](https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/routes/listing.js): `routes/listing.js`
- [Review routes](https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/routes/review.js): `routes/review.js`
- [User routes](https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/routes/user.js): `routes/user.js`
- [Request middleware](https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/middleware.js): `middleware.js`

### Stay discovery

- [Listing handlers](https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/controllers/listing.js): `controllers/listing.js`
- [Listing model](https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/models/listing.js): `models/listing.js`
- [Sample stays](https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/init/data.js): `init/data.js`
- [Image storage config](https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/views/cloudConfig.js): `views/cloudConfig.js`

### Accounts and reviews

- [Review handlers](https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/controllers/reviews.js): `controllers/reviews.js`
- [Review model](https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/models/review.js): `models/review.js`
- [User handlers](https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/controllers/users.js): `controllers/users.js`
- [User model](https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/models/user.js): `models/user.js`

### Browser experience

- [Listing views](https://github.com/mightysyed12345-sketch/wanderlustee/tree/main/views/listings): `views/listings`
- [Account views](https://github.com/mightysyed12345-sketch/wanderlustee/tree/main/views/users): `views/users`
- [Explore interface](https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/public/js/explore.js): `public/js/explore.js`
- [Listing map](https://github.com/mightysyed12345-sketch/wanderlustee/blob/main/public/js/map.js): `public/js/map.js`

### Other components

- **Visitor**
- **Cloudinary**
- **Mapbox geocoding**

## Connections

- Visitor → Express app: requests pages (evidence: `README.md`)
- Express app → Listing routes: mounts routes (evidence: `app.js`)
- Express app → Review routes: mounts routes (evidence: `app.js`)
- Express app → User routes: mounts routes (evidence: `app.js`)
- Express app → Listing model: connects database (evidence: `app.js`)
- Express app → Sample stays: seeds empty production DB (evidence: `app.js`)
- Listing routes → Request middleware: guards and validates (evidence: `routes/listing.js`)
- Listing routes → Listing handlers: dispatches (evidence: `routes/listing.js`)
- Listing routes → Image storage config: configures uploads (evidence: `routes/listing.js`)
- Listing handlers → Listing model: queries and saves (evidence: `controllers/listing.js`)
- Listing handlers → Listing views: renders pages (evidence: `controllers/listing.js`)
- Listing handlers → Mapbox geocoding: geocodes destinations
- Image storage config → Cloudinary: stores images
- Review routes → Request middleware: guards and validates (evidence: `routes/review.js`)
- Review routes → Review handlers: dispatches (evidence: `routes/review.js`)
- Review handlers → Listing model: updates reviews (evidence: `controllers/reviews.js`)
- Review handlers → Review model: saves and deletes (evidence: `controllers/reviews.js`)
- User routes → Request middleware: checks access (evidence: `routes/user.js`)
- User routes → User handlers: dispatches (evidence: `routes/user.js`)
- User handlers → User model: uses accounts (evidence: `controllers/users.js`)
- User handlers → Account views: renders account pages
- Listing views → Explore interface: supports explore features (evidence: `README.md`)
- Listing views → Listing map: presents listing maps (evidence: `README.md`)
- Explore interface → Visitor: shows recommendations (evidence: `README.md`)
