# divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2 architecture

> Architecture diagram of the GitHub repository divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2
- Repository: https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2

## Overview

This is a full-stack e-commerce application: shoppers discover products, inspect details and reviews, manage a cart, check out, and track orders; administrators manage catalog data, orders, and dashboard settings. The React app provides storefront, account, and admin experiences, while the Express server mounts API route modules and connects to MongoDB. The sampled server entry point establishes route mounting and database connection, and sampled auth code shows user persistence and JWT-based login. Other domain wiring is inferred only at the subsystem level from the tree; unsampled calls are not drawn.

Main entry points: [`server/app.js`](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/app.js) (Express API), [`server/routes/auth.js`](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/routes/auth.js) (Auth routes), [`client/src/App.js`](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/client/src/App.js) (React app), [`server/controller/auth.js`](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/controller/auth.js) (Auth controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shop["Storefront"]
  node_app["React app<br/>[App.js]"]
  node_routes["Page routes<br/>[index.js]"]
  node_catalog["Browse catalog"]
  node_details["Product details"]
  node_wishlist["Wishlist"]
  node_cart["Cart interface"]
  node_checkout["Checkout and orders"]
end

subgraph group_account["Accounts"]
  node_authui["Login and signup"]
  node_userdashboard["User dashboard"]
end

subgraph group_admin["Administration"]
  node_adminui["Admin portal"]
  node_adminproducts["Product management"]
  node_admincategories["Category management"]
  node_adminorders["Order management"]
  node_admindashboard["Admin dashboard"]
end

subgraph group_backend["API and data"]
  node_server["Express API<br/>[app.js]"]
  node_authroutes["Auth routes<br/>[auth.js]"]
  node_authcontroller["Auth controller<br/>[auth.js]"]
  node_authmiddleware["Auth middleware<br/>[auth.js]"]
  node_users[("User records<br/>[users.js]")]
  node_categoryapi["Category API<br/>[categories.js]"]
  node_productapi["Product API<br/>[products.js]"]
  node_orderapi["Order API<br/>[orders.js]"]
  node_customizeapi["Customization API<br/>[customize.js]"]
  node_paymentapi["Payment API<br/>[braintree.js]"]
  node_mongo[("MongoDB<br/>[db.js]")]
end

node_shopper(("Shopper"))
node_braintree{{"Braintree"}}

node_shopper -->|"uses"| node_app
node_app -->|"renders"| node_routes
node_server -->|"mounts"| node_authroutes
node_server -->|"mounts"| node_categoryapi
node_server -->|"mounts"| node_productapi
node_server -->|"mounts"| node_orderapi
node_server -->|"mounts"| node_customizeapi
node_server -->|"mounts"| node_paymentapi
node_authroutes -->|"dispatches"| node_authcontroller
node_authroutes -->|"checks access"| node_authmiddleware
node_authcontroller -->|"reads and writes"| node_users
node_server -->|"connects"| node_mongo
node_paymentapi -.->|"integrates"| node_braintree

click node_app "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/client/src/App.js"
click node_routes "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/client/src/components/index.js"
click node_catalog "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/shop/home"
click node_details "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/shop/productDetails"
click node_wishlist "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/shop/wishlist"
click node_cart "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/shop/partials"
click node_checkout "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/shop/order"
click node_authui "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/shop/auth"
click node_userdashboard "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/shop/dashboardUser"
click node_adminui "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/admin"
click node_adminproducts "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/admin/products"
click node_admincategories "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/admin/categories"
click node_adminorders "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/admin/orders"
click node_admindashboard "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/admin/dashboardAdmin"
click node_server "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/app.js"
click node_authroutes "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/routes/auth.js"
click node_authcontroller "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/controller/auth.js"
click node_authmiddleware "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/middleware/auth.js"
click node_users "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/models/users.js"
click node_categoryapi "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/routes/categories.js"
click node_productapi "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/routes/products.js"
click node_orderapi "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/routes/orders.js"
click node_customizeapi "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/routes/customize.js"
click node_paymentapi "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/routes/braintree.js"
click node_mongo "https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/config/db.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_routes,node_catalog,node_details,node_wishlist,node_cart,node_checkout toneBlue
class node_authui,node_userdashboard toneAmber
class node_adminui,node_adminproducts,node_admincategories,node_adminorders,node_admindashboard toneMint
class node_server,node_authroutes,node_authcontroller,node_authmiddleware,node_users,node_categoryapi,node_productapi,node_orderapi,node_customizeapi,node_paymentapi,node_mongo toneRose
class node_shopper,node_braintree toneIndigo
```

## Components

### Storefront

- [React app](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/client/src/App.js): `client/src/App.js`
- [Page routes](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/client/src/components/index.js): `client/src/components/index.js`
- [Browse catalog](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/shop/home): `client/src/components/shop/home`
- [Product details](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/shop/productDetails): `client/src/components/shop/productDetails`
- [Wishlist](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/shop/wishlist): `client/src/components/shop/wishlist`
- [Cart interface](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/shop/partials): `client/src/components/shop/partials`
- [Checkout and orders](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/shop/order): `client/src/components/shop/order`

### Accounts

- [Login and signup](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/shop/auth): `client/src/components/shop/auth`
- [User dashboard](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/shop/dashboardUser): `client/src/components/shop/dashboardUser`

### Administration

- [Admin portal](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/admin): `client/src/components/admin`
- [Product management](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/admin/products): `client/src/components/admin/products`
- [Category management](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/admin/categories): `client/src/components/admin/categories`
- [Order management](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/admin/orders): `client/src/components/admin/orders`
- [Admin dashboard](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/tree/main/client/src/components/admin/dashboardAdmin): `client/src/components/admin/dashboardAdmin`

### API and data

- [Express API](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/app.js): `server/app.js`
- [Auth routes](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/routes/auth.js): `server/routes/auth.js`
- [Auth controller](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/controller/auth.js): `server/controller/auth.js`
- [Auth middleware](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/middleware/auth.js): `server/middleware/auth.js`
- [User records](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/models/users.js): `server/models/users.js`
- [Category API](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/routes/categories.js): `server/routes/categories.js`
- [Product API](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/routes/products.js): `server/routes/products.js`
- [Order API](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/routes/orders.js): `server/routes/orders.js`
- [Customization API](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/routes/customize.js): `server/routes/customize.js`
- [Payment API](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/routes/braintree.js): `server/routes/braintree.js`
- [MongoDB](https://github.com/divya4242/react-node-mongodb-docker-project-cicd-github-actions-ec2/blob/main/server/config/db.js): `server/config/db.js`

### Other components

- **Shopper**
- **Braintree**

## Connections

- Shopper → React app: uses
- React app → Page routes: renders
- Express API → Auth routes: mounts
- Express API → Category API: mounts
- Express API → Product API: mounts
- Express API → Order API: mounts
- Express API → Customization API: mounts
- Express API → Payment API: mounts
- Auth routes → Auth controller: dispatches
- Auth routes → Auth middleware: checks access
- Auth controller → User records: reads and writes
- Express API → MongoDB: connects
- Payment API → Braintree: integrates
