# ironcpp/shopnow architecture

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

- Interactive diagram: https://gitdiagram.com/ironcpp/shopnow
- Repository: https://github.com/ironcpp/shopnow

## Overview

This is a Spring Boot shopping-site starter. The visible customer flow maps HTTP routes to home, authentication, product-listing, and product-detail views; the admin controller maps management routes to dashboard, product-entry, and category views. The README also advertises search/filtering, secure login, and admin inventory management, but the sampled implementation is mostly view routing, with no demonstrated cart, product, or authentication services. The map preserves documented capabilities while distinguishing them from verified behavior; unsampled templates and configuration limit what can be asserted about their internals.

Main entry points: [`src/main/resources/templates`](https://github.com/ironcpp/shopnow/tree/main/src/main/resources/templates) (Storefront pages), [`src/main/java/com/ecom/controller/HomeController.java`](https://github.com/ironcpp/shopnow/blob/main/src/main/java/com/ecom/controller/HomeController.java) (Storefront routes), [`src/main/java/com/ecom/controller/AdminController.java`](https://github.com/ironcpp/shopnow/blob/main/src/main/java/com/ecom/controller/AdminController.java) (Admin routes), [`src/main/resources/templates/admin`](https://github.com/ironcpp/shopnow/tree/main/src/main/resources/templates/admin) (Admin pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer storefront"]
  node_home_controller["Storefront routes"]
  node_store_templates["Storefront pages"]
  node_static_assets["Static assets"]
end

subgraph group_admin["Admin management"]
  node_admin_controller["Admin routes"]
  node_admin_templates["Admin pages"]
end

subgraph group_domain["Domain and runtime"]
  node_category_model["Category entity<br/>[Category.java]"]
  node_category_repository["Category repository"]
  node_application["Spring Boot entry"]
end

node_visitor(("Shopper"))
node_admin_actor(("Administrator"))

node_visitor -->|"requests pages"| node_home_controller
node_home_controller -->|"returns views"| node_store_templates
node_admin_actor -->|"requests pages"| node_admin_controller
node_admin_controller -->|"returns views"| node_admin_templates
node_visitor -.->|"searches and filters"| node_store_templates
node_visitor -.->|"views products"| node_store_templates
node_visitor -.->|"authenticates"| node_store_templates
node_admin_actor -.->|"manages inventory"| node_admin_templates
node_application -.->|"starts web app"| node_home_controller

click node_home_controller "https://github.com/ironcpp/shopnow/blob/main/src/main/java/com/ecom/controller/HomeController.java"
click node_store_templates "https://github.com/ironcpp/shopnow/tree/main/src/main/resources/templates"
click node_admin_controller "https://github.com/ironcpp/shopnow/blob/main/src/main/java/com/ecom/controller/AdminController.java"
click node_admin_templates "https://github.com/ironcpp/shopnow/tree/main/src/main/resources/templates/admin"
click node_category_model "https://github.com/ironcpp/shopnow/blob/main/src/main/java/com/ecom/model/Category.java"
click node_category_repository "https://github.com/ironcpp/shopnow/blob/main/src/main/java/com/ecom/repository/CategoryRepository.java"
click node_application "https://github.com/ironcpp/shopnow/blob/main/src/main/java/com/ecom/ShoppingCartApplication.java"
click node_static_assets "https://github.com/ironcpp/shopnow/tree/main/src/main/resources/static"

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_home_controller,node_store_templates,node_static_assets toneBlue
class node_admin_controller,node_admin_templates toneAmber
class node_category_model,node_category_repository,node_application toneMint
class node_visitor,node_admin_actor toneIndigo
```

## Components

### Customer storefront

- [Storefront routes](https://github.com/ironcpp/shopnow/blob/main/src/main/java/com/ecom/controller/HomeController.java): `src/main/java/com/ecom/controller/HomeController.java`
- [Storefront pages](https://github.com/ironcpp/shopnow/tree/main/src/main/resources/templates): `src/main/resources/templates`
- [Static assets](https://github.com/ironcpp/shopnow/tree/main/src/main/resources/static): `src/main/resources/static`

### Admin management

- [Admin routes](https://github.com/ironcpp/shopnow/blob/main/src/main/java/com/ecom/controller/AdminController.java): `src/main/java/com/ecom/controller/AdminController.java`
- [Admin pages](https://github.com/ironcpp/shopnow/tree/main/src/main/resources/templates/admin): `src/main/resources/templates/admin`

### Domain and runtime

- [Category entity](https://github.com/ironcpp/shopnow/blob/main/src/main/java/com/ecom/model/Category.java): `src/main/java/com/ecom/model/Category.java`
- [Category repository](https://github.com/ironcpp/shopnow/blob/main/src/main/java/com/ecom/repository/CategoryRepository.java): `src/main/java/com/ecom/repository/CategoryRepository.java`
- [Spring Boot entry](https://github.com/ironcpp/shopnow/blob/main/src/main/java/com/ecom/ShoppingCartApplication.java): `src/main/java/com/ecom/ShoppingCartApplication.java`

### Other components

- **Shopper**
- **Administrator**

## Connections

- Shopper → Storefront routes: requests pages (evidence: `src/main/java/com/ecom/controller/HomeController.java`)
- Storefront routes → Storefront pages: returns views (evidence: `src/main/java/com/ecom/controller/HomeController.java`)
- Administrator → Admin routes: requests pages (evidence: `src/main/java/com/ecom/controller/AdminController.java`)
- Admin routes → Admin pages: returns views (evidence: `src/main/java/com/ecom/controller/AdminController.java`)
- Shopper → Storefront pages: searches and filters (evidence: `README.md`)
- Shopper → Storefront pages: views products (evidence: `README.md`)
- Shopper → Storefront pages: authenticates (evidence: `README.md`)
- Administrator → Admin pages: manages inventory (evidence: `README.md`)
- Spring Boot entry → Storefront routes: starts web app
