# nafeeza-25/sociotels-guest-journey architecture

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

- Interactive diagram: https://gitdiagram.com/nafeeza-25/sociotels-guest-journey
- Repository: https://github.com/nafeeza-25/sociotels-guest-journey

## Overview

Sociotels is a browser-based, simulated lodging-booking prototype with a guest journey and host console. Guests search dates and preferences, browse ranked stays, inspect a property, choose a room and occupancy, enter details, review pricing, attempt mock payment, and reach confirmation; they can then manage a trip, message the house, and leave feedback. The host view exposes the same demo booking data. The graph follows documented routes and source-index references; unsampled implementations are represented by their exact paths, and external map/font services are documented but not traced to specific callers.

Main entry points: [`src/main.js`](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/main.js) (Router and shell), [`src/api.js`](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/api.js) (Demo operations), [`src/pages/property.js`](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/property.js) (Property details), [`src/pages/stays.js`](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/stays.js) (Stay results)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_journey["Guest booking journey"]
  node_search["Search calendar<br/>[search.js]"]
  node_home["Home discovery<br/>[home.js]"]
  node_results["Stay results<br/>[stays.js]"]
  node_property["Property details<br/>[property.js]"]
  node_room["Room selection<br/>[room.js]"]
  node_guestdetails["Guest details<br/>[guest.js]"]
  node_review["Booking review<br/>[review.js]"]
  node_payment["Mock payment<br/>[pay.js]"]
  node_confirmation["Confirmation<br/>[booked.js]"]
end

subgraph group_operations["Trip and host operations"]
  node_trips["Trip list<br/>[trips.js]"]
  node_trip["Trip management<br/>[trip.js]"]
  node_host["Host console<br/>[host.js]"]
  node_workations["Workations<br/>[workations.js]"]
end

subgraph group_engine["Booking and business logic"]
  node_catalog["Property catalog<br/>[catalog.js]"]
  node_api["Demo operations<br/>[api.js]"]
  node_pricing["Pricing engine<br/>[pricing.js]"]
  node_inventory["Availability inventory<br/>[inventory.js]"]
  node_occupancy["Occupancy rules<br/>[occupancy.js]"]
  node_fit["Stay fit ranking<br/>[fit.js]"]
  node_community["Community signals<br/>[community.js]"]
  node_assistant["House assistant<br/>[assistant.js]"]
  node_bookings["Booking rules<br/>[bookings.js]"]
end

subgraph group_foundation["App and shared foundation"]
  node_app["Router and shell<br/>[main.js]"]
  node_store[("Browser state<br/>[store.js]")]
  node_sharedui["Shared UI components<br/>[components.js]"]
  node_photos["Photo rendering<br/>[photo.js]"]
  node_overlays["Dialogs and toasts<br/>[overlay.js]"]
  node_motion["Motion helpers<br/>[motion.js]"]
  node_dates["Date utilities<br/>[dates.js]"]
  node_format["Formatting helpers<br/>[format.js]"]
  node_html["Safe HTML<br/>[html.js]"]
end

node_guest(("Guest"))

node_guest -->|"opens"| node_app
node_app -->|"routes"| node_home
node_app -.->|"mounts"| node_search
node_app -->|"routes"| node_results
node_app -->|"routes"| node_property
node_app -->|"routes"| node_room
node_app -->|"routes"| node_guestdetails
node_app -->|"routes"| node_review
node_app -->|"routes"| node_payment
node_app -->|"routes"| node_confirmation
node_app -->|"routes"| node_trips
node_app -->|"routes"| node_trip
node_app -->|"routes"| node_host
node_app -.->|"routes"| node_workations
node_search -->|"saves search"| node_store
node_results -->|"requests stays"| node_api
node_results -->|"ranks matches"| node_fit
node_results -->|"checks party"| node_occupancy
node_results -->|"shows signals"| node_community
node_property -->|"loads property"| node_api
node_property -->|"uses fit"| node_fit
node_property -->|"shows prices"| node_pricing
node_property -->|"shows events"| node_community
node_property -->|"checks limits"| node_occupancy
node_room -->|"loads options"| node_api
node_room -->|"quotes stay"| node_pricing
node_room -->|"checks guests"| node_occupancy
node_guestdetails -->|"holds units"| node_api
node_guestdetails -->|"updates draft"| node_store
node_review -->|"builds quote"| node_pricing
node_review -->|"uses booking data"| node_api
node_payment -->|"pays and confirms"| node_api
node_confirmation -->|"loads booking"| node_api
node_api -->|"reads and saves"| node_store
node_api -->|"looks up rooms"| node_catalog
node_api -->|"checks units"| node_inventory
node_api -->|"creates bookings"| node_bookings
node_api -.->|"calculates charge"| node_pricing
node_trips -.->|"loads bookings"| node_api
node_trip -->|"manages stay"| node_api
node_trip -->|"answers questions"| node_assistant
node_trip -->|"shows activities"| node_community
node_host -->|"handles operations"| node_api
node_host -->|"uses booking rules"| node_bookings
node_host -->|"uses replies"| node_assistant
node_workations -.->|"browses properties"| node_catalog
node_store -->|"anchors dates"| node_dates
node_sharedui -->|"renders safely"| node_html

