# thanawisit-d/everglow-travel-static-web architecture

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

- Interactive diagram: https://gitdiagram.com/thanawisit-d/everglow-travel-static-web
- Repository: https://github.com/thanawisit-d/everglow-travel-static-web

## Overview

Everglow Travel is a bilingual Thai/English tour website backed by JSON tour and review data, plus a LINE Official Account bot for automated tour search and replies. Website visitors browse featured, domestic, and outbound tours, filter listings, and view tour and review details; LINE users send a message that is interpreted, matched against tour data, and answered through the Messaging API. The README documents the major website and bot capabilities; sampled source confirms key search, rendering, and webhook dependencies. Some page wiring and optional LINE features were not sampled, so those links are omitted.

Main entry points: [`src/lib/tours-data.ts`](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/lib/tours-data.ts) (Tour data access), [`src/lib/line-reply.ts`](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/lib/line-reply.ts) (Intent and replies), [`src/app/[locale]/home-client.js`](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/app/%5Blocale%5D/home-client.js) (Home experience), [`src/app/[locale]/domestic/domestic-client.js`](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/app/%5Blocale%5D/domestic/domestic-client.js) (Tour listings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Tour website"]
  node_locale_pages["Localized pages<br/>[page.js]"]
  node_home["Home experience<br/>[home-client.js]"]
  node_listing_pages["Tour listings<br/>[domestic-client.js]"]
  node_outbound["Outbound listings<br/>[outbound-client.js]"]
  node_tour_detail["Tour details<br/>[page.js]"]
  node_review_pages["Reviews<br/>[page.js]"]
  node_review_display["Review display<br/>[ReviewSection.js]"]
  node_tour_card["Tour cards<br/>[TourCard.js]"]
  node_filter_ui["Filter controls<br/>[FilterSidebar.js]"]
  node_filter_state["Filter state<br/>[useToursFilter.js]"]
end

subgraph group_catalog["Tour catalog"]
  node_tour_api["Tour API<br/>[route.ts]"]
  node_tour_data["Tour data access<br/>[tours-data.ts]"]
  node_tour_json["Tour JSON data<br/>[tours-th.json]"]
  node_reviews_json["Review data<br/>[reviews.json]"]
end

subgraph group_bot["LINE bot"]
  node_webhook["LINE webhook<br/>[route.ts]"]
  node_reply_logic["Intent and replies<br/>[line-reply.ts]"]
  node_search_parse["Message search<br/>[search-filters.ts]"]
  node_search_terms["Search vocabulary"]
  node_monthly["Monthly selection"]
  node_carousel["Tour carousel<br/>[line-flex.ts]"]
  node_line_api["LINE API client<br/>[line.ts]"]
end

subgraph group_shared["Shared logic"]
  node_tour_types["Tour and search types<br/>[tour.ts]"]
  node_api_types["API types<br/>[api.ts]"]
  node_price_utils["Price utilities<br/>[price.ts]"]
  node_assets["Asset paths<br/>[assets.js]"]
end

node_visitor(("Website visitor"))
node_line_user(("LINE user"))
node_line_service["LINE Messaging API"]

node_visitor -->|"browses"| node_locale_pages
node_locale_pages -->|"renders"| node_home
node_home -->|"loads tours"| node_tour_data
node_home -->|"renders reviews"| node_review_display
node_review_display -->|"reads"| node_reviews_json
node_home -->|"resolves images"| node_assets
node_visitor -->|"filters tours"| node_listing_pages
node_listing_pages -->|"manages filters"| node_filter_state
node_listing_pages -->|"renders results"| node_tour_card
node_visitor -->|"browses"| node_outbound
node_outbound -->|"renders results"| node_tour_card
node_visitor -->|"views details"| node_tour_detail
node_visitor -->|"views reviews"| node_review_pages
node_tour_api -->|"reads tours"| node_tour_data
node_tour_data -->|"loads"| node_tour_json
node_tour_data -->|"uses types"| node_tour_types
node_tour_data -->|"normalizes prices"| node_price_utils
node_line_user -->|"sends message"| node_webhook
node_webhook -->|"dispatches message"| node_reply_logic
node_reply_logic -->|"extracts filters"| node_search_parse
node_search_parse -->|"searches tours"| node_tour_data
node_search_parse -->|"uses keywords"| node_search_terms
node_reply_logic -->|"queries tours"| node_tour_data
node_reply_logic -->|"selects tours"| node_monthly
node_monthly -->|"reads tours"| node_tour_data
node_reply_logic -->|"builds carousel"| node_carousel
node_carousel -->|"formats prices"| node_price_utils
node_webhook -->|"sends reply"| node_line_api
node_line_api -.->|"calls API"| node_line_service
node_reply_logic -->|"uses types"| node_tour_types
node_reply_logic -->|"uses types"| node_api_types
node_tour_data -->|"uses locale type"| node_api_types
node_tour_api -->|"returns typed response"| node_api_types

click node_locale_pages "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/app/%5Blocale%5D/page.js"
click node_home "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/app/%5Blocale%5D/home-client.js"
click node_listing_pages "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/app/%5Blocale%5D/domestic/domestic-client.js"
click node_outbound "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/app/%5Blocale%5D/outbound/outbound-client.js"
click node_tour_detail "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/app/%5Blocale%5D/tours/%5Bid%5D/page.js"
click node_review_pages "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/app/%5Blocale%5D/reviews/page.js"
click node_review_display "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/components/ReviewSection.js"
click node_tour_card "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/components/TourCard.js"
click node_filter_ui "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/components/FilterSidebar.js"
click node_filter_state "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/lib/useToursFilter.js"
click node_tour_api "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/app/api/tours/route.ts"
click node_tour_data "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/lib/tours-data.ts"
click node_tour_json "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/data/tours-th.json"
click node_reviews_json "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/data/reviews.json"
click node_webhook "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/app/api/line/webhook/route.ts"
click node_reply_logic "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/lib/line-reply.ts"
click node_search_parse "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/lib/search-filters.ts"
click node_search_terms "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/lib/search-constants.ts"
click node_monthly "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/lib/monthly-selector.ts"
click node_carousel "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/lib/line-flex.ts"
click node_line_api "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/lib/line.ts"
click node_tour_types "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/types/tour.ts"
click node_api_types "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/types/api.ts"
click node_price_utils "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/utils/price.ts"
click node_assets "https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/lib/assets.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_locale_pages,node_home,node_listing_pages,node_outbound,node_tour_detail,node_review_pages,node_review_display,node_tour_card,node_filter_ui,node_filter_state,node_line_user toneBlue
class node_tour_api,node_tour_data,node_tour_json,node_reviews_json toneAmber
class node_webhook,node_reply_logic,node_search_parse,node_search_terms,node_monthly,node_carousel,node_line_api,node_line_service toneMint
class node_tour_types,node_api_types,node_price_utils,node_assets toneRose
class node_visitor toneIndigo
```

## Components

### Tour website

- [Localized pages](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/app/%5Blocale%5D/page.js): `src/app/[locale]/page.js`
- [Home experience](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/app/%5Blocale%5D/home-client.js): `src/app/[locale]/home-client.js`
- [Tour listings](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/app/%5Blocale%5D/domestic/domestic-client.js): `src/app/[locale]/domestic/domestic-client.js`
- [Outbound listings](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/app/%5Blocale%5D/outbound/outbound-client.js): `src/app/[locale]/outbound/outbound-client.js`
- [Tour details](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/app/%5Blocale%5D/tours/%5Bid%5D/page.js): `src/app/[locale]/tours/[id]/page.js`
- [Reviews](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/app/%5Blocale%5D/reviews/page.js): `src/app/[locale]/reviews/page.js`
- [Review display](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/components/ReviewSection.js): `src/components/ReviewSection.js`
- [Tour cards](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/components/TourCard.js): `src/components/TourCard.js`
- [Filter controls](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/components/FilterSidebar.js): `src/components/FilterSidebar.js`
- [Filter state](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/lib/useToursFilter.js): `src/lib/useToursFilter.js`

### Tour catalog

- [Tour API](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/app/api/tours/route.ts): `src/app/api/tours/route.ts`
- [Tour data access](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/lib/tours-data.ts): `src/lib/tours-data.ts`
- [Tour JSON data](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/data/tours-th.json): `src/data/tours-th.json`
- [Review data](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/data/reviews.json): `src/data/reviews.json`

### LINE bot

- [LINE webhook](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/app/api/line/webhook/route.ts): `src/app/api/line/webhook/route.ts`
- [Intent and replies](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/lib/line-reply.ts): `src/lib/line-reply.ts`
- [Message search](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/lib/search-filters.ts): `src/lib/search-filters.ts`
- [Search vocabulary](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/lib/search-constants.ts): `src/lib/search-constants.ts`
- [Monthly selection](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/lib/monthly-selector.ts): `src/lib/monthly-selector.ts`
- [Tour carousel](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/lib/line-flex.ts): `src/lib/line-flex.ts`
- [LINE API client](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/lib/line.ts): `src/lib/line.ts`

### Shared logic

- [Tour and search types](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/types/tour.ts): `src/types/tour.ts`
- [API types](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/types/api.ts): `src/types/api.ts`
- [Price utilities](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/utils/price.ts): `src/utils/price.ts`
- [Asset paths](https://github.com/thanawisit-d/everglow-travel-static-web/blob/main/src/lib/assets.js): `src/lib/assets.js`

### Other components

- **Website visitor**
- **LINE user**
- **LINE Messaging API**

## Connections

- Website visitor → Localized pages: browses
- Localized pages → Home experience: renders (evidence: `src/app/[locale]/home-client.js`)
- Home experience → Tour data access: loads tours (evidence: `src/app/[locale]/home-client.js`)
- Home experience → Review display: renders reviews (evidence: `src/app/[locale]/home-client.js`)
- Review display → Review data: reads (evidence: `src/components/ReviewSection.js`)
- Home experience → Asset paths: resolves images (evidence: `src/app/[locale]/home-client.js`)
- Website visitor → Tour listings: filters tours
- Tour listings → Filter state: manages filters (evidence: `src/app/[locale]/domestic/domestic-client.js`)
- Tour listings → Tour cards: renders results (evidence: `src/app/[locale]/domestic/domestic-client.js`)
- Website visitor → Outbound listings: browses
- Outbound listings → Tour cards: renders results (evidence: `src/app/[locale]/outbound/outbound-client.js`)
- Website visitor → Tour details: views details
- Website visitor → Reviews: views reviews
- Tour API → Tour data access: reads tours (evidence: `src/app/api/tours/route.ts`)
- Tour data access → Tour JSON data: loads (evidence: `src/lib/tours-data.ts`)
- Tour data access → Tour and search types: uses types (evidence: `src/lib/tours-data.ts`)
- Tour data access → Price utilities: normalizes prices (evidence: `src/lib/tours-data.ts`)
- LINE user → LINE webhook: sends message
- LINE webhook → Intent and replies: dispatches message (evidence: `src/app/api/line/webhook/route.ts`)
- Intent and replies → Message search: extracts filters (evidence: `src/lib/line-reply.ts`)
- Message search → Tour data access: searches tours (evidence: `src/lib/search-filters.ts`)
- Message search → Search vocabulary: uses keywords (evidence: `src/lib/search-filters.ts`)
- Intent and replies → Tour data access: queries tours (evidence: `src/lib/line-reply.ts`)
- Intent and replies → Monthly selection: selects tours (evidence: `src/lib/line-reply.ts`)
- Monthly selection → Tour data access: reads tours (evidence: `src/lib/monthly-selector.ts`)
- Intent and replies → Tour carousel: builds carousel (evidence: `src/lib/line-reply.ts`)
- Tour carousel → Price utilities: formats prices (evidence: `src/lib/line-flex.ts`)
- LINE webhook → LINE API client: sends reply (evidence: `src/app/api/line/webhook/route.ts`)
- LINE API client → LINE Messaging API: calls API
- Intent and replies → Tour and search types: uses types (evidence: `src/lib/line-reply.ts`)
- Intent and replies → API types: uses types (evidence: `src/lib/line-reply.ts`)
- Tour data access → API types: uses locale type (evidence: `src/lib/tours-data.ts`)
- Tour API → API types: returns typed response (evidence: `src/app/api/tours/route.ts`)
