# yuvip1/basera architecture

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

- Interactive diagram: https://gitdiagram.com/yuvip1/basera
- Repository: https://github.com/yuvip1/basera

## Overview

Basera is a heritage-homestay marketplace centered on a booking and trust workflow: guests find a home and request dates; hosts inspect a private, host-network guest dossier before deciding; accepted requests proceed to payment and a completed stay, after which both sides can review within role-specific visibility rules. Supporting branches include listing discovery, messaging, administration, and external payments, uploads, maps, and email. The supplied tree exposes only the landing page and Prisma schema, so most product components and their relationships below reflect README documentation, not inspected implementation.

Main entry points: [`src/app`](https://github.com/yuvip1/basera/tree/main/src/app) (Booking Requests), [`prisma/schema.prisma`](https://github.com/yuvip1/basera/blob/main/prisma/schema.prisma) (Marketplace Data), [`src/app/page.tsx`](https://github.com/yuvip1/basera/blob/main/src/app/page.tsx) (Marketplace Entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Homes and Discovery"]
  node_landing["Marketplace Entry<br/>[page.tsx]"]
  node_search["Home Search"]
  node_listings["Listings and Pages"]
  node_maps["Home Maps"]
end

subgraph group_trust["Bookings and Trust"]
  node_booking["Booking Requests"]
  node_dossier["Guest Dossier"]
  node_reputation["Guest Reviews"]
  node_home_reviews["Home Reviews"]
end

subgraph group_lifecycle["Stay Lifecycle"]
  node_messaging["Booking Messages"]
  node_payments["Payment Lifecycle"]
  node_payouts["Host Payouts"]
end

subgraph group_platform["Identity and Data"]
  node_auth["Authentication"]
  node_data[("Marketplace Data<br/>[schema.prisma]")]
end

subgraph group_operations["Operations"]
  node_admin["Admin Moderation"]
  node_reports["Reports and Disputes"]
end

node_visitor(("Guest or Host"))
node_cloudinary["Cloudinary"]
node_razorpay["Razorpay"]
node_resend["Resend Email"]
node_openstreetmap["OpenStreetMap"]

node_visitor -->|"opens"| node_landing
node_landing -->|"links to"| node_search
node_landing -->|"links to"| node_listings
node_search -->|"finds homes"| node_listings
node_search -->|"shows locations"| node_maps
node_listings -->|"uploads photos"| node_cloudinary
node_maps -->|"uses map tiles"| node_openstreetmap
node_visitor -->|"signs in"| node_auth
node_booking -->|"stores requests"| node_data
node_booking -->|"shows host"| node_dossier
node_dossier -->|"displays reviews"| node_reputation
node_booking -->|"acceptance enables"| node_payments
node_payments -->|"creates payments"| node_razorpay
node_razorpay -->|"sends webhooks"| node_payments
node_payments -->|"records payment"| node_data
node_payments -->|"tracks payout"| node_payouts
node_booking -->|"threads chat"| node_messaging
node_booking -->|"triggers email"| node_resend
node_booking -->|"completed stay opens"| node_home_reviews
node_booking -->|"completed stay opens"| node_reputation
node_home_reviews -->|"appears publicly"| node_listings
node_reputation -->|"visible to hosts"| node_dossier
node_admin -->|"moderates records"| node_data
node_admin -->|"marks paid"| node_payouts
node_admin -->|"handles disputes"| node_reports
node_reports -->|"records reports"| node_data

click node_landing "https://github.com/yuvip1/basera/blob/main/src/app/page.tsx"
click node_search "https://github.com/yuvip1/basera/tree/main/src/app"
click node_listings "https://github.com/yuvip1/basera/tree/main/src/app"
click node_maps "https://github.com/yuvip1/basera/tree/main/src/app"
click node_booking "https://github.com/yuvip1/basera/tree/main/src/app"
click node_dossier "https://github.com/yuvip1/basera/tree/main/src/app"
click node_reputation "https://github.com/yuvip1/basera/tree/main/src/app"
click node_home_reviews "https://github.com/yuvip1/basera/tree/main/src/app"
click node_messaging "https://github.com/yuvip1/basera/tree/main/src/app"
click node_payments "https://github.com/yuvip1/basera/tree/main/src/app"
click node_payouts "https://github.com/yuvip1/basera/tree/main/src/app"
click node_auth "https://github.com/yuvip1/basera/tree/main/src/app"
click node_data "https://github.com/yuvip1/basera/blob/main/prisma/schema.prisma"
click node_admin "https://github.com/yuvip1/basera/tree/main/src/app"
click node_reports "https://github.com/yuvip1/basera/tree/main/src/app"

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_landing,node_search,node_listings,node_maps toneBlue
class node_booking,node_dossier,node_reputation,node_home_reviews toneAmber
class node_messaging,node_payments,node_payouts toneMint
class node_auth,node_data toneRose
class node_admin,node_reports,node_visitor,node_cloudinary,node_razorpay,node_resend,node_openstreetmap toneIndigo
```

## Components

### Homes and Discovery

- [Marketplace Entry](https://github.com/yuvip1/basera/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Home Search](https://github.com/yuvip1/basera/tree/main/src/app): `src/app`
- [Listings and Pages](https://github.com/yuvip1/basera/tree/main/src/app): `src/app`
- [Home Maps](https://github.com/yuvip1/basera/tree/main/src/app): `src/app`

### Bookings and Trust

- [Booking Requests](https://github.com/yuvip1/basera/tree/main/src/app): `src/app`
- [Guest Dossier](https://github.com/yuvip1/basera/tree/main/src/app): `src/app`
- [Guest Reviews](https://github.com/yuvip1/basera/tree/main/src/app): `src/app`
- [Home Reviews](https://github.com/yuvip1/basera/tree/main/src/app): `src/app`

### Stay Lifecycle

- [Booking Messages](https://github.com/yuvip1/basera/tree/main/src/app): `src/app`
- [Payment Lifecycle](https://github.com/yuvip1/basera/tree/main/src/app): `src/app`
- [Host Payouts](https://github.com/yuvip1/basera/tree/main/src/app): `src/app`

### Identity and Data

- [Authentication](https://github.com/yuvip1/basera/tree/main/src/app): `src/app`
- [Marketplace Data](https://github.com/yuvip1/basera/blob/main/prisma/schema.prisma): `prisma/schema.prisma`

### Operations

- [Admin Moderation](https://github.com/yuvip1/basera/tree/main/src/app): `src/app`
- [Reports and Disputes](https://github.com/yuvip1/basera/tree/main/src/app): `src/app`

### Other components

- **Guest or Host**
- **Cloudinary**
- **Razorpay**
- **Resend Email**
- **OpenStreetMap**

## Connections

- Guest or Host → Marketplace Entry: opens (evidence: `src/app/page.tsx`)
- Marketplace Entry → Home Search: links to (evidence: `src/app/page.tsx`)
- Marketplace Entry → Listings and Pages: links to (evidence: `src/app/page.tsx`)
- Home Search → Listings and Pages: finds homes (evidence: `README.md`)
- Home Search → Home Maps: shows locations (evidence: `README.md`)
- Listings and Pages → Cloudinary: uploads photos (evidence: `README.md`)
- Home Maps → OpenStreetMap: uses map tiles (evidence: `README.md`)
- Guest or Host → Authentication: signs in (evidence: `README.md`)
- Booking Requests → Marketplace Data: stores requests (evidence: `README.md`)
- Booking Requests → Guest Dossier: shows host (evidence: `README.md`)
- Guest Dossier → Guest Reviews: displays reviews (evidence: `README.md`)
- Booking Requests → Payment Lifecycle: acceptance enables (evidence: `README.md`)
- Payment Lifecycle → Razorpay: creates payments (evidence: `README.md`)
- Razorpay → Payment Lifecycle: sends webhooks (evidence: `README.md`)
- Payment Lifecycle → Marketplace Data: records payment (evidence: `README.md`)
- Payment Lifecycle → Host Payouts: tracks payout (evidence: `README.md`)
- Booking Requests → Booking Messages: threads chat (evidence: `README.md`)
- Booking Requests → Resend Email: triggers email (evidence: `README.md`)
- Booking Requests → Home Reviews: completed stay opens (evidence: `README.md`)
- Booking Requests → Guest Reviews: completed stay opens (evidence: `README.md`)
- Home Reviews → Listings and Pages: appears publicly (evidence: `README.md`)
- Guest Reviews → Guest Dossier: visible to hosts (evidence: `README.md`)
- Admin Moderation → Marketplace Data: moderates records (evidence: `README.md`)
- Admin Moderation → Host Payouts: marks paid (evidence: `README.md`)
- Admin Moderation → Reports and Disputes: handles disputes (evidence: `README.md`)
- Reports and Disputes → Marketplace Data: records reports (evidence: `README.md`)
