# sharadwowevents/price-ladder architecture

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

- Interactive diagram: https://gitdiagram.com/sharadwowevents/price-ladder
- Repository: https://github.com/sharadwowevents/price-ladder

## Overview

Price Ladder is a team pricing application: users sign in, then browse price quotes; administrators manage users, pricing formulas, items, imports, and quote history. The React app routes users to these workflows, and a database adapter sends collection operations to an Express API backed by MongoDB. Formula calculations and quote generation are implemented in shared utilities and invoked by item administration. Source excerpts establish these connections; the README is empty, so no additional documented capabilities can be verified.

Main entry points: [`Frontend/src/App.jsx`](https://github.com/sharadwowevents/price-ladder/blob/main/Frontend/src/App.jsx) (App & Auth), [`Frontend/src/lib/db.js`](https://github.com/sharadwowevents/price-ladder/blob/main/Frontend/src/lib/db.js) (Database Adapter), [`Frontend/src/pages/PricesPage.jsx`](https://github.com/sharadwowevents/price-ladder/blob/main/Frontend/src/pages/PricesPage.jsx) (Price List), [`Frontend/src/pages/FormulaPage.jsx`](https://github.com/sharadwowevents/price-ladder/blob/main/Frontend/src/pages/FormulaPage.jsx) (Formula & Items)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_app["App &amp; Auth<br/>[App.jsx]"]
  node_users["User Management<br/>[UsersPage.jsx]"]
  node_ui["Shared UI<br/>[UI.jsx]"]
end

subgraph group_pricing["Pricing Workflows"]
  node_prices["Price List<br/>[PricesPage.jsx]"]
  node_formula["Formula &amp; Items<br/>[FormulaPage.jsx]"]
  node_utils["Pricing Utilities<br/>[utils.js]"]
end

subgraph group_data["Persistence"]
  node_db["Database Adapter<br/>[db.js]"]
  node_mongo[("MongoDB")]
end

subgraph group_backend["API Backend"]
  node_api["REST API<br/>[server.js]"]
end

node_user(("User"))

node_user -->|"signs in"| node_app
node_app -->|"renders"| node_prices
node_app -->|"renders admin"| node_users
node_app -->|"renders admin"| node_formula
node_app -->|"reads and writes"| node_db
node_prices -->|"reads quotes"| node_db
node_users -->|"manages users"| node_db
node_formula -->|"manages pricing data"| node_db
node_formula -->|"calculates quotes"| node_utils
node_prices -->|"formats prices"| node_utils
node_formula -->|"renders pricing UI"| node_ui
node_prices -->|"renders discounts"| node_ui
node_users -->|"uses dialogs"| node_ui
node_ui -->|"calculates margin"| node_utils
node_db -->|"sends API requests"| node_api
node_api -->|"reads and writes"| node_mongo

click node_app "https://github.com/sharadwowevents/price-ladder/blob/main/Frontend/src/App.jsx"
click node_prices "https://github.com/sharadwowevents/price-ladder/blob/main/Frontend/src/pages/PricesPage.jsx"
click node_users "https://github.com/sharadwowevents/price-ladder/blob/main/Frontend/src/pages/UsersPage.jsx"
click node_formula "https://github.com/sharadwowevents/price-ladder/blob/main/Frontend/src/pages/FormulaPage.jsx"
click node_utils "https://github.com/sharadwowevents/price-ladder/blob/main/Frontend/src/lib/utils.js"
click node_ui "https://github.com/sharadwowevents/price-ladder/blob/main/Frontend/src/components/UI.jsx"
click node_db "https://github.com/sharadwowevents/price-ladder/blob/main/Frontend/src/lib/db.js"
click node_api "https://github.com/sharadwowevents/price-ladder/blob/main/Backend/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_app,node_users,node_ui,node_user toneBlue
class node_prices,node_formula,node_utils toneAmber
class node_db,node_mongo toneMint
class node_api toneRose
```

## Components

### Application

- [App & Auth](https://github.com/sharadwowevents/price-ladder/blob/main/Frontend/src/App.jsx): `Frontend/src/App.jsx`
- [User Management](https://github.com/sharadwowevents/price-ladder/blob/main/Frontend/src/pages/UsersPage.jsx): `Frontend/src/pages/UsersPage.jsx`
- [Shared UI](https://github.com/sharadwowevents/price-ladder/blob/main/Frontend/src/components/UI.jsx): `Frontend/src/components/UI.jsx`

### Pricing Workflows

- [Price List](https://github.com/sharadwowevents/price-ladder/blob/main/Frontend/src/pages/PricesPage.jsx): `Frontend/src/pages/PricesPage.jsx`
- [Formula & Items](https://github.com/sharadwowevents/price-ladder/blob/main/Frontend/src/pages/FormulaPage.jsx): `Frontend/src/pages/FormulaPage.jsx`
- [Pricing Utilities](https://github.com/sharadwowevents/price-ladder/blob/main/Frontend/src/lib/utils.js): `Frontend/src/lib/utils.js`

### Persistence

- [Database Adapter](https://github.com/sharadwowevents/price-ladder/blob/main/Frontend/src/lib/db.js): `Frontend/src/lib/db.js`
- **MongoDB**

### API Backend

- [REST API](https://github.com/sharadwowevents/price-ladder/blob/main/Backend/server.js): `Backend/server.js`

### Other components

- **User**

## Connections

- User → App & Auth: signs in (evidence: `Frontend/src/App.jsx`)
- App & Auth → Price List: renders (evidence: `Frontend/src/App.jsx`)
- App & Auth → User Management: renders admin (evidence: `Frontend/src/App.jsx`)
- App & Auth → Formula & Items: renders admin (evidence: `Frontend/src/App.jsx`)
- App & Auth → Database Adapter: reads and writes (evidence: `Frontend/src/App.jsx`)
- Price List → Database Adapter: reads quotes (evidence: `Frontend/src/pages/PricesPage.jsx`)
- User Management → Database Adapter: manages users (evidence: `Frontend/src/pages/UsersPage.jsx`)
- Formula & Items → Database Adapter: manages pricing data (evidence: `Frontend/src/pages/FormulaPage.jsx`)
- Formula & Items → Pricing Utilities: calculates quotes (evidence: `Frontend/src/pages/FormulaPage.jsx`)
- Price List → Pricing Utilities: formats prices (evidence: `Frontend/src/pages/PricesPage.jsx`)
- Formula & Items → Shared UI: renders pricing UI (evidence: `Frontend/src/pages/FormulaPage.jsx`)
- Price List → Shared UI: renders discounts (evidence: `Frontend/src/pages/PricesPage.jsx`)
- User Management → Shared UI: uses dialogs (evidence: `Frontend/src/pages/UsersPage.jsx`)
- Shared UI → Pricing Utilities: calculates margin (evidence: `Frontend/src/components/UI.jsx`)
- Database Adapter → REST API: sends API requests (evidence: `Frontend/src/lib/db.js`)
- REST API → MongoDB: reads and writes (evidence: `Backend/server.js`)
