# manikandannew/mm-cashew-store architecture

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

- Interactive diagram: https://gitdiagram.com/manikandannew/mm-cashew-store
- Repository: https://github.com/manikandannew/mm-cashew-store

## Overview

NaturaCash is a small storefront backend: clients can retrieve active products, place and look up orders, and submit contact messages. The API writes order and contact records to MySQL, and placing an order also triggers an email notification. The tree shows a frontend, but no frontend source excerpts or README were provided, so its behavior and connections cannot be established here.

Main entry points: [`backend/server.js`](https://github.com/manikandannew/mm-cashew-store/blob/main/backend/server.js) (HTTP API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Store API"]
  node_api["HTTP API<br/>[server.js]"]
  node_products["Product catalog<br/>[server.js]"]
  node_orders["Order handling<br/>[server.js]"]
  node_order_lookup["Order lookup<br/>[server.js]"]
  node_contact["Contact messages<br/>[server.js]"]
end

subgraph group_data["Persistence"]
  node_mysql[("MySQL database")]
end

subgraph group_notify["Notifications"]
  node_email["Order email<br/>[server.js]"]
end

node_customer(("Store customer"))
node_gmail["Gmail SMTP"]

node_customer -->|"sends requests"| node_api
node_api -->|"routes requests"| node_products
node_api -->|"routes requests"| node_orders
node_api -->|"routes requests"| node_order_lookup
node_api -->|"routes requests"| node_contact
node_products -->|"queries products"| node_mysql
node_orders -->|"writes orders"| node_mysql
node_order_lookup -->|"reads orders"| node_mysql
node_contact -->|"writes messages"| node_mysql
node_orders -->|"triggers notice"| node_email
node_email -->|"sends mail"| node_gmail

click node_api "https://github.com/manikandannew/mm-cashew-store/blob/main/backend/server.js"
click node_products "https://github.com/manikandannew/mm-cashew-store/blob/main/backend/server.js"
click node_orders "https://github.com/manikandannew/mm-cashew-store/blob/main/backend/server.js"
click node_order_lookup "https://github.com/manikandannew/mm-cashew-store/blob/main/backend/server.js"
click node_contact "https://github.com/manikandannew/mm-cashew-store/blob/main/backend/server.js"
click node_email "https://github.com/manikandannew/mm-cashew-store/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_api,node_products,node_orders,node_order_lookup,node_contact toneBlue
class node_mysql toneAmber
class node_email toneMint
class node_customer,node_gmail toneIndigo
```

## Components

### Store API

- [HTTP API](https://github.com/manikandannew/mm-cashew-store/blob/main/backend/server.js): `backend/server.js`
- [Product catalog](https://github.com/manikandannew/mm-cashew-store/blob/main/backend/server.js): `backend/server.js`
- [Order handling](https://github.com/manikandannew/mm-cashew-store/blob/main/backend/server.js): `backend/server.js`
- [Order lookup](https://github.com/manikandannew/mm-cashew-store/blob/main/backend/server.js): `backend/server.js`
- [Contact messages](https://github.com/manikandannew/mm-cashew-store/blob/main/backend/server.js): `backend/server.js`

### Persistence

- **MySQL database**

### Notifications

- [Order email](https://github.com/manikandannew/mm-cashew-store/blob/main/backend/server.js): `backend/server.js`

### Other components

- **Store customer**
- **Gmail SMTP**

## Connections

- Store customer → HTTP API: sends requests (evidence: `backend/server.js`)
- HTTP API → Product catalog: routes requests (evidence: `backend/server.js`)
- HTTP API → Order handling: routes requests (evidence: `backend/server.js`)
- HTTP API → Order lookup: routes requests (evidence: `backend/server.js`)
- HTTP API → Contact messages: routes requests (evidence: `backend/server.js`)
- Product catalog → MySQL database: queries products (evidence: `backend/server.js`)
- Order handling → MySQL database: writes orders (evidence: `backend/server.js`)
- Order lookup → MySQL database: reads orders (evidence: `backend/server.js`)
- Contact messages → MySQL database: writes messages (evidence: `backend/server.js`)
- Order handling → Order email: triggers notice (evidence: `backend/server.js`)
- Order email → Gmail SMTP: sends mail (evidence: `backend/server.js`)
