# miorena/ecommerce-angular architecture

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

- Interactive diagram: https://gitdiagram.com/miorena/ecommerce-angular
- Repository: https://github.com/miorena/ecommerce-angular

## Overview

Velène is a small Angular fashion storefront. A shopper browses the catalog, opens product details, adds items to a cart, and can register or log in; the cart and account state are stored in browser local storage. The graph follows the shown routing and service calls. Home-page wiring and navbar dependencies are supported by the SOURCE INDEX, but their implementation excerpts were not provided; other unsampled behavior is not inferred.

Main entry points: [`src/app/app.routes.ts`](https://github.com/miorena/ecommerce-angular/blob/master/src/app/app.routes.ts) (Route configuration), [`src/app/services/cart.ts`](https://github.com/miorena/ecommerce-angular/blob/master/src/app/services/cart.ts) (Cart service), [`src/app/services/auth.ts`](https://github.com/miorena/ecommerce-angular/blob/master/src/app/services/auth.ts) (Auth service), [`src/app/models/product.model.ts`](https://github.com/miorena/ecommerce-angular/blob/master/src/app/models/product.model.ts) (Product model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_bootstrap["Angular bootstrap<br/>[main.ts]"]
  node_root["Root component<br/>[app.ts]"]
  node_router["Route configuration<br/>[app.routes.ts]"]
  node_app_config["Router setup<br/>[app.config.ts]"]
  node_navbar["Navbar<br/>[navbar.ts]"]
  node_footer["Footer<br/>[footer.ts]"]
end

subgraph group_catalog["Product catalog"]
  node_home["Home page<br/>[home.ts]"]
  node_shop["Shop page<br/>[shop.ts]"]
  node_product_detail["Product detail<br/>[product-detail.ts]"]
  node_product_card["Product card<br/>[product-card.ts]"]
  node_product_service["Product service<br/>[product.ts]"]
end

subgraph group_cart["Shopping cart"]
  node_cart_page["Cart page<br/>[cart.ts]"]
  node_cart_service["Cart service<br/>[cart.ts]"]
end

subgraph group_identity["Account and identity"]
  node_register["Registration page<br/>[register.ts]"]
  node_login["Login page<br/>[login.ts]"]
  node_auth_service["Auth service<br/>[auth.ts]"]
  node_auth_guard["Auth guard<br/>[auth.guard.ts]"]
end

subgraph group_models["Domain models"]
  node_product_model["Product model<br/>[product.model.ts]"]
  node_user_model["User model<br/>[user.model.ts]"]
end

node_shopper(("Shopper"))
node_local_storage[("Browser local storage")]

node_shopper -->|"opens pages"| node_router
node_bootstrap -->|"bootstraps"| node_root
node_bootstrap -->|"loads config"| node_app_config
node_app_config -->|"provides routes"| node_router
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_shop
node_router -->|"routes to"| node_product_detail
node_router -->|"routes to"| node_cart_page
node_router -->|"routes to"| node_login
node_router -->|"routes to"| node_register
node_root -->|"renders"| node_navbar
node_root -->|"renders"| node_footer
node_home -->|"loads products"| node_product_service
node_home -->|"uses cards"| node_product_card
node_shop -->|"loads products"| node_product_service
node_shop -->|"uses cards"| node_product_card
node_product_detail -->|"looks up product"| node_product_service
node_product_detail -->|"adds product"| node_cart_service
node_product_card -->|"adds product"| node_cart_service
node_cart_page -->|"reads cart"| node_cart_service
node_login -->|"authenticates"| node_auth_service
node_login -->|"reloads cart"| node_cart_service
node_register -->|"registers account"| node_auth_service
node_navbar -->|"uses account state"| node_auth_service
node_navbar -->|"uses cart state"| node_cart_service
node_auth_guard -->|"checks identity"| node_auth_service
node_product_service -->|"uses type"| node_product_model
node_home -->|"uses type"| node_product_model
node_shop -->|"uses type"| node_product_model
node_product_detail -->|"uses type"| node_product_model
node_product_card -->|"uses type"| node_product_model
node_cart_service -->|"stores products"| node_product_model
node_auth_service -->|"uses type"| node_user_model
node_register -->|"creates user"| node_user_model
node_auth_service -->|"reads and writes"| node_local_storage
node_cart_service -->|"reads and writes"| node_local_storage

click node_bootstrap "https://github.com/miorena/ecommerce-angular/blob/master/src/main.ts"
click node_root "https://github.com/miorena/ecommerce-angular/blob/master/src/app/app.ts"
click node_router "https://github.com/miorena/ecommerce-angular/blob/master/src/app/app.routes.ts"
click node_app_config "https://github.com/miorena/ecommerce-angular/blob/master/src/app/app.config.ts"
click node_navbar "https://github.com/miorena/ecommerce-angular/blob/master/src/app/components/navbar/navbar.ts"
click node_footer "https://github.com/miorena/ecommerce-angular/blob/master/src/app/components/footer/footer.ts"
click node_home "https://github.com/miorena/ecommerce-angular/blob/master/src/app/pages/home/home.ts"
click node_shop "https://github.com/miorena/ecommerce-angular/blob/master/src/app/pages/shop/shop.ts"
click node_product_detail "https://github.com/miorena/ecommerce-angular/blob/master/src/app/pages/product-detail/product-detail.ts"
click node_product_card "https://github.com/miorena/ecommerce-angular/blob/master/src/app/components/product-card/product-card.ts"
click node_product_service "https://github.com/miorena/ecommerce-angular/blob/master/src/app/services/product.ts"
click node_cart_page "https://github.com/miorena/ecommerce-angular/blob/master/src/app/pages/cart/cart.ts"
click node_cart_service "https://github.com/miorena/ecommerce-angular/blob/master/src/app/services/cart.ts"
click node_register "https://github.com/miorena/ecommerce-angular/blob/master/src/app/pages/register/register.ts"
click node_login "https://github.com/miorena/ecommerce-angular/blob/master/src/app/pages/login/login.ts"
click node_auth_service "https://github.com/miorena/ecommerce-angular/blob/master/src/app/services/auth.ts"
click node_auth_guard "https://github.com/miorena/ecommerce-angular/blob/master/src/app/guards/auth.guard.ts"
click node_product_model "https://github.com/miorena/ecommerce-angular/blob/master/src/app/models/product.model.ts"
click node_user_model "https://github.com/miorena/ecommerce-angular/blob/master/src/app/models/user.model.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_bootstrap,node_root,node_router,node_app_config,node_navbar,node_footer toneBlue
class node_home,node_shop,node_product_detail,node_product_card,node_product_service,node_local_storage toneAmber
class node_cart_page,node_cart_service toneMint
class node_register,node_login,node_auth_service,node_auth_guard toneRose
class node_product_model,node_user_model,node_shopper toneIndigo
```

## Components

### Application shell

- [Angular bootstrap](https://github.com/miorena/ecommerce-angular/blob/master/src/main.ts): `src/main.ts`
- [Root component](https://github.com/miorena/ecommerce-angular/blob/master/src/app/app.ts): `src/app/app.ts`
- [Route configuration](https://github.com/miorena/ecommerce-angular/blob/master/src/app/app.routes.ts): `src/app/app.routes.ts`
- [Router setup](https://github.com/miorena/ecommerce-angular/blob/master/src/app/app.config.ts): `src/app/app.config.ts`
- [Navbar](https://github.com/miorena/ecommerce-angular/blob/master/src/app/components/navbar/navbar.ts): `src/app/components/navbar/navbar.ts`
- [Footer](https://github.com/miorena/ecommerce-angular/blob/master/src/app/components/footer/footer.ts): `src/app/components/footer/footer.ts`

### Product catalog

- [Home page](https://github.com/miorena/ecommerce-angular/blob/master/src/app/pages/home/home.ts): `src/app/pages/home/home.ts`
- [Shop page](https://github.com/miorena/ecommerce-angular/blob/master/src/app/pages/shop/shop.ts): `src/app/pages/shop/shop.ts`
- [Product detail](https://github.com/miorena/ecommerce-angular/blob/master/src/app/pages/product-detail/product-detail.ts): `src/app/pages/product-detail/product-detail.ts`
- [Product card](https://github.com/miorena/ecommerce-angular/blob/master/src/app/components/product-card/product-card.ts): `src/app/components/product-card/product-card.ts`
- [Product service](https://github.com/miorena/ecommerce-angular/blob/master/src/app/services/product.ts): `src/app/services/product.ts`

### Shopping cart

- [Cart page](https://github.com/miorena/ecommerce-angular/blob/master/src/app/pages/cart/cart.ts): `src/app/pages/cart/cart.ts`
- [Cart service](https://github.com/miorena/ecommerce-angular/blob/master/src/app/services/cart.ts): `src/app/services/cart.ts`

### Account and identity

- [Registration page](https://github.com/miorena/ecommerce-angular/blob/master/src/app/pages/register/register.ts): `src/app/pages/register/register.ts`
- [Login page](https://github.com/miorena/ecommerce-angular/blob/master/src/app/pages/login/login.ts): `src/app/pages/login/login.ts`
- [Auth service](https://github.com/miorena/ecommerce-angular/blob/master/src/app/services/auth.ts): `src/app/services/auth.ts`
- [Auth guard](https://github.com/miorena/ecommerce-angular/blob/master/src/app/guards/auth.guard.ts): `src/app/guards/auth.guard.ts`

### Domain models

- [Product model](https://github.com/miorena/ecommerce-angular/blob/master/src/app/models/product.model.ts): `src/app/models/product.model.ts`
- [User model](https://github.com/miorena/ecommerce-angular/blob/master/src/app/models/user.model.ts): `src/app/models/user.model.ts`

### Other components

- **Shopper**
- **Browser local storage**

## Connections

- Shopper → Route configuration: opens pages (evidence: `src/app/app.routes.ts`)
- Angular bootstrap → Root component: bootstraps (evidence: `src/main.ts`)
- Angular bootstrap → Router setup: loads config (evidence: `src/main.ts`)
- Router setup → Route configuration: provides routes (evidence: `src/app/app.config.ts`)
- Route configuration → Home page: routes to (evidence: `src/app/app.routes.ts`)
- Route configuration → Shop page: routes to (evidence: `src/app/app.routes.ts`)
- Route configuration → Product detail: routes to (evidence: `src/app/app.routes.ts`)
- Route configuration → Cart page: routes to (evidence: `src/app/app.routes.ts`)
- Route configuration → Login page: routes to (evidence: `src/app/app.routes.ts`)
- Route configuration → Registration page: routes to (evidence: `src/app/app.routes.ts`)
- Root component → Navbar: renders (evidence: `src/app/app.ts`)
- Root component → Footer: renders (evidence: `src/app/app.ts`)
- Home page → Product service: loads products (evidence: `src/app/pages/home/home.ts`)
- Home page → Product card: uses cards (evidence: `src/app/pages/home/home.ts`)
- Shop page → Product service: loads products (evidence: `src/app/pages/shop/shop.ts`)
- Shop page → Product card: uses cards (evidence: `src/app/pages/shop/shop.ts`)
- Product detail → Product service: looks up product (evidence: `src/app/pages/product-detail/product-detail.ts`)
- Product detail → Cart service: adds product (evidence: `src/app/pages/product-detail/product-detail.ts`)
- Product card → Cart service: adds product (evidence: `src/app/components/product-card/product-card.ts`)
- Cart page → Cart service: reads cart (evidence: `src/app/pages/cart/cart.ts`)
- Login page → Auth service: authenticates (evidence: `src/app/pages/login/login.ts`)
- Login page → Cart service: reloads cart (evidence: `src/app/pages/login/login.ts`)
- Registration page → Auth service: registers account (evidence: `src/app/pages/register/register.ts`)
- Navbar → Auth service: uses account state (evidence: `src/app/components/navbar/navbar.ts`)
- Navbar → Cart service: uses cart state (evidence: `src/app/components/navbar/navbar.ts`)
- Auth guard → Auth service: checks identity (evidence: `src/app/guards/auth.guard.ts`)
- Product service → Product model: uses type (evidence: `src/app/services/product.ts`)
- Home page → Product model: uses type (evidence: `src/app/pages/home/home.ts`)
- Shop page → Product model: uses type (evidence: `src/app/pages/shop/shop.ts`)
- Product detail → Product model: uses type (evidence: `src/app/pages/product-detail/product-detail.ts`)
- Product card → Product model: uses type (evidence: `src/app/components/product-card/product-card.ts`)
- Cart service → Product model: stores products (evidence: `src/app/services/cart.ts`)
- Auth service → User model: uses type (evidence: `src/app/services/auth.ts`)
- Registration page → User model: creates user (evidence: `src/app/pages/register/register.ts`)
- Auth service → Browser local storage: reads and writes (evidence: `src/app/services/auth.ts`)
- Cart service → Browser local storage: reads and writes (evidence: `src/app/services/cart.ts`)
