# noonsae/dogo_project architecture

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

- Interactive diagram: https://gitdiagram.com/noonsae/dogo_project
- Repository: https://github.com/noonsae/dogo_project

## Overview

DoGo is a lodging marketplace connecting travelers with accommodation providers. Its central traveler journey is search and filter hotels, inspect a property and its reviews/rooms, then book and pay; users can also manage favorites, bookings, reviews, and inquiries. Providers register and manage hotels, rooms, policies, bookings, and inquiries, while administrators oversee platform operations. The graph combines README-documented capabilities with specific source-indexed calls; unsampled route and page internals are not assumed beyond those documented capabilities.

Main entry points: [`src/supabase/supabase-server.ts`](https://github.com/noonsae/dogo_project/blob/dev/src/supabase/supabase-server.ts) (Server Supabase client), [`src/components/ui/hotel-review/ReviewsModal.tsx`](https://github.com/noonsae/dogo_project/blob/dev/src/components/ui/hotel-review/ReviewsModal.tsx) (Review presentation), [`src/app/api/inquiries/route.ts`](https://github.com/noonsae/dogo_project/blob/dev/src/app/api/inquiries/route.ts) (Inquiry handling), [`src/supabase/supabase-client.ts`](https://github.com/noonsae/dogo_project/blob/dev/src/supabase/supabase-client.ts) (Browser Supabase client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Hotel discovery"]
  node_home["Home and offers<br/>[page.tsx]"]
  node_search_ui["Search controls<br/>[SearchBox.tsx]"]
  node_search_state["Search state<br/>[useSearchStore.ts]"]
  node_date_math["Stay-date calculation<br/>[dateCalculator.ts]"]
  node_random_dates["Flexible-date selection"]
  node_hotel_results["Hotel results and filters<br/>[page.tsx]"]
  node_hotel_detail["Hotel details and rooms<br/>[page.tsx]"]
  node_reviews_modal["Review presentation<br/>[ReviewsModal.tsx]"]
  node_review_icon["Review icon"]
  node_close_icon["Modal close icon"]
end

subgraph group_identity["Identity and accounts"]
  node_auth["Sign-in and registration<br/>[page.tsx]"]
  node_auth_action["Authentication actions<br/>[auth.ts]"]
  node_signup_action["Registration action"]
end

subgraph group_booking["Booking and payment"]
  node_booking["Booking flow<br/>[page.tsx]"]
  node_payment["Toss payment UI"]
  node_payment_verify["Payment verification<br/>[verify.ts]"]
end

subgraph group_operations["Marketplace operations"]
  node_account["User account management<br/>[page.tsx]"]
  node_provider_ops["Provider management<br/>[page.tsx]"]
  node_admin_ops["Administrator management<br/>[page.tsx]"]
  node_inquiries["Inquiry handling<br/>[route.ts]"]
  node_favorites["Favorite handling<br/>[route.ts]"]
end

subgraph group_platform["Application platform"]
  node_review_type["Review data types<br/>[review-type.ts]"]
  node_services_hook["Service data hook<br/>[useServices.ts]"]
  node_services_fetch["Service data fetch<br/>[fetchServices.ts]"]
  node_user_fetch["User data fetch<br/>[fetchUserData.ts]"]
  node_booking_name_fetch["Booking name lookup"]
  node_browser_db["Browser Supabase client<br/>[supabase-client.ts]"]
  node_server_db["Server Supabase client<br/>[supabase-server.ts]"]
  node_schema["Supabase schema types<br/>[supabase-type.ts]"]
  node_hotel_type["Hotel data types<br/>[hotel-type.ts]"]
  node_icon_type["Icon props type<br/>[icon-type.ts]"]
  node_supabase_service[("Supabase data service")]
end

node_traveler(("Traveler"))
node_toss(("Toss Payments"))

node_traveler -->|"opens"| node_home
node_home -.->|"starts search"| node_search_ui
node_search_ui -.->|"submits criteria"| node_hotel_results
node_hotel_results -->|"selects hotel"| node_hotel_detail
node_hotel_detail -->|"starts booking"| node_booking
node_booking -->|"continues to payment"| node_payment
node_payment -->|"requests payment"| node_toss
node_payment -.->|"verifies payment"| node_payment_verify
node_traveler -->|"signs in or up"| node_auth
node_auth -.->|"invokes auth"| node_auth_action
node_auth -.->|"registers"| node_signup_action
node_traveler -->|"manages account"| node_account
node_traveler -.->|"manages favorites"| node_favorites
node_traveler -->|"submits inquiry"| node_inquiries
node_provider_ops -.->|"replies to inquiry"| node_inquiries
node_traveler -->|"provider manages listings"| node_provider_ops
node_admin_ops -.->|"oversees inquiries"| node_inquiries
node_search_ui -.->|"updates criteria"| node_search_state
node_search_state -->|"calculates stay"| node_date_math
node_search_state -->|"chooses flexible dates"| node_random_dates
node_hotel_detail -.->|"presents reviews"| node_reviews_modal
node_reviews_modal -->|"renders"| node_review_icon
node_reviews_modal -->|"renders"| node_close_icon
node_reviews_modal -->|"uses review type"| node_review_type
node_services_hook -->|"queries with"| node_services_fetch
node_services_fetch -->|"creates client"| node_browser_db
node_user_fetch -->|"creates client"| node_browser_db
node_browser_db -->|"types client"| node_schema
node_server_db -->|"types client"| node_schema
node_inquiries -->|"creates client"| node_server_db
node_favorites -->|"creates client"| node_server_db
node_auth_action -->|"uses client"| node_server_db
node_supabase_service -.->|"stores typed records"| node_hotel_type
node_supabase_service -.->|"stores typed records"| node_review_type
node_supabase_service -.->|"serves browser client"| node_browser_db
node_supabase_service -.->|"serves server client"| node_server_db
node_close_icon -->|"uses props type"| node_icon_type

click node_home "https://github.com/noonsae/dogo_project/blob/dev/src/app/page.tsx"
click node_search_ui "https://github.com/noonsae/dogo_project/blob/dev/src/components/ui/search/SearchBox.tsx"
click node_search_state "https://github.com/noonsae/dogo_project/blob/dev/src/store/useSearchStore.ts"
click node_date_math "https://github.com/noonsae/dogo_project/blob/dev/src/utils/calculator/dateCalculator.ts"
click node_random_dates "https://github.com/noonsae/dogo_project/blob/dev/src/utils/calculator/randomStayDatesCalculator.ts"
click node_hotel_results "https://github.com/noonsae/dogo_project/blob/dev/src/app/hotel-list/page.tsx"
click node_hotel_detail "https://github.com/noonsae/dogo_project/blob/dev/src/app/hotel-list/%5Bid%5D/page.tsx"
click node_reviews_modal "https://github.com/noonsae/dogo_project/blob/dev/src/components/ui/hotel-review/ReviewsModal.tsx"
click node_review_icon "https://github.com/noonsae/dogo_project/blob/dev/src/components/ui/icon/ReviewThumbUpIcon.tsx"
click node_close_icon "https://github.com/noonsae/dogo_project/blob/dev/src/components/ui/icon/CloseButtonIcon.tsx"
click node_review_type "https://github.com/noonsae/dogo_project/blob/dev/src/types/supabase/review-type.ts"
click node_auth "https://github.com/noonsae/dogo_project/blob/dev/src/app/(auth)/sign-in/page.tsx"
click node_auth_action "https://github.com/noonsae/dogo_project/blob/dev/src/actions/auth.ts"
click node_signup_action "https://github.com/noonsae/dogo_project/blob/dev/src/app/(auth)/sign-up/actions/handleSignupAction.ts"
click node_booking "https://github.com/noonsae/dogo_project/blob/dev/src/app/booking/%5Bid%5D/page.tsx"
click node_payment "https://github.com/noonsae/dogo_project/blob/dev/src/app/booking/_components/TossPaymentsButton.tsx"
click node_payment_verify "https://github.com/noonsae/dogo_project/blob/dev/src/app/api/payments/verify.ts"
click node_account "https://github.com/noonsae/dogo_project/blob/dev/src/app/my-page/user/booking/page.tsx"
click node_provider_ops "https://github.com/noonsae/dogo_project/blob/dev/src/app/my-page/business/hotel/page.tsx"
click node_admin_ops "https://github.com/noonsae/dogo_project/blob/dev/src/app/my-page/admin/page.tsx"
click node_inquiries "https://github.com/noonsae/dogo_project/blob/dev/src/app/api/inquiries/route.ts"
click node_favorites "https://github.com/noonsae/dogo_project/blob/dev/src/app/api/favorites/route.ts"
click node_services_hook "https://github.com/noonsae/dogo_project/blob/dev/src/hooks/hotel/useServices.ts"
click node_services_fetch "https://github.com/noonsae/dogo_project/blob/dev/src/utils/api/fetch/fetchServices.ts"
click node_user_fetch "https://github.com/noonsae/dogo_project/blob/dev/src/utils/api/fetch/fetchUserData.ts"
click node_booking_name_fetch "https://github.com/noonsae/dogo_project/blob/dev/src/utils/api/fetch/fetchBookingHotelNameAndRoomName.ts"
click node_browser_db "https://github.com/noonsae/dogo_project/blob/dev/src/supabase/supabase-client.ts"
click node_server_db "https://github.com/noonsae/dogo_project/blob/dev/src/supabase/supabase-server.ts"
click node_schema "https://github.com/noonsae/dogo_project/blob/dev/src/types/supabase/supabase-type.ts"
click node_hotel_type "https://github.com/noonsae/dogo_project/blob/dev/src/types/supabase/hotel-type.ts"
click node_icon_type "https://github.com/noonsae/dogo_project/blob/dev/src/types/icon/icon-type.ts"

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_ui,node_search_state,node_date_math,node_random_dates,node_hotel_results,node_hotel_detail,node_reviews_modal,node_review_icon,node_close_icon toneBlue
class node_auth,node_auth_action,node_signup_action toneAmber
class node_booking,node_payment,node_payment_verify toneMint
class node_account,node_provider_ops,node_admin_ops,node_inquiries,node_favorites toneRose
class node_review_type,node_services_hook,node_services_fetch,node_user_fetch,node_booking_name_fetch,node_browser_db,node_server_db,node_schema,node_hotel_type,node_icon_type,node_supabase_service,node_traveler,node_toss toneIndigo
```

## Components

### Hotel discovery

- [Home and offers](https://github.com/noonsae/dogo_project/blob/dev/src/app/page.tsx): `src/app/page.tsx`
- [Search controls](https://github.com/noonsae/dogo_project/blob/dev/src/components/ui/search/SearchBox.tsx): `src/components/ui/search/SearchBox.tsx`
- [Search state](https://github.com/noonsae/dogo_project/blob/dev/src/store/useSearchStore.ts): `src/store/useSearchStore.ts`
- [Stay-date calculation](https://github.com/noonsae/dogo_project/blob/dev/src/utils/calculator/dateCalculator.ts): `src/utils/calculator/dateCalculator.ts`
- [Flexible-date selection](https://github.com/noonsae/dogo_project/blob/dev/src/utils/calculator/randomStayDatesCalculator.ts): `src/utils/calculator/randomStayDatesCalculator.ts`
- [Hotel results and filters](https://github.com/noonsae/dogo_project/blob/dev/src/app/hotel-list/page.tsx): `src/app/hotel-list/page.tsx`
- [Hotel details and rooms](https://github.com/noonsae/dogo_project/blob/dev/src/app/hotel-list/%5Bid%5D/page.tsx): `src/app/hotel-list/[id]/page.tsx`
- [Review presentation](https://github.com/noonsae/dogo_project/blob/dev/src/components/ui/hotel-review/ReviewsModal.tsx): `src/components/ui/hotel-review/ReviewsModal.tsx`
- [Review icon](https://github.com/noonsae/dogo_project/blob/dev/src/components/ui/icon/ReviewThumbUpIcon.tsx): `src/components/ui/icon/ReviewThumbUpIcon.tsx`
- [Modal close icon](https://github.com/noonsae/dogo_project/blob/dev/src/components/ui/icon/CloseButtonIcon.tsx): `src/components/ui/icon/CloseButtonIcon.tsx`

### Identity and accounts

- [Sign-in and registration](https://github.com/noonsae/dogo_project/blob/dev/src/app/(auth)/sign-in/page.tsx): `src/app/(auth)/sign-in/page.tsx`
- [Authentication actions](https://github.com/noonsae/dogo_project/blob/dev/src/actions/auth.ts): `src/actions/auth.ts`
- [Registration action](https://github.com/noonsae/dogo_project/blob/dev/src/app/(auth)/sign-up/actions/handleSignupAction.ts): `src/app/(auth)/sign-up/actions/handleSignupAction.ts`

### Booking and payment

- [Booking flow](https://github.com/noonsae/dogo_project/blob/dev/src/app/booking/%5Bid%5D/page.tsx): `src/app/booking/[id]/page.tsx`
- [Toss payment UI](https://github.com/noonsae/dogo_project/blob/dev/src/app/booking/_components/TossPaymentsButton.tsx): `src/app/booking/_components/TossPaymentsButton.tsx`
- [Payment verification](https://github.com/noonsae/dogo_project/blob/dev/src/app/api/payments/verify.ts): `src/app/api/payments/verify.ts`

### Marketplace operations

- [User account management](https://github.com/noonsae/dogo_project/blob/dev/src/app/my-page/user/booking/page.tsx): `src/app/my-page/user/booking/page.tsx`
- [Provider management](https://github.com/noonsae/dogo_project/blob/dev/src/app/my-page/business/hotel/page.tsx): `src/app/my-page/business/hotel/page.tsx`
- [Administrator management](https://github.com/noonsae/dogo_project/blob/dev/src/app/my-page/admin/page.tsx): `src/app/my-page/admin/page.tsx`
- [Inquiry handling](https://github.com/noonsae/dogo_project/blob/dev/src/app/api/inquiries/route.ts): `src/app/api/inquiries/route.ts`
- [Favorite handling](https://github.com/noonsae/dogo_project/blob/dev/src/app/api/favorites/route.ts): `src/app/api/favorites/route.ts`

### Application platform

- [Review data types](https://github.com/noonsae/dogo_project/blob/dev/src/types/supabase/review-type.ts): `src/types/supabase/review-type.ts`
- [Service data hook](https://github.com/noonsae/dogo_project/blob/dev/src/hooks/hotel/useServices.ts): `src/hooks/hotel/useServices.ts`
- [Service data fetch](https://github.com/noonsae/dogo_project/blob/dev/src/utils/api/fetch/fetchServices.ts): `src/utils/api/fetch/fetchServices.ts`
- [User data fetch](https://github.com/noonsae/dogo_project/blob/dev/src/utils/api/fetch/fetchUserData.ts): `src/utils/api/fetch/fetchUserData.ts`
- [Booking name lookup](https://github.com/noonsae/dogo_project/blob/dev/src/utils/api/fetch/fetchBookingHotelNameAndRoomName.ts): `src/utils/api/fetch/fetchBookingHotelNameAndRoomName.ts`
- [Browser Supabase client](https://github.com/noonsae/dogo_project/blob/dev/src/supabase/supabase-client.ts): `src/supabase/supabase-client.ts`
- [Server Supabase client](https://github.com/noonsae/dogo_project/blob/dev/src/supabase/supabase-server.ts): `src/supabase/supabase-server.ts`
- [Supabase schema types](https://github.com/noonsae/dogo_project/blob/dev/src/types/supabase/supabase-type.ts): `src/types/supabase/supabase-type.ts`
- [Hotel data types](https://github.com/noonsae/dogo_project/blob/dev/src/types/supabase/hotel-type.ts): `src/types/supabase/hotel-type.ts`
- [Icon props type](https://github.com/noonsae/dogo_project/blob/dev/src/types/icon/icon-type.ts): `src/types/icon/icon-type.ts`
- **Supabase data service**

### Other components

- **Traveler**
- **Toss Payments**

## Connections

- Traveler → Home and offers: opens
- Home and offers → Search controls: starts search
- Search controls → Hotel results and filters: submits criteria
- Hotel results and filters → Hotel details and rooms: selects hotel
- Hotel details and rooms → Booking flow: starts booking
- Booking flow → Toss payment UI: continues to payment
- Toss payment UI → Toss Payments: requests payment
- Toss payment UI → Payment verification: verifies payment
- Traveler → Sign-in and registration: signs in or up
- Sign-in and registration → Authentication actions: invokes auth
- Sign-in and registration → Registration action: registers
- Traveler → User account management: manages account
- Traveler → Favorite handling: manages favorites
- Traveler → Inquiry handling: submits inquiry
- Provider management → Inquiry handling: replies to inquiry
- Traveler → Provider management: provider manages listings
- Administrator management → Inquiry handling: oversees inquiries
- Search controls → Search state: updates criteria
- Search state → Stay-date calculation: calculates stay (evidence: `src/store/useSearchStore.ts`)
- Search state → Flexible-date selection: chooses flexible dates (evidence: `src/store/useSearchStore.ts`)
- Hotel details and rooms → Review presentation: presents reviews
- Review presentation → Review icon: renders (evidence: `src/components/ui/hotel-review/ReviewsModal.tsx`)
- Review presentation → Modal close icon: renders (evidence: `src/components/ui/hotel-review/ReviewsModal.tsx`)
- Review presentation → Review data types: uses review type (evidence: `src/components/ui/hotel-review/ReviewsModal.tsx`)
- Service data hook → Service data fetch: queries with (evidence: `src/hooks/hotel/useServices.ts`)
- Service data fetch → Browser Supabase client: creates client (evidence: `src/utils/api/fetch/fetchServices.ts`)
- User data fetch → Browser Supabase client: creates client (evidence: `src/utils/api/fetch/fetchUserData.ts`)
- Browser Supabase client → Supabase schema types: types client (evidence: `src/supabase/supabase-client.ts`)
- Server Supabase client → Supabase schema types: types client (evidence: `src/supabase/supabase-server.ts`)
- Inquiry handling → Server Supabase client: creates client (evidence: `src/app/api/inquiries/route.ts`)
- Favorite handling → Server Supabase client: creates client (evidence: `src/app/api/favorites/route.ts`)
- Authentication actions → Server Supabase client: uses client (evidence: `src/actions/auth.ts`)
- Supabase data service → Hotel data types: stores typed records
- Supabase data service → Review data types: stores typed records
- Supabase data service → Browser Supabase client: serves browser client
- Supabase data service → Server Supabase client: serves server client
- Modal close icon → Icon props type: uses props type (evidence: `src/components/ui/icon/CloseButtonIcon.tsx`)
