# davidakerlind/harpaviljongen architecture

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

- Interactive diagram: https://gitdiagram.com/davidakerlind/harpaviljongen
- Repository: https://github.com/davidakerlind/harpaviljongen

## Overview

Harpaviljongen is a React restaurant website: visitors navigate its home, menu, chambre séparée, gallery, and events pages to view restaurant information and event details. The app routes requests to page components; menu, wine, opening-hours, event, and site-configuration data are obtained through API modules. Admin-managed settings control page visibility, menu links, and the hero slideshow, with site configuration cached in the browser. The README documents additional capabilities whose page-level wiring is not shown in the sampled source, so those links are not inferred. Booking and analytics integrations are included as documented or source-visible external services.

Main entry points: [`src/App.jsx`](https://github.com/davidakerlind/harpaviljongen/blob/main/src/App.jsx) (Router), [`src/API/useSiteConfig.js`](https://github.com/davidakerlind/harpaviljongen/blob/main/src/API/useSiteConfig.js) (Site settings), [`src/components/NavBar/NavBar.jsx`](https://github.com/davidakerlind/harpaviljongen/blob/main/src/components/NavBar/NavBar.jsx) (Navigation), [`src/pages/HomePage/HomePage.jsx`](https://github.com/davidakerlind/harpaviljongen/blob/main/src/pages/HomePage/HomePage.jsx) (Home page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Web application"]
  node_app["Router<br/>[App.jsx]"]
  node_home["Home page<br/>[HomePage.jsx]"]
  node_navbar["Navigation<br/>[NavBar.jsx]"]
end

subgraph group_content["Restaurant content"]
  node_menu["Menu page<br/>[MenuPage.jsx]"]
  node_chambre["Chambre page<br/>[ChambrePage.jsx]"]
  node_gallery["Gallery page<br/>[GalleryPage.jsx]"]
  node_events["Events page<br/>[EventsPage.jsx]"]
  node_single_event["Event details"]
  node_wine["Wine list page<br/>[WineListPage.jsx]"]
  node_event_calendar["Event calendar<br/>[EventCalendar.jsx]"]
  node_hero["Hero slideshow<br/>[useHero.js]"]
end

subgraph group_data["Data and settings"]
  node_site_config["Site settings<br/>[useSiteConfig.js]"]
  node_event_list_api["Events API<br/>[fetchAllEvents.js]"]
  node_event_detail_api["Event detail API<br/>[fetchEventById.js]"]
  node_menu_api["Menu API<br/>[fetchMenuById.js]"]
  node_hours_api["Opening hours API"]
  node_wine_api["Wine list API<br/>[fetchWineList.js]"]
  node_browser_cache[("Browser cache<br/>[useSiteConfig.js]")]
end

subgraph group_integrations["External services"]
  node_restaurant_api{{"Restaurant REST API"}}
  node_admin{{"Admin service"}}
  node_booking{{"Booking service"}}
  node_analytics{{"Analytics endpoint"}}
end

node_visitor(("Visitor"))

node_visitor -->|"opens site"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_menu
node_app -->|"routes to"| node_chambre
node_app -->|"routes to"| node_gallery
node_app -->|"routes to"| node_events
node_app -->|"routes to"| node_single_event
node_app -->|"routes to"| node_wine
node_home -->|"reads settings"| node_site_config
node_navbar -->|"reads settings"| node_site_config
node_hero -->|"reads hero config"| node_site_config
node_site_config -->|"reads and writes"| node_browser_cache
node_site_config -->|"fetches config"| node_restaurant_api
node_restaurant_api -->|"returns config"| node_site_config
node_admin -.->|"publishes settings"| node_restaurant_api
node_event_calendar -->|"fetches events"| node_event_list_api
node_event_list_api -->|"requests events"| node_restaurant_api
node_single_event -->|"fetches event"| node_event_detail_api
node_event_detail_api -->|"requests event"| node_restaurant_api
node_menu -.->|"fetches menu"| node_menu_api
node_menu_api -.->|"requests menu"| node_restaurant_api
node_wine -.->|"fetches wine list"| node_wine_api
node_wine_api -.->|"requests wine list"| node_restaurant_api
node_hours_api -.->|"requests hours"| node_restaurant_api
node_navbar -->|"opens booking"| node_booking
node_app -.->|"records page views"| node_analytics

click node_app "https://github.com/davidakerlind/harpaviljongen/blob/main/src/App.jsx"
click node_home "https://github.com/davidakerlind/harpaviljongen/blob/main/src/pages/HomePage/HomePage.jsx"
click node_menu "https://github.com/davidakerlind/harpaviljongen/blob/main/src/pages/MenuPage/MenuPage.jsx"
click node_chambre "https://github.com/davidakerlind/harpaviljongen/blob/main/src/pages/ChambrePage/ChambrePage.jsx"
click node_gallery "https://github.com/davidakerlind/harpaviljongen/blob/main/src/pages/GalleryPage/GalleryPage.jsx"
click node_events "https://github.com/davidakerlind/harpaviljongen/blob/main/src/pages/EventsPage/EventsPage.jsx"
click node_single_event "https://github.com/davidakerlind/harpaviljongen/blob/main/src/pages/SingleEventPage/SingleEventPage.jsx"
click node_wine "https://github.com/davidakerlind/harpaviljongen/blob/main/src/pages/WineListPage/WineListPage.jsx"
click node_navbar "https://github.com/davidakerlind/harpaviljongen/blob/main/src/components/NavBar/NavBar.jsx"
click node_event_calendar "https://github.com/davidakerlind/harpaviljongen/blob/main/src/components/EventCalendar/EventCalendar.jsx"
click node_site_config "https://github.com/davidakerlind/harpaviljongen/blob/main/src/API/useSiteConfig.js"
click node_hero "https://github.com/davidakerlind/harpaviljongen/blob/main/src/components/HeroSection/useHero.js"
click node_event_list_api "https://github.com/davidakerlind/harpaviljongen/blob/main/src/API/fetchAllEvents.js"
click node_event_detail_api "https://github.com/davidakerlind/harpaviljongen/blob/main/src/API/fetchEventById.js"
click node_menu_api "https://github.com/davidakerlind/harpaviljongen/blob/main/src/API/fetchMenuById.js"
click node_hours_api "https://github.com/davidakerlind/harpaviljongen/blob/main/src/API/fetchOpeningHours.js"
click node_wine_api "https://github.com/davidakerlind/harpaviljongen/blob/main/src/API/fetchWineList.js"
click node_browser_cache "https://github.com/davidakerlind/harpaviljongen/blob/main/src/API/useSiteConfig.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_app,node_home,node_navbar toneBlue
class node_menu,node_chambre,node_gallery,node_events,node_single_event,node_wine,node_event_calendar,node_hero toneAmber
class node_site_config,node_event_list_api,node_event_detail_api,node_menu_api,node_hours_api,node_wine_api,node_browser_cache toneMint
class node_restaurant_api,node_admin,node_booking,node_analytics toneRose
class node_visitor toneIndigo
```

## Components

### Web application

- [Router](https://github.com/davidakerlind/harpaviljongen/blob/main/src/App.jsx): `src/App.jsx`
- [Home page](https://github.com/davidakerlind/harpaviljongen/blob/main/src/pages/HomePage/HomePage.jsx): `src/pages/HomePage/HomePage.jsx`
- [Navigation](https://github.com/davidakerlind/harpaviljongen/blob/main/src/components/NavBar/NavBar.jsx): `src/components/NavBar/NavBar.jsx`

### Restaurant content

- [Menu page](https://github.com/davidakerlind/harpaviljongen/blob/main/src/pages/MenuPage/MenuPage.jsx): `src/pages/MenuPage/MenuPage.jsx`
- [Chambre page](https://github.com/davidakerlind/harpaviljongen/blob/main/src/pages/ChambrePage/ChambrePage.jsx): `src/pages/ChambrePage/ChambrePage.jsx`
- [Gallery page](https://github.com/davidakerlind/harpaviljongen/blob/main/src/pages/GalleryPage/GalleryPage.jsx): `src/pages/GalleryPage/GalleryPage.jsx`
- [Events page](https://github.com/davidakerlind/harpaviljongen/blob/main/src/pages/EventsPage/EventsPage.jsx): `src/pages/EventsPage/EventsPage.jsx`
- [Event details](https://github.com/davidakerlind/harpaviljongen/blob/main/src/pages/SingleEventPage/SingleEventPage.jsx): `src/pages/SingleEventPage/SingleEventPage.jsx`
- [Wine list page](https://github.com/davidakerlind/harpaviljongen/blob/main/src/pages/WineListPage/WineListPage.jsx): `src/pages/WineListPage/WineListPage.jsx`
- [Event calendar](https://github.com/davidakerlind/harpaviljongen/blob/main/src/components/EventCalendar/EventCalendar.jsx): `src/components/EventCalendar/EventCalendar.jsx`
- [Hero slideshow](https://github.com/davidakerlind/harpaviljongen/blob/main/src/components/HeroSection/useHero.js): `src/components/HeroSection/useHero.js`

### Data and settings

- [Site settings](https://github.com/davidakerlind/harpaviljongen/blob/main/src/API/useSiteConfig.js): `src/API/useSiteConfig.js`
- [Events API](https://github.com/davidakerlind/harpaviljongen/blob/main/src/API/fetchAllEvents.js): `src/API/fetchAllEvents.js`
- [Event detail API](https://github.com/davidakerlind/harpaviljongen/blob/main/src/API/fetchEventById.js): `src/API/fetchEventById.js`
- [Menu API](https://github.com/davidakerlind/harpaviljongen/blob/main/src/API/fetchMenuById.js): `src/API/fetchMenuById.js`
- [Opening hours API](https://github.com/davidakerlind/harpaviljongen/blob/main/src/API/fetchOpeningHours.js): `src/API/fetchOpeningHours.js`
- [Wine list API](https://github.com/davidakerlind/harpaviljongen/blob/main/src/API/fetchWineList.js): `src/API/fetchWineList.js`
- [Browser cache](https://github.com/davidakerlind/harpaviljongen/blob/main/src/API/useSiteConfig.js): `src/API/useSiteConfig.js`

### External services

- **Restaurant REST API**
- **Admin service**
- **Booking service**
- **Analytics endpoint**

### Other components

- **Visitor**

## Connections

- Visitor → Router: opens site
- Router → Home page: routes to
- Router → Menu page: routes to
- Router → Chambre page: routes to
- Router → Gallery page: routes to
- Router → Events page: routes to
- Router → Event details: routes to
- Router → Wine list page: routes to
- Home page → Site settings: reads settings
- Navigation → Site settings: reads settings
- Hero slideshow → Site settings: reads hero config
- Site settings → Browser cache: reads and writes
- Site settings → Restaurant REST API: fetches config
- Restaurant REST API → Site settings: returns config
- Admin service → Restaurant REST API: publishes settings
- Event calendar → Events API: fetches events
- Events API → Restaurant REST API: requests events
- Event details → Event detail API: fetches event
- Event detail API → Restaurant REST API: requests event
- Menu page → Menu API: fetches menu
- Menu API → Restaurant REST API: requests menu
- Wine list page → Wine list API: fetches wine list
- Wine list API → Restaurant REST API: requests wine list
- Opening hours API → Restaurant REST API: requests hours
- Navigation → Booking service: opens booking
- Router → Analytics endpoint: records page views
