# shanedrasingh05/wanderlust-project architecture

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

- Interactive diagram: https://gitdiagram.com/shanedrasingh05/wanderlust-project
- Repository: https://github.com/shanedrasingh05/wanderlust-project

## Overview

Wanderlust is an Airbnb-inspired lodging-listing application. Visitors browse, search, or filter listings, view listing details and maps, and—after signing in—create or manage listings and reviews. The main request path runs through the Express app and feature routes to controllers, which read or update MongoDB models and render EJS views. Authentication supports local, Google, and Facebook sign-in; listing creation also uses geocoding and image hosting. README capabilities are included, but unsampled route and integration wiring is shown only where documented or evident from the available entry points.

Main entry points: [`app.js`](https://github.com/shanedrasingh05/wanderlust-project/blob/main/app.js) (Express app), [`controllers/listing.js`](https://github.com/shanedrasingh05/wanderlust-project/blob/main/controllers/listing.js) (Listing actions), [`models/user.js`](https://github.com/shanedrasingh05/wanderlust-project/blob/main/models/user.js) (User model), [`routes/user.js`](https://github.com/shanedrasingh05/wanderlust-project/blob/main/routes/user.js) (User routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web and Views"]
  node_app["Express app<br/>[app.js]"]
  node_listing_routes["Listing routes<br/>[listing.js]"]
  node_user_routes["User routes<br/>[user.js]"]
  node_review_routes["Review routes<br/>[review.js]"]
  node_middleware["Validation and access<br/>[middleware.js]"]
  node_listing_views["Listing pages"]
  node_user_views["Account pages"]
  node_map_client["Map display<br/>[map.js]"]
end

subgraph group_listing["Listing and Reviews"]
  node_listing_controller["Listing actions<br/>[listing.js]"]
  node_review_controller["Review actions<br/>[reviews.js]"]
  node_listing_model["Listing model<br/>[listing.js]"]
  node_review_model["Review model<br/>[review.js]"]
end

subgraph group_identity["Accounts and Authentication"]
  node_google_routes["Google routes<br/>[google.js]"]
  node_facebook_routes["Facebook routes<br/>[facebook.js]"]
  node_user_model["User model<br/>[user.js]"]
end

subgraph group_integrations["Data and Integrations"]
  node_cloud_config["Image storage setup<br/>[cloudConfig.js]"]
  node_mongo[("MongoDB")]
  node_mapbox["Mapbox geocoding"]
  node_cloudinary["Cloudinary"]
end

node_visitor(("Visitor"))
node_google["Google OAuth"]
node_facebook["Facebook OAuth"]

node_visitor -->|"sends requests"| node_app
node_app -->|"dispatches"| node_listing_routes
node_app -->|"dispatches"| node_user_routes
node_app -->|"dispatches"| node_google_routes
node_app -->|"dispatches"| node_facebook_routes
node_app -->|"dispatches"| node_review_routes
node_listing_routes -->|"handles listing actions"| node_listing_controller
node_review_routes -->|"checks access and input"| node_middleware
node_review_routes -->|"dispatches"| node_review_controller
node_listing_controller -->|"queries and updates"| node_listing_model
node_review_controller -->|"updates listing reviews"| node_listing_model
node_review_controller -->|"creates and deletes"| node_review_model
node_user_routes -->|"manages accounts"| node_user_model
node_google_routes -->|"authenticates users"| node_user_model
node_facebook_routes -->|"authenticates users"| node_user_model
node_listing_controller -->|"renders listing pages"| node_listing_views
node_user_routes -->|"renders account pages"| node_user_views
node_listing_model -->|"persists listings"| node_mongo
node_review_model -->|"persists reviews"| node_mongo
node_user_model -->|"persists accounts"| node_mongo
node_listing_controller -->|"geocodes locations"| node_mapbox
node_map_client -->|"displays map data"| node_mapbox
node_cloud_config -.->|"configures image hosting"| node_cloudinary
node_google_routes -.->|"OAuth sign-in"| node_google
node_facebook_routes -.->|"OAuth sign-in"| node_facebook

click node_app "https://github.com/shanedrasingh05/wanderlust-project/blob/main/app.js"
click node_listing_routes "https://github.com/shanedrasingh05/wanderlust-project/blob/main/routes/listing.js"
click node_user_routes "https://github.com/shanedrasingh05/wanderlust-project/blob/main/routes/user.js"
click node_google_routes "https://github.com/shanedrasingh05/wanderlust-project/blob/main/routes/google.js"
click node_facebook_routes "https://github.com/shanedrasingh05/wanderlust-project/blob/main/routes/facebook.js"
click node_listing_controller "https://github.com/shanedrasingh05/wanderlust-project/blob/main/controllers/listing.js"
click node_review_routes "https://github.com/shanedrasingh05/wanderlust-project/blob/main/routes/review.js"
click node_review_controller "https://github.com/shanedrasingh05/wanderlust-project/blob/main/controllers/reviews.js"
click node_middleware "https://github.com/shanedrasingh05/wanderlust-project/blob/main/views/middleware.js"
click node_listing_model "https://github.com/shanedrasingh05/wanderlust-project/blob/main/models/listing.js"
click node_review_model "https://github.com/shanedrasingh05/wanderlust-project/blob/main/models/review.js"
click node_user_model "https://github.com/shanedrasingh05/wanderlust-project/blob/main/models/user.js"
click node_listing_views "https://github.com/shanedrasingh05/wanderlust-project/tree/main/views/listings"
click node_user_views "https://github.com/shanedrasingh05/wanderlust-project/tree/main/views/users"
click node_map_client "https://github.com/shanedrasingh05/wanderlust-project/blob/main/public/js/map.js"
click node_cloud_config "https://github.com/shanedrasingh05/wanderlust-project/blob/main/Cloud/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_user_routes,node_review_routes,node_middleware,node_listing_views,node_user_views,node_map_client toneBlue
class node_listing_controller,node_review_controller,node_listing_model,node_review_model toneAmber
class node_google_routes,node_facebook_routes,node_user_model toneMint
class node_cloud_config,node_mongo,node_mapbox,node_cloudinary toneRose
class node_visitor,node_google,node_facebook toneIndigo
```

## Components

### Web and Views

- [Express app](https://github.com/shanedrasingh05/wanderlust-project/blob/main/app.js): `app.js`
- [Listing routes](https://github.com/shanedrasingh05/wanderlust-project/blob/main/routes/listing.js): `routes/listing.js`
- [User routes](https://github.com/shanedrasingh05/wanderlust-project/blob/main/routes/user.js): `routes/user.js`
- [Review routes](https://github.com/shanedrasingh05/wanderlust-project/blob/main/routes/review.js): `routes/review.js`
- [Validation and access](https://github.com/shanedrasingh05/wanderlust-project/blob/main/views/middleware.js): `views/middleware.js`
- [Listing pages](https://github.com/shanedrasingh05/wanderlust-project/tree/main/views/listings): `views/listings`
- [Account pages](https://github.com/shanedrasingh05/wanderlust-project/tree/main/views/users): `views/users`
- [Map display](https://github.com/shanedrasingh05/wanderlust-project/blob/main/public/js/map.js): `public/js/map.js`

### Listing and Reviews

- [Listing actions](https://github.com/shanedrasingh05/wanderlust-project/blob/main/controllers/listing.js): `controllers/listing.js`
- [Review actions](https://github.com/shanedrasingh05/wanderlust-project/blob/main/controllers/reviews.js): `controllers/reviews.js`
- [Listing model](https://github.com/shanedrasingh05/wanderlust-project/blob/main/models/listing.js): `models/listing.js`
- [Review model](https://github.com/shanedrasingh05/wanderlust-project/blob/main/models/review.js): `models/review.js`

### Accounts and Authentication

- [Google routes](https://github.com/shanedrasingh05/wanderlust-project/blob/main/routes/google.js): `routes/google.js`
- [Facebook routes](https://github.com/shanedrasingh05/wanderlust-project/blob/main/routes/facebook.js): `routes/facebook.js`
- [User model](https://github.com/shanedrasingh05/wanderlust-project/blob/main/models/user.js): `models/user.js`

### Data and Integrations

- [Image storage setup](https://github.com/shanedrasingh05/wanderlust-project/blob/main/Cloud/cloudConfig.js): `Cloud/cloudConfig.js`
- **MongoDB**
- **Mapbox geocoding**
- **Cloudinary**

### Other components

- **Visitor**
- **Google OAuth**
- **Facebook OAuth**

## Connections

- Visitor → Express app: sends requests
- Express app → Listing routes: dispatches
- Express app → User routes: dispatches
- Express app → Google routes: dispatches
- Express app → Facebook routes: dispatches
- Express app → Review routes: dispatches
- Listing routes → Listing actions: handles listing actions
- Review routes → Validation and access: checks access and input
- Review routes → Review actions: dispatches
- Listing actions → Listing model: queries and updates
- Review actions → Listing model: updates listing reviews
- Review actions → Review model: creates and deletes
- User routes → User model: manages accounts
- Google routes → User model: authenticates users
- Facebook routes → User model: authenticates users
- Listing actions → Listing pages: renders listing pages
- User routes → Account pages: renders account pages
- Listing model → MongoDB: persists listings
- Review model → MongoDB: persists reviews
- User model → MongoDB: persists accounts
- Listing actions → Mapbox geocoding: geocodes locations
- Map display → Mapbox geocoding: displays map data
- Image storage setup → Cloudinary: configures image hosting
- Google routes → Google OAuth: OAuth sign-in
- Facebook routes → Facebook OAuth: OAuth sign-in
