# asendia/salmonfit architecture

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

- Interactive diagram: https://gitdiagram.com/asendia/salmonfit
- Repository: https://github.com/asendia/salmonfit

## Overview

Salmon Fit is a restaurant website whose main customer-facing purpose is to present a browsable food menu, with a separate status-history view for delivery listings. Menu content is paired with thumbnail and detail imagery; the README documents editing menu CSV and images, but the generation script is excluded as build tooling. The status page filters and paginates history from an external API. Some route implementations were not sampled, so their internal connections are intentionally omitted.

Main entry points: [`src/routes/status/+page.svelte`](https://github.com/asendia/salmonfit/blob/main/src/routes/status/%2Bpage.svelte) (Status history), [`src/lib/menuItems.ts`](https://github.com/asendia/salmonfit/blob/main/src/lib/menuItems.ts) (Menu enrichment), [`src/lib/components/Header.svelte`](https://github.com/asendia/salmonfit/blob/main/src/lib/components/Header.svelte) (Header), [`src/lib/components/Social.svelte`](https://github.com/asendia/salmonfit/blob/main/src/lib/components/Social.svelte) (Social links)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Site shell"]
  node_layout["App layout<br/>[+layout.svelte]"]
  node_home["Home page<br/>[+page.svelte]"]
end

subgraph group_menu["Food menu"]
  node_food_detail["Food detail<br/>[+page.svelte]"]
  node_menu_data["Menu data<br/>[menu.json]"]
  node_menu_items["Menu enrichment<br/>[menuItems.ts]"]
  node_thumb_map["Thumbnail images"]
  node_detail_map["Detail images"]
  node_url_hash["Slug helper<br/>[url.ts]"]
end

subgraph group_status["Listing status"]
  node_status_page["Status history<br/>[+page.svelte]"]
  node_status_api[("Status API")]
  node_listing_name["Listing name<br/>[ListingName.svelte]"]
  node_date_format["Date formatting<br/>[date.ts]"]
end

subgraph group_ui["Shared interface"]
  node_header["Header<br/>[Header.svelte]"]
  node_social["Social links<br/>[Social.svelte]"]
  node_theme["Theme switcher"]
  node_modal["Modal<br/>[Modal.svelte]"]
  node_footer["Footer<br/>[Footer.svelte]"]
  node_fonts["Fonts<br/>[Fonts.svelte]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_home
node_layout -->|"renders"| node_fonts
node_menu_items -->|"loads"| node_menu_data
node_menu_items -->|"attaches thumbnails"| node_thumb_map
node_menu_items -->|"attaches photos"| node_detail_map
node_menu_items -->|"creates keys"| node_url_hash
node_status_page -->|"fetches history"| node_status_api
node_status_page -->|"formats dates"| node_date_format
node_status_page -->|"renders"| node_header
node_status_page -->|"renders"| node_modal
node_status_page -->|"renders"| node_footer
node_status_page -->|"renders"| node_listing_name
node_header -->|"renders"| node_social
node_header -->|"renders"| node_theme
node_social -->|"renders"| node_modal
node_social -->|"fetches history"| node_status_api

click node_layout "https://github.com/asendia/salmonfit/blob/main/src/routes/%2Blayout.svelte"
click node_home "https://github.com/asendia/salmonfit/blob/main/src/routes/%2Bpage.svelte"
click node_food_detail "https://github.com/asendia/salmonfit/blob/main/src/routes/food/%5Bslug%5D/%2Bpage.svelte"
click node_menu_data "https://github.com/asendia/salmonfit/blob/main/src/lib/data/menu.json"
click node_menu_items "https://github.com/asendia/salmonfit/blob/main/src/lib/menuItems.ts"
click node_thumb_map "https://github.com/asendia/salmonfit/blob/main/src/lib/menuThumbnailPhotoMap.ts"
click node_detail_map "https://github.com/asendia/salmonfit/blob/main/src/lib/menuDetailPhotoMap.ts"
click node_url_hash "https://github.com/asendia/salmonfit/blob/main/src/lib/url.ts"
click node_status_page "https://github.com/asendia/salmonfit/blob/main/src/routes/status/%2Bpage.svelte"
click node_listing_name "https://github.com/asendia/salmonfit/blob/main/src/routes/status/ListingName.svelte"
click node_date_format "https://github.com/asendia/salmonfit/blob/main/src/lib/date.ts"
click node_header "https://github.com/asendia/salmonfit/blob/main/src/lib/components/Header.svelte"
click node_social "https://github.com/asendia/salmonfit/blob/main/src/lib/components/Social.svelte"
click node_theme "https://github.com/asendia/salmonfit/blob/main/src/lib/components/ThemeSwitcher.svelte"
click node_modal "https://github.com/asendia/salmonfit/blob/main/src/lib/components/Modal.svelte"
click node_footer "https://github.com/asendia/salmonfit/blob/main/src/lib/components/Footer.svelte"
click node_fonts "https://github.com/asendia/salmonfit/blob/main/src/lib/components/Fonts.svelte"

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_layout,node_home toneBlue
class node_food_detail,node_menu_data,node_menu_items,node_thumb_map,node_detail_map,node_url_hash toneAmber
class node_status_page,node_status_api,node_listing_name,node_date_format toneMint
class node_header,node_social,node_theme,node_modal,node_footer,node_fonts toneRose
class node_visitor toneIndigo
```

## Components

### Site shell

- [App layout](https://github.com/asendia/salmonfit/blob/main/src/routes/%2Blayout.svelte): `src/routes/+layout.svelte`
- [Home page](https://github.com/asendia/salmonfit/blob/main/src/routes/%2Bpage.svelte): `src/routes/+page.svelte`

### Food menu

- [Food detail](https://github.com/asendia/salmonfit/blob/main/src/routes/food/%5Bslug%5D/%2Bpage.svelte): `src/routes/food/[slug]/+page.svelte`
- [Menu data](https://github.com/asendia/salmonfit/blob/main/src/lib/data/menu.json): `src/lib/data/menu.json`
- [Menu enrichment](https://github.com/asendia/salmonfit/blob/main/src/lib/menuItems.ts): `src/lib/menuItems.ts`
- [Thumbnail images](https://github.com/asendia/salmonfit/blob/main/src/lib/menuThumbnailPhotoMap.ts): `src/lib/menuThumbnailPhotoMap.ts`
- [Detail images](https://github.com/asendia/salmonfit/blob/main/src/lib/menuDetailPhotoMap.ts): `src/lib/menuDetailPhotoMap.ts`
- [Slug helper](https://github.com/asendia/salmonfit/blob/main/src/lib/url.ts): `src/lib/url.ts`

### Listing status

- [Status history](https://github.com/asendia/salmonfit/blob/main/src/routes/status/%2Bpage.svelte): `src/routes/status/+page.svelte`
- **Status API**
- [Listing name](https://github.com/asendia/salmonfit/blob/main/src/routes/status/ListingName.svelte): `src/routes/status/ListingName.svelte`
- [Date formatting](https://github.com/asendia/salmonfit/blob/main/src/lib/date.ts): `src/lib/date.ts`

### Shared interface

- [Header](https://github.com/asendia/salmonfit/blob/main/src/lib/components/Header.svelte): `src/lib/components/Header.svelte`
- [Social links](https://github.com/asendia/salmonfit/blob/main/src/lib/components/Social.svelte): `src/lib/components/Social.svelte`
- [Theme switcher](https://github.com/asendia/salmonfit/blob/main/src/lib/components/ThemeSwitcher.svelte): `src/lib/components/ThemeSwitcher.svelte`
- [Modal](https://github.com/asendia/salmonfit/blob/main/src/lib/components/Modal.svelte): `src/lib/components/Modal.svelte`
- [Footer](https://github.com/asendia/salmonfit/blob/main/src/lib/components/Footer.svelte): `src/lib/components/Footer.svelte`
- [Fonts](https://github.com/asendia/salmonfit/blob/main/src/lib/components/Fonts.svelte): `src/lib/components/Fonts.svelte`

### Other components

- **Visitor**

## Connections

- Visitor → Home page: opens
- App layout → Fonts: renders (evidence: `src/routes/+layout.svelte`)
- Menu enrichment → Menu data: loads (evidence: `src/lib/menuItems.ts`)
- Menu enrichment → Thumbnail images: attaches thumbnails (evidence: `src/lib/menuItems.ts`)
- Menu enrichment → Detail images: attaches photos (evidence: `src/lib/menuItems.ts`)
- Menu enrichment → Slug helper: creates keys (evidence: `src/lib/menuItems.ts`)
- Status history → Status API: fetches history (evidence: `src/routes/status/+page.svelte`)
- Status history → Date formatting: formats dates (evidence: `src/routes/status/+page.svelte`)
- Status history → Header: renders (evidence: `src/routes/status/+page.svelte`)
- Status history → Modal: renders (evidence: `src/routes/status/+page.svelte`)
- Status history → Footer: renders (evidence: `src/routes/status/+page.svelte`)
- Status history → Listing name: renders (evidence: `src/routes/status/+page.svelte`)
- Header → Social links: renders (evidence: `src/lib/components/Header.svelte`)
- Header → Theme switcher: renders (evidence: `src/lib/components/Header.svelte`)
- Social links → Modal: renders (evidence: `src/lib/components/Social.svelte`)
- Social links → Status API: fetches history (evidence: `src/lib/components/Social.svelte`)
