# jai19kohn/axe-com-pimentas architecture

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

- Interactive diagram: https://gitdiagram.com/jai19kohn/axe-com-pimentas
- Repository: https://github.com/jai19kohn/axe-com-pimentas

## Overview

AxeComPimentas is an Angular storefront with guarded administration for products, stock, and suppliers. The public workflow routes visitors to a searchable catalog, then into a locally managed cart and checkout; admin workflows authenticate before product and inventory management. The graph preserves README-described supplier management and stock history, including initial-stock behavior. Edges rely on excerpts, SOURCE INDEX references, or README statements; unsampled page and API details are represented at their existing directories, with uncertain wiring omitted.

Main entry points: [`src/app/app.routes.ts`](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/app.routes.ts) (Route dispatch), [`src/app/features/products/product-service.ts`](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/products/product-service.ts) (Product API/state), [`src/app/core/services/auth.ts`](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/core/services/auth.ts) (Authentication), [`src/app/features/products/products-page/products-page.ts`](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/products/products-page/products-page.ts) (Public catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app["Application shell<br/>[app.ts]"]
  node_routes["Route dispatch<br/>[app.routes.ts]"]
  node_navbar["Store navigation<br/>[navbar.ts]"]
end

subgraph group_storefront["Storefront"]
  node_catalog_page["Public catalog<br/>[products-page.ts]"]
  node_search["Product search<br/>[product-search.ts]"]
  node_product_grid["Product grid<br/>[product-grid.ts]"]
  node_product_details["Product details<br/>[product-details.ts]"]
  node_cart["Shopping cart<br/>[cart-service.ts]"]
  node_cart_page["Cart page<br/>[cart-page.ts]"]
  node_checkout["Checkout<br/>[checkout.ts]"]
end

subgraph group_administration["Admin access"]
  node_login["Admin login<br/>[admin-login.ts]"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_guard["Admin route guard"]
end

subgraph group_catalog["Product catalog"]
  node_admin_products["Product management"]
  node_product_form["Product create/edit<br/>[product-create.ts]"]
  node_product_service["Product API/state<br/>[product-service.ts]"]
  node_product_model["Product model<br/>[product.ts]"]
end

subgraph group_operations["Stock and suppliers"]
  node_inventory_page["Inventory history<br/>[inventory-page.ts]"]
  node_inventory_api["Stock movements API<br/>[inventory-api.ts]"]
  node_suppliers_page["Supplier management<br/>[suppliers-page.ts]"]
  node_supplier_api["Supplier API<br/>[supplier-api.ts]"]
end

node_visitor(("Shopper / admin"))
node_backend{{"Application API"}}

node_visitor -.->|"opens"| node_app
node_app -->|"renders"| node_navbar
node_app -->|"hosts outlet"| node_routes
node_visitor -->|"navigates"| node_routes
node_routes -->|"routes to"| node_catalog_page
node_routes -->|"routes to"| node_cart_page
node_routes -->|"routes to"| node_checkout
node_routes -->|"routes to"| node_login
node_routes -->|"routes to"| node_admin_products
node_routes -->|"routes to"| node_product_form
node_routes -->|"routes to"| node_inventory_page
node_routes -->|"routes to"| node_suppliers_page
node_routes -->|"routes to"| node_product_details
node_navbar -->|"reads state"| node_cart
node_navbar -->|"reads auth"| node_auth
node_catalog_page -->|"reads products"| node_product_service
node_catalog_page -->|"adds items"| node_cart
node_catalog_page -->|"renders"| node_product_grid
node_catalog_page -->|"renders"| node_search
node_product_grid -->|"uses model"| node_product_model
node_product_details -->|"adds items"| node_cart
node_cart_page -->|"reads cart"| node_cart
node_checkout -->|"reads cart"| node_cart
node_login -->|"logs in"| node_auth
node_routes -->|"checks access"| node_guard
node_guard -->|"checks session"| node_auth
node_admin_products -->|"loads products"| node_product_service
node_product_form -->|"creates or updates"| node_product_service
node_product_form -->|"loads suppliers"| node_supplier_api
node_product_service -->|"uses types"| node_product_model
node_product_service -->|"requests products"| node_backend
node_product_service -->|"gets credentials"| node_auth
node_inventory_page -->|"loads admin products"| node_product_service
node_inventory_page -->|"loads and changes stock"| node_inventory_api
node_inventory_page -->|"handles auth errors"| node_auth
node_inventory_api -->|"requests movements"| node_backend
node_inventory_api -->|"gets credentials"| node_auth
node_suppliers_page -->|"manages suppliers"| node_supplier_api
node_supplier_api -->|"requests suppliers"| node_backend
node_supplier_api -->|"gets credentials"| node_auth
node_product_form -.->|"initial stock entry"| node_inventory_api

click node_app "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/app.ts"
click node_routes "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/app.routes.ts"
click node_navbar "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/navbar/navbar.ts"
click node_catalog_page "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/products/products-page/products-page.ts"
click node_search "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/products/product-search/product-search.ts"
click node_product_grid "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/products/product-grid/product-grid.ts"
click node_product_details "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/products/product-details/product-details.ts"
click node_cart "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/cart/cart-service.ts"
click node_cart_page "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/cart/cart-page/cart-page.ts"
click node_checkout "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/checkout/checkout.ts"
click node_login "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/admin/admin-login/admin-login.ts"
click node_auth "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/core/services/auth.ts"
click node_guard "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/core/guards/admin-auth.guard.ts"
click node_admin_products "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/products/admin-products-page/admin-products-page.ts"
click node_product_form "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/products/product-create/product-create.ts"
click node_product_service "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/products/product-service.ts"
click node_product_model "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/products/product.ts"
click node_inventory_page "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/inventory/inventory-page.ts"
click node_inventory_api "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/inventory/inventory-api.ts"
click node_suppliers_page "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/suppliers/suppliers-page.ts"
click node_supplier_api "https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/suppliers/supplier-api.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_app,node_routes,node_navbar toneBlue
class node_catalog_page,node_search,node_product_grid,node_product_details,node_cart,node_cart_page,node_checkout toneAmber
class node_login,node_auth,node_guard,node_backend toneMint
class node_admin_products,node_product_form,node_product_service,node_product_model toneRose
class node_inventory_page,node_inventory_api,node_suppliers_page,node_supplier_api,node_visitor toneIndigo
```

## Components

### App navigation

- [Application shell](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/app.ts): `src/app/app.ts`
- [Route dispatch](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/app.routes.ts): `src/app/app.routes.ts`
- [Store navigation](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/navbar/navbar.ts): `src/app/features/navbar/navbar.ts`

### Storefront

- [Public catalog](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/products/products-page/products-page.ts): `src/app/features/products/products-page/products-page.ts`
- [Product search](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/products/product-search/product-search.ts): `src/app/features/products/product-search/product-search.ts`
- [Product grid](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/products/product-grid/product-grid.ts): `src/app/features/products/product-grid/product-grid.ts`
- [Product details](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/products/product-details/product-details.ts): `src/app/features/products/product-details/product-details.ts`
- [Shopping cart](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/cart/cart-service.ts): `src/app/features/cart/cart-service.ts`
- [Cart page](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/cart/cart-page/cart-page.ts): `src/app/features/cart/cart-page/cart-page.ts`
- [Checkout](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/checkout/checkout.ts): `src/app/features/checkout/checkout.ts`

### Admin access

- [Admin login](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/admin/admin-login/admin-login.ts): `src/app/features/admin/admin-login/admin-login.ts`
- [Authentication](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/core/services/auth.ts): `src/app/core/services/auth.ts`
- [Admin route guard](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/core/guards/admin-auth.guard.ts): `src/app/core/guards/admin-auth.guard.ts`

### Product catalog

- [Product management](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/products/admin-products-page/admin-products-page.ts): `src/app/features/products/admin-products-page/admin-products-page.ts`
- [Product create/edit](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/products/product-create/product-create.ts): `src/app/features/products/product-create/product-create.ts`
- [Product API/state](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/products/product-service.ts): `src/app/features/products/product-service.ts`
- [Product model](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/products/product.ts): `src/app/features/products/product.ts`

### Stock and suppliers

- [Inventory history](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/inventory/inventory-page.ts): `src/app/features/inventory/inventory-page.ts`
- [Stock movements API](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/inventory/inventory-api.ts): `src/app/features/inventory/inventory-api.ts`
- [Supplier management](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/suppliers/suppliers-page.ts): `src/app/features/suppliers/suppliers-page.ts`
- [Supplier API](https://github.com/jai19kohn/axe-com-pimentas/blob/main/src/app/features/suppliers/supplier-api.ts): `src/app/features/suppliers/supplier-api.ts`

### Other components

- **Shopper / admin**
- **Application API**

## Connections

- Shopper / admin → Application shell: opens
- Application shell → Store navigation: renders (evidence: `src/app/app.ts`)
- Application shell → Route dispatch: hosts outlet (evidence: `src/app/app.ts`)
- Shopper / admin → Route dispatch: navigates (evidence: `src/app/app.routes.ts`)
- Route dispatch → Public catalog: routes to (evidence: `src/app/app.routes.ts`)
- Route dispatch → Cart page: routes to (evidence: `src/app/app.routes.ts`)
- Route dispatch → Checkout: routes to (evidence: `src/app/app.routes.ts`)
- Route dispatch → Admin login: routes to (evidence: `src/app/app.routes.ts`)
- Route dispatch → Product management: routes to (evidence: `src/app/app.routes.ts`)
- Route dispatch → Product create/edit: routes to (evidence: `src/app/app.routes.ts`)
- Route dispatch → Inventory history: routes to (evidence: `src/app/app.routes.ts`)
- Route dispatch → Supplier management: routes to (evidence: `src/app/app.routes.ts`)
- Route dispatch → Product details: routes to (evidence: `src/app/app.routes.ts`)
- Store navigation → Shopping cart: reads state (evidence: `src/app/features/navbar/navbar.ts`)
- Store navigation → Authentication: reads auth (evidence: `src/app/features/navbar/navbar.ts`)
- Public catalog → Product API/state: reads products (evidence: `src/app/features/products/products-page/products-page.ts`)
- Public catalog → Shopping cart: adds items (evidence: `src/app/features/products/products-page/products-page.ts`)
- Public catalog → Product grid: renders (evidence: `src/app/features/products/products-page/products-page.ts`)
- Public catalog → Product search: renders (evidence: `src/app/features/products/products-page/products-page.ts`)
- Product grid → Product model: uses model (evidence: `src/app/features/products/product-grid/product-grid.ts`)
- Product details → Shopping cart: adds items (evidence: `src/app/features/products/product-details/product-details.ts`)
- Cart page → Shopping cart: reads cart (evidence: `src/app/features/cart/cart-page/cart-page.ts`)
- Checkout → Shopping cart: reads cart (evidence: `src/app/features/checkout/checkout.ts`)
- Admin login → Authentication: logs in (evidence: `src/app/features/admin/admin-login/admin-login.ts`)
- Route dispatch → Admin route guard: checks access (evidence: `src/app/app.routes.ts`)
- Admin route guard → Authentication: checks session (evidence: `src/app/core/guards/admin-auth.guard.ts`)
- Product management → Product API/state: loads products (evidence: `src/app/features/products/admin-products-page/admin-products-page.ts`)
- Product create/edit → Product API/state: creates or updates (evidence: `src/app/features/products/product-create/product-create.ts`)
- Product create/edit → Supplier API: loads suppliers (evidence: `src/app/features/products/product-create/product-create.ts`)
- Product API/state → Product model: uses types (evidence: `src/app/features/products/product-service.ts`)
- Product API/state → Application API: requests products (evidence: `src/app/features/products/product-service.ts`)
- Product API/state → Authentication: gets credentials (evidence: `src/app/features/products/product-service.ts`)
- Inventory history → Product API/state: loads admin products (evidence: `src/app/features/inventory/inventory-page.ts`)
- Inventory history → Stock movements API: loads and changes stock (evidence: `src/app/features/inventory/inventory-page.ts`)
- Inventory history → Authentication: handles auth errors (evidence: `src/app/features/inventory/inventory-page.ts`)
- Stock movements API → Application API: requests movements (evidence: `src/app/features/inventory/inventory-api.ts`)
- Stock movements API → Authentication: gets credentials (evidence: `src/app/features/inventory/inventory-api.ts`)
- Supplier management → Supplier API: manages suppliers (evidence: `src/app/features/suppliers/suppliers-page.ts`)
- Supplier API → Application API: requests suppliers (evidence: `src/app/features/suppliers/supplier-api.ts`)
- Supplier API → Authentication: gets credentials (evidence: `src/app/features/suppliers/supplier-api.ts`)
- Product create/edit → Stock movements API: initial stock entry (evidence: `README.md`)
