# leisure-ui.com — repo context

> Curated overview for code_search. Source: `bitbucket_server:AD/leisure-ui.com` (Bitbucket, project AD). Next.js 16 (App Router) / React 19 / TypeScript. Default branch `master`.

## Purpose
The **Leisure.com** consumer web app — the travel/hotel booking front end: hotel **search**, **listing**/details, **checkout/payments**, **booking**, post-booking **trips**, wishlists, and user **profile/auth**. Server-rendered Next.js that calls the Leisure backend microservices (user, pricing/search, booking, payment); selected third-party APIs (Google Places/Routes, reCAPTCHA, IP blocking) are proxied through Next.js Route Handlers.

## Structure (Next.js App Router)
- `app/` — routes. Route groups **`(public)/`** and **`(protected)/`** split anonymous vs. authed pages; **`api/`** holds Route Handlers (server-side proxies / BFF). Plus `layout.tsx`, `template.tsx`, `page.tsx`, `error.tsx`, `not-found.tsx`, `ReduxProvider.tsx`, `robots.ts`, `sitemap.ts`.
- `features/` — domain modules; **start here** for feature logic: `auth`, `search`, `listing`, `booking`, `payments`, `trips`, `user`.
- `components/` — shared UI. `store/` (Redux Toolkit + redux-persist), `services/` (API clients / axios), `hooks/`, `context/`, `lib/`, `utils/`, `types/`, `constants/`, `styles/`, `config/`.
- `middleware.ts` — browser security (CSP, HSTS, cache-control on sensitive routes) + IP/edge checks.
- `docs/` — `architecture.md`, `local-setup.md`, `development.md`, `api.md`.

## Tech
Next.js 16 · React 19 · TypeScript · Tailwind 4 · Redux Toolkit + redux-persist · TanStack React Query · react-hook-form + zod · Google Maps (`@react-google-maps/api`, marker clusterer) + Google OAuth · axios. Ports: `3000` (dev) / `7002` (PM2 `ecosystem.config.js`).

## Search notes
- Domain logic lives under `features/<area>/`; shared plumbing under `components/`, `services/`, `store/`, `hooks/`.
- `app/api/` are Next Route Handlers — thin proxies to the Leisure backend + third parties, **not** the core business logic (the real services are separate Leisure backend repos).
- `node_modules` / build output are gitignored, so they aren't indexed.
