# poojitha-annam/floranest architecture

> Architecture diagram of the GitHub repository poojitha-annam/floranest, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/poojitha-annam/floranest
- Repository: https://github.com/poojitha-annam/floranest

## Overview

FloraNest is a plant-and-flower e-commerce application with a React storefront, Express API, and MySQL persistence. The customer workflow runs from browsing products and managing a cart through checkout and order tracking; registration and login are separate account flows. Admin capabilities cover dashboards, catalog and inventory, customers, orders, and reports. The excerpts show key storefront, order, tracking, and admin API behavior; several admin UI and backend wiring details are unsampled, so those links are omitted or marked unverified.

Main entry points: [`floranest/src/App.jsx`](https://github.com/poojitha-annam/floranest/blob/main/floranest/src/App.jsx) (Storefront shell), [`backend/adminRoutes.js`](https://github.com/poojitha-annam/floranest/blob/main/backend/adminRoutes.js) (Admin API), [`backend/server.js`](https://github.com/poojitha-annam/floranest/blob/main/backend/server.js) (Store API), [`backend/db.js`](https://github.com/poojitha-annam/floranest/blob/main/backend/db.js) (Database client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Customer storefront"]
  node_app["Storefront shell<br/>[App.jsx]"]
  node_home["Product browsing<br/>[Home.jsx]"]
  node_product_card["Product card<br/>[ProductCard.jsx]"]
  node_cart["Cart<br/>[Cart.jsx]"]
  node_checkout["Checkout<br/>[Checkout.jsx]"]
  node_register["Registration<br/>[Register.jsx]"]
  node_login["Login<br/>[Login.jsx]"]
  node_tracking_ui["Order tracking view<br/>[OrderTracking.jsx]"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_button["Button control<br/>[Button.jsx]"]
  node_footer["Store footer<br/>[Footer.jsx]"]
end

subgraph group_customer_api["Customer API"]
  node_api["Store API<br/>[server.js]"]
  node_tracking_api["Tracking API"]
end

subgraph group_administration["Store administration"]
  node_admin_ui["Admin dashboard"]
  node_admin_catalog["Catalog and inventory"]
  node_admin_customers["Customer management"]
  node_admin_orders["Order management"]
  node_admin_reports["Reports<br/>[Reports.jsx]"]
  node_admin_api["Admin API<br/>[adminRoutes.js]"]
end

subgraph group_persistence["Persistence"]
  node_db_client["Database client<br/>[db.js]"]
  node_mysql[("MySQL database")]
end

node_customer(("Customer"))

node_customer -->|"uses"| node_app
node_app -->|"renders"| node_home
node_app -->|"renders"| node_cart
node_app -->|"renders"| node_checkout
node_app -->|"renders"| node_register
node_app -->|"renders"| node_login
node_app -->|"renders"| node_tracking_ui
node_app -->|"renders"| node_navbar
node_app -->|"renders"| node_footer
node_home -->|"renders"| node_product_card
node_product_card -->|"uses"| node_button
node_navbar -->|"uses"| node_button
node_app -->|"posts orders"| node_api
node_register -->|"posts registration"| node_api
node_tracking_ui -->|"fetches status"| node_tracking_api
node_api -->|"queries"| node_db_client
node_tracking_api -->|"queries"| node_db_client
node_admin_api -->|"queries"| node_db_client
node_db_client -.->|"connects"| node_mysql
node_api -->|"mounts routes"| node_admin_api
node_admin_ui -.->|"uses API"| node_admin_api
node_admin_catalog -.->|"uses API"| node_admin_api
node_admin_customers -.->|"uses API"| node_admin_api
node_admin_orders -.->|"uses API"| node_admin_api
node_admin_reports -.->|"uses API"| node_admin_api

click node_app "https://github.com/poojitha-annam/floranest/blob/main/floranest/src/App.jsx"
click node_home "https://github.com/poojitha-annam/floranest/blob/main/floranest/src/pages/Home.jsx"
click node_product_card "https://github.com/poojitha-annam/floranest/blob/main/floranest/src/components/ProductCard.jsx"
click node_cart "https://github.com/poojitha-annam/floranest/blob/main/floranest/src/pages/Cart.jsx"
click node_checkout "https://github.com/poojitha-annam/floranest/blob/main/floranest/src/pages/Checkout.jsx"
click node_register "https://github.com/poojitha-annam/floranest/blob/main/floranest/src/pages/Register.jsx"
click node_login "https://github.com/poojitha-annam/floranest/blob/main/floranest/src/pages/Login.jsx"
click node_tracking_ui "https://github.com/poojitha-annam/floranest/blob/main/floranest/src/pages/OrderTracking.jsx"
click node_navbar "https://github.com/poojitha-annam/floranest/blob/main/floranest/src/components/Navbar.jsx"
click node_button "https://github.com/poojitha-annam/floranest/blob/main/floranest/src/components/Button.jsx"
click node_footer "https://github.com/poojitha-annam/floranest/blob/main/floranest/src/components/Footer.jsx"
click node_api "https://github.com/poojitha-annam/floranest/blob/main/backend/server.js"
click node_tracking_api "https://github.com/poojitha-annam/floranest/blob/main/backend/orderTrackingRoutes.js"
click node_admin_ui "https://github.com/poojitha-annam/floranest/tree/main/floranest/src/admin"
click node_admin_catalog "https://github.com/poojitha-annam/floranest/tree/main/floranest/src/admin"
click node_admin_customers "https://github.com/poojitha-annam/floranest/blob/main/floranest/src/admin/CustomerManagement.jsx"
click node_admin_orders "https://github.com/poojitha-annam/floranest/blob/main/floranest/src/admin/OrderManagement.jsx"
click node_admin_reports "https://github.com/poojitha-annam/floranest/blob/main/floranest/src/admin/Reports.jsx"
click node_admin_api "https://github.com/poojitha-annam/floranest/blob/main/backend/adminRoutes.js"
click node_db_client "https://github.com/poojitha-annam/floranest/blob/main/backend/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_home,node_product_card,node_cart,node_checkout,node_register,node_login,node_tracking_ui,node_navbar,node_button,node_footer toneBlue
class node_api,node_tracking_api toneAmber
class node_admin_ui,node_admin_catalog,node_admin_customers,node_admin_orders,node_admin_reports,node_admin_api toneMint
class node_db_client,node_mysql toneRose
class node_customer toneIndigo
```

## Components

### Customer storefront

- [Storefront shell](https://github.com/poojitha-annam/floranest/blob/main/floranest/src/App.jsx): `floranest/src/App.jsx`
- [Product browsing](https://github.com/poojitha-annam/floranest/blob/main/floranest/src/pages/Home.jsx): `floranest/src/pages/Home.jsx`
- [Product card](https://github.com/poojitha-annam/floranest/blob/main/floranest/src/components/ProductCard.jsx): `floranest/src/components/ProductCard.jsx`
- [Cart](https://github.com/poojitha-annam/floranest/blob/main/floranest/src/pages/Cart.jsx): `floranest/src/pages/Cart.jsx`
- [Checkout](https://github.com/poojitha-annam/floranest/blob/main/floranest/src/pages/Checkout.jsx): `floranest/src/pages/Checkout.jsx`
- [Registration](https://github.com/poojitha-annam/floranest/blob/main/floranest/src/pages/Register.jsx): `floranest/src/pages/Register.jsx`
- [Login](https://github.com/poojitha-annam/floranest/blob/main/floranest/src/pages/Login.jsx): `floranest/src/pages/Login.jsx`
- [Order tracking view](https://github.com/poojitha-annam/floranest/blob/main/floranest/src/pages/OrderTracking.jsx): `floranest/src/pages/OrderTracking.jsx`
- [Navigation](https://github.com/poojitha-annam/floranest/blob/main/floranest/src/components/Navbar.jsx): `floranest/src/components/Navbar.jsx`
- [Button control](https://github.com/poojitha-annam/floranest/blob/main/floranest/src/components/Button.jsx): `floranest/src/components/Button.jsx`
- [Store footer](https://github.com/poojitha-annam/floranest/blob/main/floranest/src/components/Footer.jsx): `floranest/src/components/Footer.jsx`

### Customer API

- [Store API](https://github.com/poojitha-annam/floranest/blob/main/backend/server.js): `backend/server.js`
- [Tracking API](https://github.com/poojitha-annam/floranest/blob/main/backend/orderTrackingRoutes.js): `backend/orderTrackingRoutes.js`

### Store administration

- [Admin dashboard](https://github.com/poojitha-annam/floranest/tree/main/floranest/src/admin): `floranest/src/admin`
- [Catalog and inventory](https://github.com/poojitha-annam/floranest/tree/main/floranest/src/admin): `floranest/src/admin`
- [Customer management](https://github.com/poojitha-annam/floranest/blob/main/floranest/src/admin/CustomerManagement.jsx): `floranest/src/admin/CustomerManagement.jsx`
- [Order management](https://github.com/poojitha-annam/floranest/blob/main/floranest/src/admin/OrderManagement.jsx): `floranest/src/admin/OrderManagement.jsx`
- [Reports](https://github.com/poojitha-annam/floranest/blob/main/floranest/src/admin/Reports.jsx): `floranest/src/admin/Reports.jsx`
- [Admin API](https://github.com/poojitha-annam/floranest/blob/main/backend/adminRoutes.js): `backend/adminRoutes.js`

### Persistence

- [Database client](https://github.com/poojitha-annam/floranest/blob/main/backend/db.js): `backend/db.js`
- **MySQL database**

### Other components

- **Customer**

## Connections

- Customer → Storefront shell: uses (evidence: `README.md`)
- Storefront shell → Product browsing: renders (evidence: `floranest/src/App.jsx`)
- Storefront shell → Cart: renders (evidence: `floranest/src/App.jsx`)
- Storefront shell → Checkout: renders (evidence: `floranest/src/App.jsx`)
- Storefront shell → Registration: renders (evidence: `floranest/src/App.jsx`)
- Storefront shell → Login: renders (evidence: `floranest/src/App.jsx`)
- Storefront shell → Order tracking view: renders (evidence: `floranest/src/App.jsx`)
- Storefront shell → Navigation: renders (evidence: `floranest/src/App.jsx`)
- Storefront shell → Store footer: renders (evidence: `floranest/src/App.jsx`)
- Product browsing → Product card: renders (evidence: `floranest/src/pages/Home.jsx`)
- Product card → Button control: uses (evidence: `floranest/src/components/ProductCard.jsx`)
- Navigation → Button control: uses (evidence: `floranest/src/components/Navbar.jsx`)
- Storefront shell → Store API: posts orders (evidence: `floranest/src/App.jsx`)
- Registration → Store API: posts registration (evidence: `floranest/src/pages/Register.jsx`)
- Order tracking view → Tracking API: fetches status (evidence: `floranest/src/pages/OrderTracking.jsx`)
- Store API → Database client: queries (evidence: `backend/server.js`)
- Tracking API → Database client: queries (evidence: `backend/orderTrackingRoutes.js`)
- Admin API → Database client: queries (evidence: `backend/adminRoutes.js`)
- Database client → MySQL database: connects
- Store API → Admin API: mounts routes (evidence: `backend/server.js`)
- Admin dashboard → Admin API: uses API
- Catalog and inventory → Admin API: uses API
- Customer management → Admin API: uses API
- Order management → Admin API: uses API
- Reports → Admin API: uses API
