# mstenius/vreminisc architecture

> Architecture diagram of the GitHub repository mstenius/vreminisc, 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/mstenius/vreminisc
- Repository: https://github.com/mstenius/vreminisc

## Overview

VReminisc is a static web-based 360° equirectangular photo viewer with desktop/mobile controls and optional WebXR. The main workflow loads configuration, discovers photos, lets the user choose one, loads its texture onto the panoramic scene, and renders it; browser controls and VR provide alternate ways to navigate and view it. Source excerpts show the viewer’s module wiring and several internal behaviors. Other capability links are included only where the README or source supports them; unsampled implementation details are not inferred.

Main entry points: [`js/viewer.js`](https://github.com/mstenius/vreminisc/blob/main/js/viewer.js) (Scene and renderer), [`js/config.js`](https://github.com/mstenius/vreminisc/blob/main/js/config.js) (App configuration), [`js/photo-loader.js`](https://github.com/mstenius/vreminisc/blob/main/js/photo-loader.js) (Photo discovery and loading), [`js/vr-menu.js`](https://github.com/mstenius/vreminisc/blob/main/js/vr-menu.js) (VR photo menu)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Viewer application"]
  node_viewer["Scene and renderer<br/>[viewer.js]"]
  node_config["App configuration<br/>[config.js]"]
  node_appsettings["Site settings<br/>[app.config.json]"]
  node_version["Version badge<br/>[version.js]"]
  node_versiondata["Version metadata<br/>[version.json]"]
end

subgraph group_media["Photo discovery and media"]
  node_photos["Photo discovery and loading<br/>[photo-loader.js]"]
  node_manifest["Photo manifest<br/>[photos.json]"]
  node_images["Panoramic images"]
end

subgraph group_controls["Viewing controls"]
  node_ui["Browser interface"]
  node_camera["Drag and zoom"]
  node_motion["Device motion look<br/>[motion-look.js]"]
  node_fullscreen["Fullscreen controls"]
end

subgraph group_vr["Immersive VR"]
  node_vrmenu["VR photo menu<br/>[vr-menu.js]"]
  node_xr["WebXR session<br/>[xr-manager.js]"]
end

node_visitor(("Viewer user"))
node_webserver["Static web server"]

node_visitor -->|"opens viewer"| node_viewer
node_viewer -->|"loads settings"| node_config
node_config -->|"fetches"| node_appsettings
node_viewer -->|"discovers photos"| node_photos
node_photos -->|"uses discovery"| node_config
node_config -->|"checks manifest"| node_manifest
node_config -->|"requests listing"| node_webserver
node_webserver -->|"serves media"| node_images
node_viewer -->|"creates interface"| node_ui
node_ui -->|"selects photo"| node_viewer
node_viewer -->|"loads selected photo"| node_photos
node_photos -->|"loads texture"| node_images
node_viewer -->|"creates controls"| node_camera
node_viewer -->|"creates motion look"| node_motion
node_motion -->|"sets view rotation"| node_camera
node_viewer -->|"creates fullscreen controls"| node_fullscreen
node_viewer -->|"creates VR menu"| node_vrmenu
node_vrmenu -->|"selects photo"| node_viewer
node_vrmenu -->|"ends session"| node_xr
node_viewer -->|"creates session manager"| node_xr
node_version -->|"fetches metadata"| node_versiondata

click node_viewer "https://github.com/mstenius/vreminisc/blob/main/js/viewer.js"
click node_config "https://github.com/mstenius/vreminisc/blob/main/js/config.js"
click node_appsettings "https://github.com/mstenius/vreminisc/blob/main/app.config.json"
click node_ui "https://github.com/mstenius/vreminisc/blob/main/js/browser-ui-manager.js"
click node_camera "https://github.com/mstenius/vreminisc/blob/main/js/camera-controller.js"
click node_motion "https://github.com/mstenius/vreminisc/blob/main/js/motion-look.js"
click node_fullscreen "https://github.com/mstenius/vreminisc/blob/main/js/fullscreen-manager.js"
click node_photos "https://github.com/mstenius/vreminisc/blob/main/js/photo-loader.js"
click node_manifest "https://github.com/mstenius/vreminisc/blob/main/media/textures/photos.json"
click node_images "https://github.com/mstenius/vreminisc/tree/main/media/textures"
click node_vrmenu "https://github.com/mstenius/vreminisc/blob/main/js/vr-menu.js"
click node_xr "https://github.com/mstenius/vreminisc/blob/main/js/xr-manager.js"
click node_version "https://github.com/mstenius/vreminisc/blob/main/js/version.js"
click node_versiondata "https://github.com/mstenius/vreminisc/blob/main/version.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_viewer,node_config,node_appsettings,node_version,node_versiondata,node_visitor toneBlue
class node_photos,node_manifest,node_images toneAmber
class node_ui,node_camera,node_motion,node_fullscreen,node_webserver toneMint
class node_vrmenu,node_xr toneRose
```

## Components

### Viewer application

- [Scene and renderer](https://github.com/mstenius/vreminisc/blob/main/js/viewer.js): `js/viewer.js`
- [App configuration](https://github.com/mstenius/vreminisc/blob/main/js/config.js): `js/config.js`
- [Site settings](https://github.com/mstenius/vreminisc/blob/main/app.config.json): `app.config.json`
- [Version badge](https://github.com/mstenius/vreminisc/blob/main/js/version.js): `js/version.js`
- [Version metadata](https://github.com/mstenius/vreminisc/blob/main/version.json): `version.json`

### Photo discovery and media

- [Photo discovery and loading](https://github.com/mstenius/vreminisc/blob/main/js/photo-loader.js): `js/photo-loader.js`
- [Photo manifest](https://github.com/mstenius/vreminisc/blob/main/media/textures/photos.json): `media/textures/photos.json`
- [Panoramic images](https://github.com/mstenius/vreminisc/tree/main/media/textures): `media/textures`

### Viewing controls

- [Browser interface](https://github.com/mstenius/vreminisc/blob/main/js/browser-ui-manager.js): `js/browser-ui-manager.js`
- [Drag and zoom](https://github.com/mstenius/vreminisc/blob/main/js/camera-controller.js): `js/camera-controller.js`
- [Device motion look](https://github.com/mstenius/vreminisc/blob/main/js/motion-look.js): `js/motion-look.js`
- [Fullscreen controls](https://github.com/mstenius/vreminisc/blob/main/js/fullscreen-manager.js): `js/fullscreen-manager.js`

### Immersive VR

- [VR photo menu](https://github.com/mstenius/vreminisc/blob/main/js/vr-menu.js): `js/vr-menu.js`
- [WebXR session](https://github.com/mstenius/vreminisc/blob/main/js/xr-manager.js): `js/xr-manager.js`

### Other components

- **Viewer user**
- **Static web server**

## Connections

- Viewer user → Scene and renderer: opens viewer (evidence: `README.md`)
- Scene and renderer → App configuration: loads settings (evidence: `js/viewer.js`)
- App configuration → Site settings: fetches (evidence: `js/config.js`)
- Scene and renderer → Photo discovery and loading: discovers photos (evidence: `js/viewer.js`)
- Photo discovery and loading → App configuration: uses discovery (evidence: `js/photo-loader.js`)
- App configuration → Photo manifest: checks manifest (evidence: `js/config.js`)
- App configuration → Static web server: requests listing (evidence: `js/config.js`)
- Static web server → Panoramic images: serves media (evidence: `README.md`)
- Scene and renderer → Browser interface: creates interface (evidence: `js/viewer.js`)
- Browser interface → Scene and renderer: selects photo (evidence: `js/viewer.js`)
- Scene and renderer → Photo discovery and loading: loads selected photo (evidence: `js/viewer.js`)
- Photo discovery and loading → Panoramic images: loads texture (evidence: `js/photo-loader.js`)
- Scene and renderer → Drag and zoom: creates controls (evidence: `js/viewer.js`)
- Scene and renderer → Device motion look: creates motion look (evidence: `js/viewer.js`)
- Device motion look → Drag and zoom: sets view rotation (evidence: `js/viewer.js`)
- Scene and renderer → Fullscreen controls: creates fullscreen controls (evidence: `js/viewer.js`)
- Scene and renderer → VR photo menu: creates VR menu (evidence: `js/viewer.js`)
- VR photo menu → Scene and renderer: selects photo (evidence: `js/viewer.js`)
- VR photo menu → WebXR session: ends session (evidence: `js/viewer.js`)
- Scene and renderer → WebXR session: creates session manager (evidence: `js/viewer.js`)
- Version badge → Version metadata: fetches metadata (evidence: `js/version.js`)
