# hellagood11/myarmoryapp architecture

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

## Overview

MyArmoryApp is a browser-based armory and ammunition organizer with inventory CRUD backed by MongoDB, plus local ballistics, reloading-data, and review features. The main workflow is browsing and filtering inventory, submitting changes from the armory page to the Express API, and persisting records in MongoDB. The graph also preserves the separately documented calculator, CSV tables, and review workflows. Some page-to-script wiring and feature internals are not shown in the excerpts, so those details are represented only where README evidence supports them.

Main entry points: [`server.js`](https://github.com/hellagood11/myarmoryapp/blob/main/server.js) (Express server), [`public/script.js`](https://github.com/hellagood11/myarmoryapp/blob/main/public/script.js) (Reloading data browser), [`public/armory.html`](https://github.com/hellagood11/myarmoryapp/blob/main/public/armory.html) (Armory page), [`public/ballistics.html`](https://github.com/hellagood11/myarmoryapp/blob/main/public/ballistics.html) (Ballistics page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_express["Express server<br/>[server.js]"]
  node_home["Home page<br/>[index.html]"]
end

subgraph group_inventory["Inventory management"]
  node_armory["Armory page<br/>[armory.html]"]
  node_inventory_ui["Inventory UI<br/>[script.js]"]
  node_inventory_api["Inventory API<br/>[server.js]"]
  node_inventory_db[("Inventory collection")]
end

subgraph group_tools["Reference tools"]
  node_ballistics_page["Ballistics page<br/>[ballistics.html]"]
  node_ballistics_calc["Ballistics calculator<br/>[script.js]"]
  node_reloading_page["Reloading page<br/>[reloading.html]"]
  node_reloading_ui["Reloading data browser<br/>[script.js]"]
  node_pistol_csv["Pistol reloading data"]
  node_rifle_csv["Rifle reloading data<br/>[rifleReloading.csv]"]
end

subgraph group_reviews["Reviews"]
  node_reviews_page["Reviews page<br/>[reviews.html]"]
  node_reviews_ui["Reviews UI<br/>[script.js]"]
  node_reviews_api["Reviews API<br/>[server.js]"]
  node_reviews_db[("Reviews collection")]
end

node_visitor(("App visitor"))

node_visitor -->|"requests pages"| node_express
node_express -->|"serves static files"| node_home
node_express -->|"serves static files"| node_armory
node_express -->|"serves static files"| node_ballistics_page
node_express -->|"serves static files"| node_reloading_page
node_express -->|"serves static files"| node_reviews_page
node_visitor -->|"uses inventory"| node_armory
node_armory -->|"supports inventory"| node_inventory_ui
node_inventory_ui -->|"sends CRUD requests"| node_inventory_api
node_inventory_api -->|"reads and writes"| node_inventory_db
node_visitor -->|"uses calculator"| node_ballistics_page
node_ballistics_page -->|"calculates estimates"| node_ballistics_calc
node_visitor -->|"browses tables"| node_reloading_page
node_reloading_page -->|"filters data"| node_reloading_ui
node_reloading_ui -->|"loads CSV"| node_pistol_csv
node_reloading_ui -->|"loads CSV"| node_rifle_csv
node_visitor -->|"views and submits"| node_reviews_page
node_reviews_page -->|"handles reviews"| node_reviews_ui
node_reviews_ui -->|"loads and submits"| node_reviews_api
node_reviews_api -->|"reads and writes"| node_reviews_db

click node_express "https://github.com/hellagood11/myarmoryapp/blob/main/server.js"
click node_home "https://github.com/hellagood11/myarmoryapp/blob/main/public/index.html"
click node_armory "https://github.com/hellagood11/myarmoryapp/blob/main/public/armory.html"
click node_inventory_ui "https://github.com/hellagood11/myarmoryapp/blob/main/public/script.js"
click node_inventory_api "https://github.com/hellagood11/myarmoryapp/blob/main/server.js"
click node_ballistics_page "https://github.com/hellagood11/myarmoryapp/blob/main/public/ballistics.html"
click node_ballistics_calc "https://github.com/hellagood11/myarmoryapp/blob/main/public/script.js"
click node_reloading_page "https://github.com/hellagood11/myarmoryapp/blob/main/public/reloading.html"
click node_reloading_ui "https://github.com/hellagood11/myarmoryapp/blob/main/public/script.js"
click node_pistol_csv "https://github.com/hellagood11/myarmoryapp/blob/main/public/pistolReloading.csv"
click node_rifle_csv "https://github.com/hellagood11/myarmoryapp/blob/main/public/rifleReloading.csv"
click node_reviews_page "https://github.com/hellagood11/myarmoryapp/blob/main/public/reviews.html"
click node_reviews_ui "https://github.com/hellagood11/myarmoryapp/blob/main/public/script.js"
click node_reviews_api "https://github.com/hellagood11/myarmoryapp/blob/main/server.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_express,node_home toneBlue
class node_armory,node_inventory_ui,node_inventory_api,node_inventory_db toneAmber
class node_ballistics_page,node_ballistics_calc,node_reloading_page,node_reloading_ui,node_pistol_csv,node_rifle_csv toneMint
class node_reviews_page,node_reviews_ui,node_reviews_api,node_reviews_db toneRose
class node_visitor toneIndigo
```

## Components

### Web application

- [Express server](https://github.com/hellagood11/myarmoryapp/blob/main/server.js): `server.js`
- [Home page](https://github.com/hellagood11/myarmoryapp/blob/main/public/index.html): `public/index.html`

### Inventory management

- [Armory page](https://github.com/hellagood11/myarmoryapp/blob/main/public/armory.html): `public/armory.html`
- [Inventory UI](https://github.com/hellagood11/myarmoryapp/blob/main/public/script.js): `public/script.js`
- [Inventory API](https://github.com/hellagood11/myarmoryapp/blob/main/server.js): `server.js`
- **Inventory collection**

### Reference tools

- [Ballistics page](https://github.com/hellagood11/myarmoryapp/blob/main/public/ballistics.html): `public/ballistics.html`
- [Ballistics calculator](https://github.com/hellagood11/myarmoryapp/blob/main/public/script.js): `public/script.js`
- [Reloading page](https://github.com/hellagood11/myarmoryapp/blob/main/public/reloading.html): `public/reloading.html`
- [Reloading data browser](https://github.com/hellagood11/myarmoryapp/blob/main/public/script.js): `public/script.js`
- [Pistol reloading data](https://github.com/hellagood11/myarmoryapp/blob/main/public/pistolReloading.csv): `public/pistolReloading.csv`
- [Rifle reloading data](https://github.com/hellagood11/myarmoryapp/blob/main/public/rifleReloading.csv): `public/rifleReloading.csv`

### Reviews

- [Reviews page](https://github.com/hellagood11/myarmoryapp/blob/main/public/reviews.html): `public/reviews.html`
- [Reviews UI](https://github.com/hellagood11/myarmoryapp/blob/main/public/script.js): `public/script.js`
- [Reviews API](https://github.com/hellagood11/myarmoryapp/blob/main/server.js): `server.js`
- **Reviews collection**

### Other components

- **App visitor**

## Connections

- App visitor → Express server: requests pages (evidence: `README.md`)
- Express server → Home page: serves static files (evidence: `server.js`)
- Express server → Armory page: serves static files (evidence: `server.js`)
- Express server → Ballistics page: serves static files (evidence: `server.js`)
- Express server → Reloading page: serves static files (evidence: `server.js`)
- Express server → Reviews page: serves static files (evidence: `server.js`)
- App visitor → Armory page: uses inventory (evidence: `README.md`)
- Armory page → Inventory UI: supports inventory (evidence: `README.md`)
- Inventory UI → Inventory API: sends CRUD requests (evidence: `README.md`)
- Inventory API → Inventory collection: reads and writes (evidence: `server.js`)
- App visitor → Ballistics page: uses calculator (evidence: `README.md`)
- Ballistics page → Ballistics calculator: calculates estimates (evidence: `README.md`)
- App visitor → Reloading page: browses tables (evidence: `README.md`)
- Reloading page → Reloading data browser: filters data (evidence: `README.md`)
- Reloading data browser → Pistol reloading data: loads CSV (evidence: `public/script.js`)
- Reloading data browser → Rifle reloading data: loads CSV (evidence: `public/script.js`)
- App visitor → Reviews page: views and submits (evidence: `README.md`)
- Reviews page → Reviews UI: handles reviews (evidence: `README.md`)
- Reviews UI → Reviews API: loads and submits (evidence: `server.js`)
- Reviews API → Reviews collection: reads and writes (evidence: `server.js`)
