# jayabapp/jayab-front architecture

> Architecture diagram of the GitHub repository jayabapp/jayab-front, 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/jayabapp/jayab-front
- Repository: https://github.com/jayabapp/jayab-front

## Overview

This is a Next.js property-rental marketplace: visitors discover and filter listings, inspect a property, and can proceed toward a reservation; owners manage listings and availability, while users have profiles, messaging, and support. The graph groups the main user-facing domains and the API-service layer. Source-index references and excerpts support the API calls and selected component relationships; many route-to-component links are not shown in the sampled source, so those relationships are omitted rather than assumed.

Main entry points: [`api_services/common/apicall.helper.ts`](https://github.com/jayabapp/jayab-front/blob/main/api_services/common/apicall.helper.ts) (HTTP API helper), [`components/CityModal/index.tsx`](https://github.com/jayabapp/jayab-front/blob/main/components/CityModal/index.tsx) (City selection), [`components/SearchBoxComp/index.tsx`](https://github.com/jayabapp/jayab-front/blob/main/components/SearchBoxComp/index.tsx) (Search and filters), [`app/chat/[chat_id]/page.tsx`](https://github.com/jayabapp/jayab-front/blob/main/app/chat/%5Bchat_id%5D/page.tsx) (Messaging)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Discovery"]
  node_home["Home<br/>[page.tsx]"]
  node_search["Search and filters<br/>[index.tsx]"]
  node_city["City selection<br/>[index.tsx]"]
  node_listing["Property results<br/>[index.tsx]"]
end

subgraph group_property["Property lifecycle"]
  node_property_detail["Property details<br/>[page.tsx]"]
  node_property_editor["Owner listing editor"]
  node_availability["Availability calendar<br/>[index.tsx]"]
  node_reserves["Reservations<br/>[page.tsx]"]
end

subgraph group_accounts["Accounts and engagement"]
  node_auth_pages["Authentication<br/>[page.tsx]"]
  node_profile["User profile<br/>[page.tsx]"]
  node_chat["Messaging<br/>[page.tsx]"]
  node_advisor["Advisor services<br/>[page.tsx]"]
  node_support["Customer support<br/>[page.tsx]"]
end

subgraph group_services["API services"]
  node_home_api["Home content API<br/>[home.service.ts]"]
  node_property_api["Property API"]
  node_auth_api["Authentication API<br/>[auth.service.ts]"]
  node_chat_api["Chat API<br/>[chat.service.ts]"]
  node_reserve_api["Reservation API<br/>[reserve.service.ts]"]
end

subgraph group_shared["Shared runtime"]
  node_api_helper["HTTP API helper<br/>[apicall.helper.ts]"]
  node_state[("Client state<br/>[index.tsx]")]
end

node_visitor(("Visitor"))
node_backend[("Marketplace backend")]
node_socket(("Socket service"))

node_visitor -.->|"browses"| node_home
node_visitor -.->|"searches"| node_search
node_search -.->|"requests content"| node_home_api
node_home_api -->|"calls"| node_api_helper
node_property_api -->|"calls"| node_api_helper
node_auth_api -->|"calls"| node_api_helper
node_chat_api -->|"calls"| node_api_helper
node_reserve_api -->|"calls"| node_api_helper
node_api_helper -->|"sends HTTP requests"| node_backend
node_city -->|"loads cities"| node_backend
node_city -->|"uses city state"| node_state
node_visitor -.->|"opens listing"| node_property_detail
node_visitor -.->|"signs in"| node_auth_pages
node_visitor -.->|"manages account"| node_profile
node_visitor -.->|"edits listing"| node_property_editor
node_visitor -.->|"manages dates"| node_availability
node_visitor -.->|"views reservations"| node_reserves
node_visitor -.->|"messages"| node_chat
node_visitor -.->|"views advisors"| node_advisor
node_visitor -.->|"requests support"| node_support
node_chat -.->|"uses chat API"| node_chat_api
node_socket -->|"updates state"| node_state

click node_home "https://github.com/jayabapp/jayab-front/blob/main/app/page.tsx"
click node_search "https://github.com/jayabapp/jayab-front/blob/main/components/SearchBoxComp/index.tsx"
click node_city "https://github.com/jayabapp/jayab-front/blob/main/components/CityModal/index.tsx"
click node_listing "https://github.com/jayabapp/jayab-front/blob/main/components/SinglePageComponents/Filterpage/index.tsx"
click node_property_detail "https://github.com/jayabapp/jayab-front/blob/main/app/rooms/%5Broom_slug%5D/page.tsx"
click node_property_editor "https://github.com/jayabapp/jayab-front/blob/main/components/properties/CreateEditProperty.tsx"
click node_availability "https://github.com/jayabapp/jayab-front/blob/main/components/properties/owner/SingleOwnerPropertycallender/index.tsx"
click node_reserves "https://github.com/jayabapp/jayab-front/blob/main/app/(profile)/profile/reserves/page.tsx"
click node_auth_pages "https://github.com/jayabapp/jayab-front/blob/main/app/auth/page.tsx"
click node_profile "https://github.com/jayabapp/jayab-front/blob/main/app/(profile)/profile/page.tsx"
click node_chat "https://github.com/jayabapp/jayab-front/blob/main/app/chat/%5Bchat_id%5D/page.tsx"
click node_advisor "https://github.com/jayabapp/jayab-front/blob/main/app/advisors/page.tsx"
click node_support "https://github.com/jayabapp/jayab-front/blob/main/app/(profile)/profile/support/page.tsx"
click node_home_api "https://github.com/jayabapp/jayab-front/blob/main/api_services/home/home.service.ts"
click node_property_api "https://github.com/jayabapp/jayab-front/blob/main/api_services/property/property.service.ts"
click node_auth_api "https://github.com/jayabapp/jayab-front/blob/main/api_services/auth/auth.service.ts"
click node_chat_api "https://github.com/jayabapp/jayab-front/blob/main/api_services/chat/chat.service.ts"
click node_reserve_api "https://github.com/jayabapp/jayab-front/blob/main/api_services/reserve/reserve.service.ts"
click node_api_helper "https://github.com/jayabapp/jayab-front/blob/main/api_services/common/apicall.helper.ts"
click node_state "https://github.com/jayabapp/jayab-front/blob/main/store/index.tsx"

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_home,node_search,node_city,node_listing toneBlue
class node_property_detail,node_property_editor,node_availability,node_reserves,node_backend toneAmber
class node_auth_pages,node_profile,node_chat,node_advisor,node_support toneMint
class node_home_api,node_property_api,node_auth_api,node_chat_api,node_reserve_api toneRose
class node_api_helper,node_state,node_visitor,node_socket toneIndigo
```

## Components

### Discovery

- [Home](https://github.com/jayabapp/jayab-front/blob/main/app/page.tsx): `app/page.tsx`
- [Search and filters](https://github.com/jayabapp/jayab-front/blob/main/components/SearchBoxComp/index.tsx): `components/SearchBoxComp/index.tsx`
- [City selection](https://github.com/jayabapp/jayab-front/blob/main/components/CityModal/index.tsx): `components/CityModal/index.tsx`
- [Property results](https://github.com/jayabapp/jayab-front/blob/main/components/SinglePageComponents/Filterpage/index.tsx): `components/SinglePageComponents/Filterpage/index.tsx`

### Property lifecycle

- [Property details](https://github.com/jayabapp/jayab-front/blob/main/app/rooms/%5Broom_slug%5D/page.tsx): `app/rooms/[room_slug]/page.tsx`
- [Owner listing editor](https://github.com/jayabapp/jayab-front/blob/main/components/properties/CreateEditProperty.tsx): `components/properties/CreateEditProperty.tsx`
- [Availability calendar](https://github.com/jayabapp/jayab-front/blob/main/components/properties/owner/SingleOwnerPropertycallender/index.tsx): `components/properties/owner/SingleOwnerPropertycallender/index.tsx`
- [Reservations](https://github.com/jayabapp/jayab-front/blob/main/app/(profile)/profile/reserves/page.tsx): `app/(profile)/profile/reserves/page.tsx`

### Accounts and engagement

- [Authentication](https://github.com/jayabapp/jayab-front/blob/main/app/auth/page.tsx): `app/auth/page.tsx`
- [User profile](https://github.com/jayabapp/jayab-front/blob/main/app/(profile)/profile/page.tsx): `app/(profile)/profile/page.tsx`
- [Messaging](https://github.com/jayabapp/jayab-front/blob/main/app/chat/%5Bchat_id%5D/page.tsx): `app/chat/[chat_id]/page.tsx`
- [Advisor services](https://github.com/jayabapp/jayab-front/blob/main/app/advisors/page.tsx): `app/advisors/page.tsx`
- [Customer support](https://github.com/jayabapp/jayab-front/blob/main/app/(profile)/profile/support/page.tsx): `app/(profile)/profile/support/page.tsx`

### API services

- [Home content API](https://github.com/jayabapp/jayab-front/blob/main/api_services/home/home.service.ts): `api_services/home/home.service.ts`
- [Property API](https://github.com/jayabapp/jayab-front/blob/main/api_services/property/property.service.ts): `api_services/property/property.service.ts`
- [Authentication API](https://github.com/jayabapp/jayab-front/blob/main/api_services/auth/auth.service.ts): `api_services/auth/auth.service.ts`
- [Chat API](https://github.com/jayabapp/jayab-front/blob/main/api_services/chat/chat.service.ts): `api_services/chat/chat.service.ts`
- [Reservation API](https://github.com/jayabapp/jayab-front/blob/main/api_services/reserve/reserve.service.ts): `api_services/reserve/reserve.service.ts`

### Shared runtime

- [HTTP API helper](https://github.com/jayabapp/jayab-front/blob/main/api_services/common/apicall.helper.ts): `api_services/common/apicall.helper.ts`
- [Client state](https://github.com/jayabapp/jayab-front/blob/main/store/index.tsx): `store/index.tsx`

### Other components

- **Visitor**
- **Marketplace backend**
- **Socket service**

## Connections

- Visitor → Home: browses
- Visitor → Search and filters: searches
- Search and filters → Home content API: requests content
- Home content API → HTTP API helper: calls (evidence: `api_services/home/home.service.ts`)
- Property API → HTTP API helper: calls (evidence: `api_services/property/property.service.ts`)
- Authentication API → HTTP API helper: calls (evidence: `api_services/auth/auth.service.ts`)
- Chat API → HTTP API helper: calls (evidence: `api_services/chat/chat.service.ts`)
- Reservation API → HTTP API helper: calls (evidence: `api_services/reserve/reserve.service.ts`)
- HTTP API helper → Marketplace backend: sends HTTP requests (evidence: `api_services/common/apicall.helper.ts`)
- City selection → Marketplace backend: loads cities (evidence: `components/CityModal/index.tsx`)
- City selection → Client state: uses city state (evidence: `components/CityModal/index.tsx`)
- Visitor → Property details: opens listing
- Visitor → Authentication: signs in
- Visitor → User profile: manages account
- Visitor → Owner listing editor: edits listing
- Visitor → Availability calendar: manages dates
- Visitor → Reservations: views reservations
- Visitor → Messaging: messages
- Visitor → Advisor services: views advisors
- Visitor → Customer support: requests support
- Messaging → Chat API: uses chat API
- Socket service → Client state: updates state
