# raghavdixit-2006/dbms-project architecture

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

- Interactive diagram: https://gitdiagram.com/raghavdixit-2006/dbms-project
- Repository: https://github.com/raghavdixit-2006/dbms-project

## Overview

Stellar Soles is a shoe storefront backed by an Express API and MySQL. A shopper browses products, registers or logs in, proceeds through checkout and payment, and can review orders or request exchanges; visitors can also subscribe to the newsletter. The server serves the public pages and mounts API route modules, which use a shared database pool. The README documents additional schema capabilities, including views, stored procedures, and triggers. Some frontend and SQL implementation details were not excerpted, so those connections are shown only where documented.

Main entry points: [`Backend Conn/server.js`](https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/server.js) (Express server), [`Backend Conn/db.js`](https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/db.js) (MySQL pool), [`Backend Conn/routes/orders.js`](https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/routes/orders.js) (Order API), [`Backend Conn/routes/exchanges.js`](https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/routes/exchanges.js) (Exchange API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_web["Web pages<br/>[index.html]"]
  node_catalog["Product catalog<br/>[store.js]"]
  node_cart["Cart &amp; checkout<br/>[checkout.js]"]
  node_payment["Payment<br/>[payment.js]"]
  node_newsletterform["Newsletter form<br/>[index.html]"]
end

subgraph group_identity["Account"]
  node_authui["Login &amp; signup<br/>[script.js]"]
  node_profile["Profile history<br/>[profile.js]"]
end

subgraph group_commerce["Orders &amp; Exchanges"]
  node_orderapi["Order API<br/>[orders.js]"]
  node_exchangeui["Exchange request<br/>[exchange.js]"]
  node_exchangeapi["Exchange API<br/>[exchanges.js]"]
end

subgraph group_backend["API &amp; Data"]
  node_server["Express server<br/>[server.js]"]
  node_authapi["Auth API<br/>[auth.js]"]
  node_productapi["Product API<br/>[products.js]"]
  node_newsletterapi["Newsletter API<br/>[newsletter.js]"]
  node_pool["MySQL pool<br/>[db.js]"]
  node_mysql[("MySQL database")]
  node_schema["Schema &amp; routines<br/>[init.sql]"]
end

node_shopper(("Shopper"))

node_shopper -->|"browses"| node_web
node_web -->|"loads pages"| node_server
node_shopper -->|"browses"| node_catalog
node_catalog -->|"fetches products"| node_productapi
node_shopper -->|"signs in"| node_authui
node_authui -->|"posts credentials"| node_authapi
node_shopper -->|"selects items"| node_cart
node_cart -.->|"proceeds to payment"| node_payment
node_payment -->|"submits order"| node_orderapi
node_profile -->|"loads order history"| node_orderapi
node_profile -->|"loads exchanges"| node_exchangeapi
node_shopper -->|"requests exchange"| node_exchangeui
node_exchangeui -.->|"submits request"| node_exchangeapi
node_shopper -->|"subscribes"| node_newsletterform
node_newsletterform -->|"posts email"| node_newsletterapi
node_server -->|"mounts routes"| node_authapi
node_server -->|"mounts routes"| node_productapi
node_server -->|"mounts routes"| node_orderapi
node_server -->|"mounts routes"| node_exchangeapi
node_server -->|"mounts routes"| node_newsletterapi
node_authapi -->|"queries"| node_pool
node_productapi -->|"queries"| node_pool
node_orderapi -->|"queries"| node_pool
node_exchangeapi -->|"queries"| node_pool
node_newsletterapi -->|"queries"| node_pool
node_pool -->|"connects to"| node_mysql
node_schema -->|"defines schema"| node_mysql

click node_web "https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/public/index.html"
click node_catalog "https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/public/store.js"
click node_cart "https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/public/checkout.js"
click node_payment "https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/public/payment.js"
click node_newsletterform "https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/public/index.html"
click node_authui "https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/public/script.js"
click node_profile "https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/public/profile.js"
click node_orderapi "https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/routes/orders.js"
click node_exchangeui "https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/public/exchange.js"
click node_exchangeapi "https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/routes/exchanges.js"
click node_server "https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/server.js"
click node_authapi "https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/routes/auth.js"
click node_productapi "https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/routes/products.js"
click node_newsletterapi "https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/routes/newsletter.js"
click node_pool "https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/db.js"
click node_schema "https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/sql/init.sql"

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_web,node_catalog,node_cart,node_payment,node_newsletterform toneBlue
class node_authui,node_profile toneAmber
class node_orderapi,node_exchangeui,node_exchangeapi toneMint
class node_server,node_authapi,node_productapi,node_newsletterapi,node_pool,node_mysql,node_schema toneRose
class node_shopper toneIndigo
```

## Components

### Storefront

- [Web pages](https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/public/index.html): `Backend Conn/public/index.html`
- [Product catalog](https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/public/store.js): `Backend Conn/public/store.js`
- [Cart & checkout](https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/public/checkout.js): `Backend Conn/public/checkout.js`
- [Payment](https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/public/payment.js): `Backend Conn/public/payment.js`
- [Newsletter form](https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/public/index.html): `Backend Conn/public/index.html`

### Account

- [Login & signup](https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/public/script.js): `Backend Conn/public/script.js`
- [Profile history](https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/public/profile.js): `Backend Conn/public/profile.js`

### Orders & Exchanges

- [Order API](https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/routes/orders.js): `Backend Conn/routes/orders.js`
- [Exchange request](https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/public/exchange.js): `Backend Conn/public/exchange.js`
- [Exchange API](https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/routes/exchanges.js): `Backend Conn/routes/exchanges.js`

### API & Data

- [Express server](https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/server.js): `Backend Conn/server.js`
- [Auth API](https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/routes/auth.js): `Backend Conn/routes/auth.js`
- [Product API](https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/routes/products.js): `Backend Conn/routes/products.js`
- [Newsletter API](https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/routes/newsletter.js): `Backend Conn/routes/newsletter.js`
- [MySQL pool](https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/db.js): `Backend Conn/db.js`
- **MySQL database**
- [Schema & routines](https://github.com/raghavdixit-2006/dbms-project/blob/main/Backend%20Conn/sql/init.sql): `Backend Conn/sql/init.sql`

### Other components

- **Shopper**

## Connections

- Shopper → Web pages: browses (evidence: `README.md`)
- Web pages → Express server: loads pages (evidence: `Backend Conn/server.js`)
- Shopper → Product catalog: browses (evidence: `README.md`)
- Product catalog → Product API: fetches products (evidence: `README.md`)
- Shopper → Login & signup: signs in (evidence: `Backend Conn/public/script.js`)
- Login & signup → Auth API: posts credentials (evidence: `Backend Conn/public/script.js`)
- Shopper → Cart & checkout: selects items (evidence: `README.md`)
- Cart & checkout → Payment: proceeds to payment
- Payment → Order API: submits order (evidence: `README.md`)
- Profile history → Order API: loads order history (evidence: `Backend Conn/public/profile.js`)
- Profile history → Exchange API: loads exchanges (evidence: `Backend Conn/public/profile.js`)
- Shopper → Exchange request: requests exchange
- Exchange request → Exchange API: submits request
- Shopper → Newsletter form: subscribes (evidence: `README.md`)
- Newsletter form → Newsletter API: posts email (evidence: `README.md`)
- Express server → Auth API: mounts routes (evidence: `Backend Conn/server.js`)
- Express server → Product API: mounts routes (evidence: `Backend Conn/server.js`)
- Express server → Order API: mounts routes (evidence: `Backend Conn/server.js`)
- Express server → Exchange API: mounts routes (evidence: `Backend Conn/server.js`)
- Express server → Newsletter API: mounts routes (evidence: `Backend Conn/server.js`)
- Auth API → MySQL pool: queries (evidence: `Backend Conn/routes/auth.js`)
- Product API → MySQL pool: queries (evidence: `Backend Conn/routes/products.js`)
- Order API → MySQL pool: queries (evidence: `Backend Conn/routes/orders.js`)
- Exchange API → MySQL pool: queries (evidence: `Backend Conn/routes/exchanges.js`)
- Newsletter API → MySQL pool: queries (evidence: `Backend Conn/routes/newsletter.js`)
- MySQL pool → MySQL database: connects to (evidence: `Backend Conn/db.js`)
- Schema & routines → MySQL database: defines schema (evidence: `README.md`)
