# giuseppe-gambino/eshopfe architecture

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

- Interactive diagram: https://gitdiagram.com/giuseppe-gambino/eshopfe
- Repository: https://github.com/giuseppe-gambino/eshopfe

## Overview

EShopFE is an Angular storefront with customer, seller, and administrator interfaces. The customer path runs from browsing products through product details and cart to checkout; authentication supports account access, while seller tools manage listings and administrators manage users. Services call the configured HTTP API for authentication, catalog, cart, and user data. The tree also shows order, reseller-order, and ticket capabilities, but their runtime wiring was not sampled, so those branches are represented without guessed call edges.

Main entry points: [`src/app/app-routing.module.ts`](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/app-routing.module.ts) (Route dispatch), [`src/app/services/products.service.ts`](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/services/products.service.ts) (Product API client), [`src/app/pages/cart/check-out/check-out.component.ts`](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/cart/check-out/check-out.component.ts) (Checkout), [`src/app/pages/shop-page/shop-page.component.ts`](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/shop-page/shop-page.component.ts) (Product browsing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application and access"]
  node_routing["Route dispatch"]
  node_auth["Authentication<br/>[auth.service.ts]"]
  node_login["Login<br/>[login.component.ts]"]
  node_register["Registration"]
end

subgraph group_shopping["Storefront and checkout"]
  node_cart["Cart state<br/>[cart.service.ts]"]
  node_shop["Product browsing"]
  node_product["Product details"]
  node_checkout["Checkout"]
  node_order["Order management<br/>[order.service.ts]"]
  node_payment["Payment result"]
  node_failed["Failed payment"]
end

subgraph group_catalog["Catalog management"]
  node_products["Product API client"]
  node_productform["Product form state"]
  node_producteditor["Product editor"]
  node_seller["Seller dashboard"]
  node_manageproducts["Listing management"]
end

subgraph group_accounts["Accounts and operations"]
  node_users["User management"]
  node_usersvc["User API client<br/>[user.service.ts]"]
  node_profile["Profile and history"]
  node_reseller["Reseller orders"]
  node_tickets["Support tickets<br/>[ticket.service.ts]"]
end

node_visitor(("Shopper"))
node_api{{"Backend API"}}

node_visitor -->|"navigates"| node_routing
node_routing -->|"routes to"| node_login
node_routing -->|"routes to"| node_register
node_routing -->|"routes to"| node_shop
node_routing -->|"routes to"| node_product
node_routing -->|"routes to"| node_checkout
node_login -->|"submits credentials"| node_auth
node_register -->|"registers account"| node_auth
node_auth -->|"sends auth requests"| node_api
node_shop -->|"requests listings"| node_products
node_shop -->|"adds products"| node_cart
node_product -->|"loads product"| node_products
node_product -->|"adds product"| node_cart
node_cart -->|"reads and updates cart"| node_api
node_checkout -.->|"initiates order"| node_order
node_order -.->|"uses order API"| node_api
node_checkout -.->|"returns on success"| node_payment
node_checkout -.->|"returns on failure"| node_failed
node_producteditor -->|"edits form state"| node_productform
node_producteditor -->|"saves listing"| node_products
node_products -->|"requests catalog data"| node_api
node_seller -->|"opens listings"| node_manageproducts
node_manageproducts -->|"manages listings"| node_products
node_users -->|"manages accounts"| node_usersvc
node_usersvc -->|"requests user data"| node_api
node_profile -.->|"loads profile"| node_usersvc
node_reseller -.->|"uses reseller API"| node_api
node_tickets -.->|"uses ticket API"| node_api

click node_routing "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/app-routing.module.ts"
click node_auth "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/auth/auth.service.ts"
click node_login "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/auth/login/login.component.ts"
click node_register "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/auth/register/register.component.ts"
click node_cart "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/services/cart.service.ts"
click node_shop "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/shop-page/shop-page.component.ts"
click node_product "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/shop-page/product-page/product-page.component.ts"
click node_checkout "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/cart/check-out/check-out.component.ts"
click node_order "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/services/order.service.ts"
click node_payment "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/cart/success/success.component.ts"
click node_failed "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/cart/failed/failed.component.ts"
click node_products "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/services/products.service.ts"
click node_productform "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/services/product-form.service.ts"
click node_producteditor "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/product-form/product-form.component.ts"
click node_seller "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/seller-dashboard/seller-dashboard.component.ts"
click node_manageproducts "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/seller-dashboard/manage-products/manage-products.component.ts"
click node_users "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/admin-dashboard/gestione-utenti/gestione-utenti.component.ts"
click node_usersvc "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/services/user.service.ts"
click node_profile "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/my-profile/my-profile.component.ts"
click node_reseller "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/services/reseller-order.service.ts"
click node_tickets "https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/services/ticket.service.ts"

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_routing,node_auth,node_login,node_register toneBlue
class node_cart,node_shop,node_product,node_checkout,node_order,node_payment,node_failed toneAmber
class node_products,node_productform,node_producteditor,node_seller,node_manageproducts,node_api toneMint
class node_users,node_usersvc,node_profile,node_reseller,node_tickets toneRose
class node_visitor toneIndigo
```

## Components

### Application and access

- [Route dispatch](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/app-routing.module.ts): `src/app/app-routing.module.ts`
- [Authentication](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/auth/auth.service.ts): `src/app/auth/auth.service.ts`
- [Login](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/auth/login/login.component.ts): `src/app/auth/login/login.component.ts`
- [Registration](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/auth/register/register.component.ts): `src/app/auth/register/register.component.ts`

### Storefront and checkout

- [Cart state](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/services/cart.service.ts): `src/app/services/cart.service.ts`
- [Product browsing](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/shop-page/shop-page.component.ts): `src/app/pages/shop-page/shop-page.component.ts`
- [Product details](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/shop-page/product-page/product-page.component.ts): `src/app/pages/shop-page/product-page/product-page.component.ts`
- [Checkout](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/cart/check-out/check-out.component.ts): `src/app/pages/cart/check-out/check-out.component.ts`
- [Order management](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/services/order.service.ts): `src/app/services/order.service.ts`
- [Payment result](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/cart/success/success.component.ts): `src/app/pages/cart/success/success.component.ts`
- [Failed payment](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/cart/failed/failed.component.ts): `src/app/pages/cart/failed/failed.component.ts`

### Catalog management

- [Product API client](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/services/products.service.ts): `src/app/services/products.service.ts`
- [Product form state](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/services/product-form.service.ts): `src/app/services/product-form.service.ts`
- [Product editor](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/product-form/product-form.component.ts): `src/app/pages/product-form/product-form.component.ts`
- [Seller dashboard](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/seller-dashboard/seller-dashboard.component.ts): `src/app/pages/seller-dashboard/seller-dashboard.component.ts`
- [Listing management](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/seller-dashboard/manage-products/manage-products.component.ts): `src/app/pages/seller-dashboard/manage-products/manage-products.component.ts`

### Accounts and operations

- [User management](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/admin-dashboard/gestione-utenti/gestione-utenti.component.ts): `src/app/pages/admin-dashboard/gestione-utenti/gestione-utenti.component.ts`
- [User API client](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/services/user.service.ts): `src/app/services/user.service.ts`
- [Profile and history](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/pages/my-profile/my-profile.component.ts): `src/app/pages/my-profile/my-profile.component.ts`
- [Reseller orders](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/services/reseller-order.service.ts): `src/app/services/reseller-order.service.ts`
- [Support tickets](https://github.com/giuseppe-gambino/eshopfe/blob/main/src/app/services/ticket.service.ts): `src/app/services/ticket.service.ts`

### Other components

- **Shopper**
- **Backend API**

## Connections

- Shopper → Route dispatch: navigates (evidence: `src/app/app-routing.module.ts`)
- Route dispatch → Login: routes to (evidence: `src/app/app-routing.module.ts`)
- Route dispatch → Registration: routes to (evidence: `src/app/app-routing.module.ts`)
- Route dispatch → Product browsing: routes to (evidence: `src/app/app-routing.module.ts`)
- Route dispatch → Product details: routes to (evidence: `src/app/app-routing.module.ts`)
- Route dispatch → Checkout: routes to (evidence: `src/app/app-routing.module.ts`)
- Login → Authentication: submits credentials (evidence: `src/app/auth/login/login.component.ts`)
- Registration → Authentication: registers account (evidence: `src/app/auth/register/register.component.ts`)
- Authentication → Backend API: sends auth requests (evidence: `src/app/auth/auth.service.ts`)
- Product browsing → Product API client: requests listings (evidence: `src/app/pages/shop-page/shop-page.component.ts`)
- Product browsing → Cart state: adds products (evidence: `src/app/pages/shop-page/shop-page.component.ts`)
- Product details → Product API client: loads product (evidence: `src/app/pages/shop-page/product-page/product-page.component.ts`)
- Product details → Cart state: adds product (evidence: `src/app/pages/shop-page/product-page/product-page.component.ts`)
- Cart state → Backend API: reads and updates cart (evidence: `src/app/services/cart.service.ts`)
- Checkout → Order management: initiates order
- Order management → Backend API: uses order API
- Checkout → Payment result: returns on success
- Checkout → Failed payment: returns on failure
- Product editor → Product form state: edits form state (evidence: `src/app/pages/product-form/product-form.component.ts`)
- Product editor → Product API client: saves listing (evidence: `src/app/pages/product-form/product-form.component.ts`)
- Product API client → Backend API: requests catalog data (evidence: `src/app/services/products.service.ts`)
- Seller dashboard → Listing management: opens listings (evidence: `src/app/pages/seller-dashboard/seller-dashboard-routing.module.ts`)
- Listing management → Product API client: manages listings (evidence: `src/app/pages/seller-dashboard/manage-products/manage-products.component.ts`)
- User management → User API client: manages accounts (evidence: `src/app/pages/admin-dashboard/gestione-utenti/gestione-utenti.component.ts`)
- User API client → Backend API: requests user data (evidence: `src/app/services/user.service.ts`)
- Profile and history → User API client: loads profile
- Reseller orders → Backend API: uses reseller API
- Support tickets → Backend API: uses ticket API
