# gregtech87/pams-gui architecture

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

- Interactive diagram: https://gitdiagram.com/gregtech87/pams-gui
- Repository: https://github.com/gregtech87/pams-gui

## Overview

PAM is a browser-based personal asset manager. A signed-in user navigates to profile, map, assets, files, and notes; asset workflows create and edit item records, associate files, and manage purchase or off-site locations. The source excerpts show page-level calls and several API requests, but not the backend or all page implementations, so those connections are omitted where they cannot be verified. Leaflet is the map-rendering library; mapStuff also calls an external geocoding service.

Main entry points: [`javascript/application.js`](https://github.com/gregtech87/pams-gui/blob/master/javascript/application.js) (Application shell), [`javascript/mapStuff.js`](https://github.com/gregtech87/pams-gui/blob/master/javascript/mapStuff.js) (Map interface), [`javascript/itemDetailPageStuff.js`](https://github.com/gregtech87/pams-gui/blob/master/javascript/itemDetailPageStuff.js) (Item operations), [`javascript/editUserStuff.js`](https://github.com/gregtech87/pams-gui/blob/master/javascript/editUserStuff.js) (Profile operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Account access"]
  node_login["Sign in<br/>[login.js]"]
  node_signup["Sign up<br/>[signup.js]"]
end

subgraph group_workspace["Workspace navigation"]
  node_application["Application shell<br/>[application.js]"]
  node_profile["Profile editing<br/>[editPage.js]"]
  node_profiledata["Profile operations<br/>[editUserStuff.js]"]
  node_home["Home content<br/>[appStuff.js]"]
end

subgraph group_assets["Asset management"]
  node_assetpages["Asset pages<br/>[assetPage.js]"]
  node_assetforms["Asset creation<br/>[assetPageStuff.js]"]
  node_itemdetail["Item details<br/>[itemDetailPage.js]"]
  node_itemops["Item operations"]
end

subgraph group_support["Files and location"]
  node_files["File pages<br/>[filesPage.js]"]
  node_fileops["File operations<br/>[filesPageStuff.js]"]
  node_notes["Notes<br/>[notePage.js]"]
  node_map["Map interface<br/>[mapStuff.js]"]
  node_leaflet["Leaflet maps<br/>[leaflet-src.js]"]
end

node_visitor(("User"))
node_geocoder["Geocoding service"]
node_api["PAM API"]
node_fetchhelpers["Fetch helpers<br/>[fetches.js]"]

node_visitor -->|"signs in"| node_login
node_visitor -->|"registers"| node_signup
node_application -->|"opens profile"| node_profile
node_application -->|"opens map"| node_map
node_application -->|"opens assets"| node_assetpages
node_application -->|"opens files"| node_files
node_application -->|"opens notes"| node_notes
node_profile -->|"populates form"| node_profiledata
node_profiledata -->|"updates via"| node_fetchhelpers
node_profiledata -->|"requests profile"| node_api
node_assetpages -->|"creates asset"| node_assetforms
node_assetforms -->|"posts asset"| node_fetchhelpers
node_assetforms -->|"creates item"| node_api
node_itemdetail -->|"populates details"| node_itemops
node_itemops -->|"reads and updates"| node_api
node_itemops -->|"downloads images"| node_fileops
node_files -->|"loads files"| node_fileops
node_fileops -->|"uploads and downloads"| node_api
node_map -->|"updates locations"| node_itemops
node_map -->|"renders map"| node_leaflet
node_map -->|"looks up address"| node_geocoder

click node_login "https://github.com/gregtech87/pams-gui/blob/master/javascript/login.js"
click node_signup "https://github.com/gregtech87/pams-gui/blob/master/javascript/signup.js"
click node_application "https://github.com/gregtech87/pams-gui/blob/master/javascript/application.js"
click node_profile "https://github.com/gregtech87/pams-gui/blob/master/javascript/editPage.js"
click node_profiledata "https://github.com/gregtech87/pams-gui/blob/master/javascript/editUserStuff.js"
click node_home "https://github.com/gregtech87/pams-gui/blob/master/javascript/appStuff.js"
click node_assetpages "https://github.com/gregtech87/pams-gui/blob/master/javascript/assetPage.js"
click node_assetforms "https://github.com/gregtech87/pams-gui/blob/master/javascript/assetPageStuff.js"
click node_itemdetail "https://github.com/gregtech87/pams-gui/blob/master/javascript/itemDetailPage.js"
click node_itemops "https://github.com/gregtech87/pams-gui/blob/master/javascript/itemDetailPageStuff.js"
click node_files "https://github.com/gregtech87/pams-gui/blob/master/javascript/filesPage.js"
click node_fileops "https://github.com/gregtech87/pams-gui/blob/master/javascript/filesPageStuff.js"
click node_notes "https://github.com/gregtech87/pams-gui/blob/master/javascript/notePage.js"
click node_map "https://github.com/gregtech87/pams-gui/blob/master/javascript/mapStuff.js"
click node_leaflet "https://github.com/gregtech87/pams-gui/blob/master/leaflet/leaflet-src.js"
click node_fetchhelpers "https://github.com/gregtech87/pams-gui/blob/master/javascript/fetches.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_login,node_signup,node_visitor toneBlue
class node_application,node_profile,node_profiledata,node_home toneAmber
class node_assetpages,node_assetforms,node_itemdetail,node_itemops,node_api toneMint
class node_files,node_fileops,node_notes,node_map,node_leaflet toneRose
class node_geocoder toneIndigo
class node_fetchhelpers toneTeal
```

## Components

### Account access

- [Sign in](https://github.com/gregtech87/pams-gui/blob/master/javascript/login.js): `javascript/login.js`
- [Sign up](https://github.com/gregtech87/pams-gui/blob/master/javascript/signup.js): `javascript/signup.js`

### Workspace navigation

- [Application shell](https://github.com/gregtech87/pams-gui/blob/master/javascript/application.js): `javascript/application.js`
- [Profile editing](https://github.com/gregtech87/pams-gui/blob/master/javascript/editPage.js): `javascript/editPage.js`
- [Profile operations](https://github.com/gregtech87/pams-gui/blob/master/javascript/editUserStuff.js): `javascript/editUserStuff.js`
- [Home content](https://github.com/gregtech87/pams-gui/blob/master/javascript/appStuff.js): `javascript/appStuff.js`

### Asset management

- [Asset pages](https://github.com/gregtech87/pams-gui/blob/master/javascript/assetPage.js): `javascript/assetPage.js`
- [Asset creation](https://github.com/gregtech87/pams-gui/blob/master/javascript/assetPageStuff.js): `javascript/assetPageStuff.js`
- [Item details](https://github.com/gregtech87/pams-gui/blob/master/javascript/itemDetailPage.js): `javascript/itemDetailPage.js`
- [Item operations](https://github.com/gregtech87/pams-gui/blob/master/javascript/itemDetailPageStuff.js): `javascript/itemDetailPageStuff.js`

### Files and location

- [File pages](https://github.com/gregtech87/pams-gui/blob/master/javascript/filesPage.js): `javascript/filesPage.js`
- [File operations](https://github.com/gregtech87/pams-gui/blob/master/javascript/filesPageStuff.js): `javascript/filesPageStuff.js`
- [Notes](https://github.com/gregtech87/pams-gui/blob/master/javascript/notePage.js): `javascript/notePage.js`
- [Map interface](https://github.com/gregtech87/pams-gui/blob/master/javascript/mapStuff.js): `javascript/mapStuff.js`
- [Leaflet maps](https://github.com/gregtech87/pams-gui/blob/master/leaflet/leaflet-src.js): `leaflet/leaflet-src.js`

### Other components

- **User**
- **Geocoding service**
- **PAM API**
- [Fetch helpers](https://github.com/gregtech87/pams-gui/blob/master/javascript/fetches.js): `javascript/fetches.js`

## Connections

- User → Sign in: signs in
- User → Sign up: registers
- Application shell → Profile editing: opens profile (evidence: `javascript/application.js`)
- Application shell → Map interface: opens map (evidence: `javascript/application.js`)
- Application shell → Asset pages: opens assets (evidence: `javascript/application.js`)
- Application shell → File pages: opens files (evidence: `javascript/application.js`)
- Application shell → Notes: opens notes (evidence: `javascript/application.js`)
- Profile editing → Profile operations: populates form (evidence: `javascript/editPage.js`)
- Profile operations → Fetch helpers: updates via (evidence: `javascript/editUserStuff.js`)
- Profile operations → PAM API: requests profile (evidence: `javascript/editUserStuff.js`)
- Asset pages → Asset creation: creates asset (evidence: `javascript/assetPageStuff.js`)
- Asset creation → Fetch helpers: posts asset (evidence: `javascript/assetPageStuff.js`)
- Asset creation → PAM API: creates item (evidence: `javascript/assetPageStuff.js`)
- Item details → Item operations: populates details (evidence: `javascript/itemDetailPage.js`)
- Item operations → PAM API: reads and updates (evidence: `javascript/itemDetailPageStuff.js`)
- Item operations → File operations: downloads images (evidence: `javascript/itemDetailPageStuff.js`)
- File pages → File operations: loads files (evidence: `javascript/filesPageStuff.js`)
- File operations → PAM API: uploads and downloads (evidence: `javascript/filesPageStuff.js`)
- Map interface → Item operations: updates locations (evidence: `javascript/mapStuff.js`)
- Map interface → Leaflet maps: renders map (evidence: `javascript/mapStuff.js`)
- Map interface → Geocoding service: looks up address (evidence: `javascript/mapStuff.js`)
