# itsbabp/portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/itsbabp/portfolio
- Repository: https://github.com/itsbabp/portfolio

## Overview

Jacob’s Photos is a static photography portfolio. Visitors browse the home page’s profile, project cards and gallery, then open a project page to view its photos; photo folders can be discovered through GitHub’s Contents API. The site’s content and settings are maintained in `content.js`, with a site editor also present in the tree. The graph includes documented capabilities such as EXIF display, lightbox navigation and transitions. Source excerpts show the main renderers and shared runtime; unsampled page wiring is included only where the README documents it.

Main entry points: [`project.js`](https://github.com/itsbabp/portfolio/blob/master/project.js) (Project renderer), [`script.js`](https://github.com/itsbabp/portfolio/blob/master/script.js) (Home renderer), [`common.js`](https://github.com/itsbabp/portfolio/blob/master/common.js) (Shared runtime), [`index.html`](https://github.com/itsbabp/portfolio/blob/master/index.html) (Home page shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_content["Content editing"]
  node_editor["Site editor<br/>[site-editor.html]"]
  node_contentdata["Site content<br/>[content.js]"]
end

subgraph group_home["Home portfolio"]
  node_homepage["Home page shell<br/>[index.html]"]
  node_homerender["Home renderer<br/>[script.js]"]
  node_galleryphotos[("Gallery photos")]
end

subgraph group_projects["Project galleries"]
  node_projectpages["Project page shells<br/>[index.html]"]
  node_projectrenderer["Project renderer<br/>[project.js]"]
  node_projectphotos[("Project photos")]
end

subgraph group_shared["Shared presentation"]
  node_sharedruntime["Shared runtime<br/>[common.js]"]
  node_lightbox["Photo lightbox<br/>[common.js]"]
  node_exif["EXIF reader<br/>[common.js]"]
  node_styling["Site styling<br/>[style.css]"]
end

node_visitor(("Visitor"))
node_githubapi["GitHub Contents API"]

node_visitor -->|"opens"| node_homepage
node_visitor -->|"opens"| node_projectpages
node_editor -->|"edits"| node_contentdata
node_homepage -->|"loads renderer"| node_homerender
node_projectpages -->|"loads renderer"| node_projectrenderer
node_homerender -->|"renders from"| node_contentdata
node_projectrenderer -->|"renders from"| node_contentdata
node_homerender -->|"displays"| node_galleryphotos
node_projectrenderer -->|"discovers photos"| node_projectphotos
node_projectrenderer -->|"requests listing"| node_githubapi
node_homerender -->|"uses helpers"| node_sharedruntime
node_projectrenderer -->|"uses helpers"| node_sharedruntime
node_sharedruntime -->|"provides navigation"| node_lightbox
node_sharedruntime -->|"provides reading"| node_exif
node_homepage -.->|"styled by"| node_styling
node_projectpages -.->|"styled by"| node_styling

click node_editor "https://github.com/itsbabp/portfolio/blob/master/site-editor.html"
click node_contentdata "https://github.com/itsbabp/portfolio/blob/master/content.js"
click node_homepage "https://github.com/itsbabp/portfolio/blob/master/index.html"
click node_homerender "https://github.com/itsbabp/portfolio/blob/master/script.js"
click node_galleryphotos "https://github.com/itsbabp/portfolio/tree/master/images/gallery"
click node_projectpages "https://github.com/itsbabp/portfolio/blob/master/japan-2025/index.html"
click node_projectrenderer "https://github.com/itsbabp/portfolio/blob/master/project.js"
click node_projectphotos "https://github.com/itsbabp/portfolio/tree/master/images/projects"
click node_sharedruntime "https://github.com/itsbabp/portfolio/blob/master/common.js"
click node_lightbox "https://github.com/itsbabp/portfolio/blob/master/common.js"
click node_exif "https://github.com/itsbabp/portfolio/blob/master/common.js"
click node_styling "https://github.com/itsbabp/portfolio/blob/master/style.css"

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_editor,node_contentdata toneBlue
class node_homepage,node_homerender,node_galleryphotos toneAmber
class node_projectpages,node_projectrenderer,node_projectphotos,node_githubapi toneMint
class node_sharedruntime,node_lightbox,node_exif,node_styling toneRose
class node_visitor toneIndigo
```

## Components

### Content editing

- [Site editor](https://github.com/itsbabp/portfolio/blob/master/site-editor.html): `site-editor.html`
- [Site content](https://github.com/itsbabp/portfolio/blob/master/content.js): `content.js`

### Home portfolio

- [Home page shell](https://github.com/itsbabp/portfolio/blob/master/index.html): `index.html`
- [Home renderer](https://github.com/itsbabp/portfolio/blob/master/script.js): `script.js`
- [Gallery photos](https://github.com/itsbabp/portfolio/tree/master/images/gallery): `images/gallery`

### Project galleries

- [Project page shells](https://github.com/itsbabp/portfolio/blob/master/japan-2025/index.html): `japan-2025/index.html`
- [Project renderer](https://github.com/itsbabp/portfolio/blob/master/project.js): `project.js`
- [Project photos](https://github.com/itsbabp/portfolio/tree/master/images/projects): `images/projects`

### Shared presentation

- [Shared runtime](https://github.com/itsbabp/portfolio/blob/master/common.js): `common.js`
- [Photo lightbox](https://github.com/itsbabp/portfolio/blob/master/common.js): `common.js`
- [EXIF reader](https://github.com/itsbabp/portfolio/blob/master/common.js): `common.js`
- [Site styling](https://github.com/itsbabp/portfolio/blob/master/style.css): `style.css`

### Other components

- **Visitor**
- **GitHub Contents API**

## Connections

- Visitor → Home page shell: opens (evidence: `README.md`)
- Visitor → Project page shells: opens (evidence: `README.md`)
- Site editor → Site content: edits (evidence: `content.js`)
- Home page shell → Home renderer: loads renderer (evidence: `README.md`)
- Project page shells → Project renderer: loads renderer (evidence: `README.md`)
- Home renderer → Site content: renders from (evidence: `script.js`)
- Project renderer → Site content: renders from (evidence: `project.js`)
- Home renderer → Gallery photos: displays (evidence: `script.js`)
- Project renderer → Project photos: discovers photos (evidence: `project.js`)
- Project renderer → GitHub Contents API: requests listing (evidence: `project.js`)
- Home renderer → Shared runtime: uses helpers (evidence: `script.js`)
- Project renderer → Shared runtime: uses helpers (evidence: `project.js`)
- Shared runtime → Photo lightbox: provides navigation (evidence: `common.js`)
- Shared runtime → EXIF reader: provides reading (evidence: `common.js`)
- Home page shell → Site styling: styled by
- Project page shells → Site styling: styled by
