# eddyvs/static-photography-website architecture

> Architecture diagram of the GitHub repository eddyvs/static-photography-website, 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/eddyvs/static-photography-website
- Repository: https://github.com/eddyvs/static-photography-website

## Overview

This is a static photography portfolio with an Express server for serving the public site and a browser gallery implemented in JavaScript. The visible client workflow loads image metadata, builds album or photo grids, and opens a selected photo in an enlarged view with navigation and download links. The excerpts also show client-side search logic and a server-side POST search endpoint, but do not establish that they are connected. HTML and metadata file contents were not sampled, so their detailed wiring is omitted.

Main entry points: [`server.js`](https://github.com/eddyvs/static-photography-website/blob/main/server.js) (Express server), [`public/code.js`](https://github.com/eddyvs/static-photography-website/blob/main/public/code.js) (Gallery and search), [`public/index.html`](https://github.com/eddyvs/static-photography-website/blob/main/public/index.html) (Site pages), [`public/images.json`](https://github.com/eddyvs/static-photography-website/blob/main/public/images.json) (Image metadata)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_serving["Site serving"]
  node_express["Express server<br/>[server.js]"]
  node_site_pages["Site pages<br/>[index.html]"]
  node_search_endpoint["Search endpoint<br/>[server.js]"]
end

subgraph group_gallery["Photo gallery"]
  node_gallery_client["Gallery and search<br/>[code.js]"]
  node_photo_viewer["Photo viewer<br/>[code.js]"]
  node_image_catalog["Image metadata<br/>[images.json]"]
end

node_visitor(("Visitor"))

node_visitor -->|"requests site"| node_express
node_express -->|"serves root"| node_site_pages
node_express -->|"serves public files"| node_visitor
node_visitor -->|"posts search"| node_search_endpoint
node_gallery_client -->|"fetches metadata"| node_image_catalog
node_gallery_client -->|"opens selected photo"| node_photo_viewer

click node_express "https://github.com/eddyvs/static-photography-website/blob/main/server.js"
click node_site_pages "https://github.com/eddyvs/static-photography-website/blob/main/public/index.html"
click node_search_endpoint "https://github.com/eddyvs/static-photography-website/blob/main/server.js"
click node_gallery_client "https://github.com/eddyvs/static-photography-website/blob/main/public/code.js"
click node_photo_viewer "https://github.com/eddyvs/static-photography-website/blob/main/public/code.js"
click node_image_catalog "https://github.com/eddyvs/static-photography-website/blob/main/public/images.json"

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_express,node_site_pages,node_search_endpoint toneBlue
class node_gallery_client,node_photo_viewer,node_image_catalog toneAmber
class node_visitor toneIndigo
```

## Components

### Site serving

- [Express server](https://github.com/eddyvs/static-photography-website/blob/main/server.js): `server.js`
- [Site pages](https://github.com/eddyvs/static-photography-website/blob/main/public/index.html): `public/index.html`
- [Search endpoint](https://github.com/eddyvs/static-photography-website/blob/main/server.js): `server.js`

### Photo gallery

- [Gallery and search](https://github.com/eddyvs/static-photography-website/blob/main/public/code.js): `public/code.js`
- [Photo viewer](https://github.com/eddyvs/static-photography-website/blob/main/public/code.js): `public/code.js`
- [Image metadata](https://github.com/eddyvs/static-photography-website/blob/main/public/images.json): `public/images.json`

### Other components

- **Visitor**

## Connections

- Visitor → Express server: requests site (evidence: `server.js`)
- Express server → Site pages: serves root (evidence: `server.js`)
- Express server → Visitor: serves public files (evidence: `server.js`)
- Visitor → Search endpoint: posts search (evidence: `server.js`)
- Gallery and search → Image metadata: fetches metadata (evidence: `public/code.js`)
- Gallery and search → Photo viewer: opens selected photo (evidence: `public/code.js`)
