# saurabhp0007/housingcom architecture

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

- Interactive diagram: https://gitdiagram.com/saurabhp0007/housingcom
- Repository: https://github.com/saurabhp0007/housingcom

## Overview

Housing is a mobile-first room and flat listing marketplace backed by a NestJS API. The main journey is sign-in, discover and filter listings, inspect a listing, then contact or visit the owner; listers create and submit listings, while admins review and manage them. Supporting branches cover engagement, monetization, content and OTA delivery. The README describes these capabilities; sampled source confirms listing lifecycle/media and review behavior. Most other implementation-level connections are not shown, so edges below reflect documented relationships rather than assumed service calls.

Main entry points: [`apps/mobile/src/app`](https://github.com/saurabhp0007/housingcom/tree/main/apps/mobile/src/app) (Expo app), [`apps/mobile/src/features/engagement`](https://github.com/saurabhp0007/housingcom/tree/main/apps/mobile/src/features/engagement) (Engagement UI), [`apps/mobile/src/features/listings`](https://github.com/saurabhp0007/housingcom/tree/main/apps/mobile/src/features/listings) (Listing editor and pages), [`apps/api/src/modules/listings/services/listing-search.service.ts`](https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/listings/services/listing-search.service.ts) (Listing search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile app"]
  node_mobile_app["Expo app"]
  node_mobile_auth["Session and sign-in"]
  node_mobile_listings["Listing editor and pages"]
  node_mobile_search["Search and map"]
  node_mobile_engagement["Engagement UI"]
  node_mobile_ota["Update client"]
end

subgraph group_marketplace["Listings and discovery"]
  node_listing_lifecycle["Listing lifecycle"]
  node_listing_media["Listing media"]
  node_search["Listing search"]
  node_recommendations["Recommendations"]
  node_geo_places["Geo and places<br/>[geo.service.ts]"]
end

subgraph group_engagement["Customer engagement"]
  node_leads_visits["Leads and visits<br/>[leads.service.ts]"]
  node_chat["Real-time chat<br/>[chat.service.ts]"]
  node_reviews["Reviews<br/>[reviews.service.ts]"]
  node_saved_searches["Saved searches and alerts"]
  node_notifications["Notifications and push"]
end

subgraph group_operations["Marketplace operations"]
  node_monetization["Featured and payments"]
  node_content["Content management<br/>[content.service.ts]"]
  node_admin["Admin tools"]
end

subgraph group_platform["Platform services"]
  node_api["NestJS API<br/>[main.ts]"]
  node_auth["Authentication and users<br/>[auth.service.ts]"]
  node_ota["OTA update service"]
  node_object_storage[("Object storage")]
  node_contracts["Shared contracts"]
end

node_tenant(("Tenant / lister"))
node_administrator(("Administrator"))

node_tenant -->|"uses"| node_mobile_app
node_administrator -->|"uses"| node_mobile_app
node_mobile_app -->|"signs in"| node_mobile_auth
node_mobile_auth -->|"authenticates"| node_auth
node_mobile_app -->|"edits and views"| node_mobile_listings
node_mobile_listings -->|"creates and submits"| node_listing_lifecycle
node_mobile_listings -->|"uploads and orders"| node_listing_media
node_listing_media -.->|"stores files"| node_object_storage
node_mobile_app -->|"searches listings"| node_mobile_search
node_mobile_search -->|"queries"| node_search
node_search -->|"matches locations"| node_geo_places
node_search -->|"ranks results"| node_recommendations
node_mobile_app -->|"contacts and reviews"| node_mobile_engagement
node_mobile_engagement -->|"creates leads"| node_leads_visits
node_mobile_engagement -->|"opens conversations"| node_chat
node_mobile_engagement -->|"submits reviews"| node_reviews
node_reviews -->|"checks eligibility"| node_leads_visits
node_mobile_engagement -->|"saves searches"| node_saved_searches
node_saved_searches -->|"triggers alerts"| node_notifications
node_administrator -->|"manages plans"| node_monetization
node_tenant -->|"purchases featuring"| node_monetization
node_administrator -->|"edits content"| node_content
node_administrator -->|"reviews listings"| node_listing_lifecycle
node_mobile_app -->|"checks updates"| node_mobile_ota
node_mobile_ota -->|"fetches updates"| node_ota
node_mobile_app -->|"shares data types"| node_contracts
node_api -->|"shares data types"| node_contracts

click node_mobile_app "https://github.com/saurabhp0007/housingcom/tree/main/apps/mobile/src/app"
click node_mobile_auth "https://github.com/saurabhp0007/housingcom/tree/main/apps/mobile/src/features/auth"
click node_mobile_listings "https://github.com/saurabhp0007/housingcom/tree/main/apps/mobile/src/features/listings"
click node_mobile_search "https://github.com/saurabhp0007/housingcom/tree/main/apps/mobile/src/features/search"
click node_mobile_engagement "https://github.com/saurabhp0007/housingcom/tree/main/apps/mobile/src/features/engagement"
click node_mobile_ota "https://github.com/saurabhp0007/housingcom/tree/main/apps/mobile/src/features/app-updates"
click node_api "https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/main.ts"
click node_auth "https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/auth/services/auth.service.ts"
click node_listing_lifecycle "https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/listings/services/listings.service.ts"
click node_listing_media "https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/listings/services/listing-media.service.ts"
click node_search "https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/listings/services/listing-search.service.ts"
click node_recommendations "https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/recommendations/services/recommendations.service.ts"
click node_geo_places "https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/geo/services/geo.service.ts"
click node_leads_visits "https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/leads/services/leads.service.ts"
click node_chat "https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/chat/services/chat.service.ts"
click node_reviews "https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/reviews/services/reviews.service.ts"
click node_saved_searches "https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/saved-searches/services/saved-search-alerts.service.ts"
click node_notifications "https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/notifications/services/notifications.service.ts"
click node_monetization "https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/featured/services/listing-features.service.ts"
click node_content "https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/content/services/content.service.ts"
click node_admin "https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/admin/services/admin-dashboard.service.ts"
click node_ota "https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/ota/services/ota-publish.service.ts"
click node_object_storage "https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/core/storage/local-object.storage.ts"
click node_contracts "https://github.com/saurabhp0007/housingcom/tree/main/packages/contracts/src"

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_mobile_app,node_mobile_auth,node_mobile_listings,node_mobile_search,node_mobile_engagement,node_mobile_ota toneBlue
class node_listing_lifecycle,node_listing_media,node_search,node_recommendations,node_geo_places toneAmber
class node_leads_visits,node_chat,node_reviews,node_saved_searches,node_notifications toneMint
class node_monetization,node_content,node_admin toneRose
class node_api,node_auth,node_ota,node_object_storage,node_contracts,node_tenant,node_administrator toneIndigo
```

## Components

### Mobile app

- [Expo app](https://github.com/saurabhp0007/housingcom/tree/main/apps/mobile/src/app): `apps/mobile/src/app`
- [Session and sign-in](https://github.com/saurabhp0007/housingcom/tree/main/apps/mobile/src/features/auth): `apps/mobile/src/features/auth`
- [Listing editor and pages](https://github.com/saurabhp0007/housingcom/tree/main/apps/mobile/src/features/listings): `apps/mobile/src/features/listings`
- [Search and map](https://github.com/saurabhp0007/housingcom/tree/main/apps/mobile/src/features/search): `apps/mobile/src/features/search`
- [Engagement UI](https://github.com/saurabhp0007/housingcom/tree/main/apps/mobile/src/features/engagement): `apps/mobile/src/features/engagement`
- [Update client](https://github.com/saurabhp0007/housingcom/tree/main/apps/mobile/src/features/app-updates): `apps/mobile/src/features/app-updates`

### Listings and discovery

- [Listing lifecycle](https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/listings/services/listings.service.ts): `apps/api/src/modules/listings/services/listings.service.ts`
- [Listing media](https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/listings/services/listing-media.service.ts): `apps/api/src/modules/listings/services/listing-media.service.ts`
- [Listing search](https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/listings/services/listing-search.service.ts): `apps/api/src/modules/listings/services/listing-search.service.ts`
- [Recommendations](https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/recommendations/services/recommendations.service.ts): `apps/api/src/modules/recommendations/services/recommendations.service.ts`
- [Geo and places](https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/geo/services/geo.service.ts): `apps/api/src/modules/geo/services/geo.service.ts`

### Customer engagement

- [Leads and visits](https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/leads/services/leads.service.ts): `apps/api/src/modules/leads/services/leads.service.ts`
- [Real-time chat](https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/chat/services/chat.service.ts): `apps/api/src/modules/chat/services/chat.service.ts`
- [Reviews](https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/reviews/services/reviews.service.ts): `apps/api/src/modules/reviews/services/reviews.service.ts`
- [Saved searches and alerts](https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/saved-searches/services/saved-search-alerts.service.ts): `apps/api/src/modules/saved-searches/services/saved-search-alerts.service.ts`
- [Notifications and push](https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/notifications/services/notifications.service.ts): `apps/api/src/modules/notifications/services/notifications.service.ts`

### Marketplace operations

- [Featured and payments](https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/featured/services/listing-features.service.ts): `apps/api/src/modules/featured/services/listing-features.service.ts`
- [Content management](https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/content/services/content.service.ts): `apps/api/src/modules/content/services/content.service.ts`
- [Admin tools](https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/admin/services/admin-dashboard.service.ts): `apps/api/src/modules/admin/services/admin-dashboard.service.ts`

### Platform services

- [NestJS API](https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/main.ts): `apps/api/src/main.ts`
- [Authentication and users](https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/auth/services/auth.service.ts): `apps/api/src/modules/auth/services/auth.service.ts`
- [OTA update service](https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/modules/ota/services/ota-publish.service.ts): `apps/api/src/modules/ota/services/ota-publish.service.ts`
- [Object storage](https://github.com/saurabhp0007/housingcom/blob/main/apps/api/src/core/storage/local-object.storage.ts): `apps/api/src/core/storage/local-object.storage.ts`
- [Shared contracts](https://github.com/saurabhp0007/housingcom/tree/main/packages/contracts/src): `packages/contracts/src`

### Other components

- **Tenant / lister**
- **Administrator**

## Connections

- Tenant / lister → Expo app: uses (evidence: `README.md`)
- Administrator → Expo app: uses (evidence: `README.md`)
- Expo app → Session and sign-in: signs in (evidence: `README.md`)
- Session and sign-in → Authentication and users: authenticates (evidence: `README.md`)
- Expo app → Listing editor and pages: edits and views (evidence: `README.md`)
- Listing editor and pages → Listing lifecycle: creates and submits
- Listing editor and pages → Listing media: uploads and orders (evidence: `apps/mobile/src/features/listings/components/PhotoManager.tsx`)
- Listing media → Object storage: stores files
- Expo app → Search and map: searches listings (evidence: `README.md`)
- Search and map → Listing search: queries (evidence: `README.md`)
- Listing search → Geo and places: matches locations (evidence: `README.md`)
- Listing search → Recommendations: ranks results (evidence: `README.md`)
- Expo app → Engagement UI: contacts and reviews (evidence: `README.md`)
- Engagement UI → Leads and visits: creates leads (evidence: `README.md`)
- Engagement UI → Real-time chat: opens conversations (evidence: `README.md`)
- Engagement UI → Reviews: submits reviews
- Reviews → Leads and visits: checks eligibility (evidence: `apps/api/src/modules/reviews/services/reviews.service.ts`)
- Engagement UI → Saved searches and alerts: saves searches (evidence: `README.md`)
- Saved searches and alerts → Notifications and push: triggers alerts (evidence: `README.md`)
- Administrator → Featured and payments: manages plans (evidence: `README.md`)
- Tenant / lister → Featured and payments: purchases featuring (evidence: `README.md`)
- Administrator → Content management: edits content (evidence: `README.md`)
- Administrator → Listing lifecycle: reviews listings (evidence: `README.md`)
- Expo app → Update client: checks updates (evidence: `README.md`)
- Update client → OTA update service: fetches updates (evidence: `README.md`)
- Expo app → Shared contracts: shares data types (evidence: `README.md`)
- NestJS API → Shared contracts: shares data types (evidence: `README.md`)