click node_app "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/main.js"
click node_search "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/ui/search.js"
click node_home "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/home.js"
click node_results "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/stays.js"
click node_property "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/property.js"
click node_room "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/room.js"
click node_guestdetails "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/guest.js"
click node_review "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/review.js"
click node_payment "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/pay.js"
click node_confirmation "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/booked.js"
click node_trips "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/trips.js"
click node_trip "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/trip.js"
click node_host "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/host.js"
click node_workations "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/workations.js"
click node_catalog "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/data/catalog.js"
click node_api "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/api.js"
click node_pricing "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/domain/pricing.js"
click node_inventory "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/domain/inventory.js"
click node_occupancy "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/domain/occupancy.js"
click node_fit "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/domain/fit.js"
click node_community "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/domain/community.js"
click node_assistant "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/domain/assistant.js"
click node_bookings "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/domain/bookings.js"
click node_store "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/store.js"
click node_sharedui "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/ui/components.js"
click node_photos "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/ui/photo.js"
click node_overlays "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/ui/overlay.js"
click node_motion "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/ui/motion.js"
click node_dates "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/core/dates.js"
click node_format "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/core/format.js"
click node_html "https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/core/html.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_search,node_home,node_results,node_property,node_room,node_guestdetails,node_review,node_payment,node_confirmation toneBlue
class node_trips,node_trip,node_host,node_workations toneAmber
class node_catalog,node_api,node_pricing,node_inventory,node_occupancy,node_fit,node_community,node_assistant,node_bookings toneMint
class node_app,node_store,node_sharedui,node_photos,node_overlays,node_motion,node_dates,node_format,node_html toneRose
class node_guest toneIndigo
```

## Components

### Guest booking journey

- [Search calendar](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/ui/search.js): `src/ui/search.js`
- [Home discovery](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/home.js): `src/pages/home.js`
- [Stay results](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/stays.js): `src/pages/stays.js`
- [Property details](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/property.js): `src/pages/property.js`
- [Room selection](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/room.js): `src/pages/room.js`
- [Guest details](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/guest.js): `src/pages/guest.js`
- [Booking review](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/review.js): `src/pages/review.js`
- [Mock payment](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/pay.js): `src/pages/pay.js`
- [Confirmation](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/booked.js): `src/pages/booked.js`

### Trip and host operations

- [Trip list](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/trips.js): `src/pages/trips.js`
- [Trip management](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/trip.js): `src/pages/trip.js`
- [Host console](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/host.js): `src/pages/host.js`
- [Workations](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/pages/workations.js): `src/pages/workations.js`

### Booking and business logic

- [Property catalog](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/data/catalog.js): `src/data/catalog.js`
- [Demo operations](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/api.js): `src/api.js`
- [Pricing engine](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/domain/pricing.js): `src/domain/pricing.js`
- [Availability inventory](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/domain/inventory.js): `src/domain/inventory.js`
- [Occupancy rules](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/domain/occupancy.js): `src/domain/occupancy.js`
- [Stay fit ranking](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/domain/fit.js): `src/domain/fit.js`
- [Community signals](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/domain/community.js): `src/domain/community.js`
- [House assistant](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/domain/assistant.js): `src/domain/assistant.js`
- [Booking rules](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/domain/bookings.js): `src/domain/bookings.js`

### App and shared foundation

- [Router and shell](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/main.js): `src/main.js`
- [Browser state](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/store.js): `src/store.js`
- [Shared UI components](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/ui/components.js): `src/ui/components.js`
- [Photo rendering](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/ui/photo.js): `src/ui/photo.js`
- [Dialogs and toasts](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/ui/overlay.js): `src/ui/overlay.js`
- [Motion helpers](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/ui/motion.js): `src/ui/motion.js`
- [Date utilities](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/core/dates.js): `src/core/dates.js`
- [Formatting helpers](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/core/format.js): `src/core/format.js`
- [Safe HTML](https://github.com/nafeeza-25/sociotels-guest-journey/blob/main/src/core/html.js): `src/core/html.js`

### Other components

- **Guest**

## Connections

- Guest → Router and shell: opens (evidence: `README.md`)
- Router and shell → Home discovery: routes (evidence: `src/main.js`)
- Router and shell → Search calendar: mounts
- Router and shell → Stay results: routes (evidence: `src/main.js`)
- Router and shell → Property details: routes (evidence: `src/main.js`)
- Router and shell → Room selection: routes (evidence: `src/main.js`)
- Router and shell → Guest details: routes (evidence: `src/main.js`)
- Router and shell → Booking review: routes (evidence: `src/main.js`)
- Router and shell → Mock payment: routes (evidence: `src/main.js`)
- Router and shell → Confirmation: routes (evidence: `src/main.js`)
- Router and shell → Trip list: routes (evidence: `src/main.js`)
- Router and shell → Trip management: routes (evidence: `src/main.js`)
- Router and shell → Host console: routes (evidence: `src/main.js`)
- Router and shell → Workations: routes (evidence: `src/main.js`)
- Search calendar → Browser state: saves search (evidence: `src/ui/search.js`)
- Stay results → Demo operations: requests stays (evidence: `src/pages/stays.js`)
- Stay results → Stay fit ranking: ranks matches (evidence: `src/pages/stays.js`)
- Stay results → Occupancy rules: checks party (evidence: `src/pages/stays.js`)
- Stay results → Community signals: shows signals (evidence: `src/pages/stays.js`)
- Property details → Demo operations: loads property (evidence: `src/pages/property.js`)
- Property details → Stay fit ranking: uses fit (evidence: `src/pages/property.js`)
- Property details → Pricing engine: shows prices (evidence: `src/pages/property.js`)
- Property details → Community signals: shows events (evidence: `src/pages/property.js`)
- Property details → Occupancy rules: checks limits (evidence: `src/pages/property.js`)
- Room selection → Demo operations: loads options (evidence: `src/pages/room.js`)
- Room selection → Pricing engine: quotes stay (evidence: `src/pages/room.js`)
- Room selection → Occupancy rules: checks guests (evidence: `src/pages/room.js`)
- Guest details → Demo operations: holds units (evidence: `src/pages/guest.js`)
- Guest details → Browser state: updates draft (evidence: `src/pages/guest.js`)
- Booking review → Pricing engine: builds quote (evidence: `src/pages/review.js`)
- Booking review → Demo operations: uses booking data (evidence: `src/pages/review.js`)
- Mock payment → Demo operations: pays and confirms (evidence: `src/pages/pay.js`)
- Confirmation → Demo operations: loads booking (evidence: `src/pages/booked.js`)
- Demo operations → Browser state: reads and saves (evidence: `src/api.js`)
- Demo operations → Property catalog: looks up rooms (evidence: `src/api.js`)
- Demo operations → Availability inventory: checks units (evidence: `src/api.js`)
- Demo operations → Booking rules: creates bookings (evidence: `src/api.js`)
- Demo operations → Pricing engine: calculates charge (evidence: `src/api.js`)
- Trip list → Demo operations: loads bookings
- Trip management → Demo operations: manages stay (evidence: `src/pages/trip.js`)
- Trip management → House assistant: answers questions (evidence: `src/pages/trip.js`)
- Trip management → Community signals: shows activities (evidence: `src/pages/trip.js`)
- Host console → Demo operations: handles operations (evidence: `src/pages/host.js`)
- Host console → Booking rules: uses booking rules (evidence: `src/pages/host.js`)
- Host console → House assistant: uses replies (evidence: `src/pages/host.js`)
- Workations → Property catalog: browses properties (evidence: `src/pages/workations.js`)
- Browser state → Date utilities: anchors dates (evidence: `src/store.js`)
- Shared UI components → Safe HTML: renders safely (evidence: `src/ui/components.js`)
