# badriit/artwebnew2 architecture

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

- Interactive diagram: https://gitdiagram.com/badriit/artwebnew2
- Repository: https://github.com/badriit/artwebnew2

## Overview

This is an Angular art-gallery storefront. Visitors browse and filter artworks, open artwork details, and manage a cart; account, checkout, order-history, offers, artist, and gallery-service screens provide adjacent workflows. The sampled code shows product and cart API calls, local cart-related state, and guarded routes. The README documents only Angular tooling, so product capabilities are inferred from the source index and component names; several components and routes were not sampled, and their internal behavior is not asserted.

Main entry points: [`src/app/app-routing.module.ts`](https://github.com/badriit/artwebnew2/blob/main/src/app/app-routing.module.ts) (Route configuration), [`src/app/cart.service.ts`](https://github.com/badriit/artwebnew2/blob/main/src/app/cart.service.ts) (Cart service), [`src/app/service.service.ts`](https://github.com/badriit/artwebnew2/blob/main/src/app/service.service.ts) (Artwork API), [`src/app/cart/cart.component.ts`](https://github.com/badriit/artwebnew2/blob/main/src/app/cart/cart.component.ts) (Shopping cart)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Application shell"]
  node_appmod["App module<br/>[app.module.ts]"]
  node_root["Root component<br/>[app.component.ts]"]
  node_routing["Route configuration"]
  node_galleryservices["Gallery services"]
  node_contact["Contact page"]
end

subgraph group_discovery["Artwork discovery"]
  node_home["Artwork home<br/>[home.component.ts]"]
  node_artists["Artist listings"]
  node_artistdetail["Artist details"]
  node_product["Artwork details"]
  node_catalogproduct["Catalog product"]
  node_catalogartist["Catalog artist"]
  node_offers["Offers"]
end

subgraph group_commerce["Cart and checkout"]
  node_cartview["Shopping cart<br/>[cart.component.ts]"]
  node_checkout["Pre-order checkout"]
end

subgraph group_account["Account"]
  node_login["Authentication<br/>[auth.component.ts]"]
  node_profile["Personal profile"]
  node_history["Order history"]
  node_likes["Liked products"]
  node_guard["Auth guard"]
end

subgraph group_shared["Shared services"]
  node_catalogapi["Artwork API<br/>[service.service.ts]"]
  node_cartstate["Cart service<br/>[cart.service.ts]"]
  node_productinfo["Checkout product state"]
end

node_visitor(("Gallery visitor"))
node_plangton{{"Plangton backend"}}
node_artshop{{"Artshop backend"}}

node_visitor -->|"navigates"| node_routing
node_appmod -->|"bootstraps"| node_root
node_routing -->|"routes to"| node_home
node_routing -->|"routes to"| node_artists
node_routing -->|"routes to"| node_galleryservices
node_routing -->|"routes to"| node_contact
node_routing -->|"routes to"| node_product
node_routing -->|"routes to"| node_artistdetail
node_routing -->|"routes to"| node_catalogproduct
node_routing -->|"routes to"| node_catalogartist
node_routing -->|"routes to"| node_cartview
node_routing -->|"routes to"| node_likes
node_routing -->|"routes to"| node_login
node_routing -->|"routes to"| node_profile
node_routing -->|"routes to"| node_offers
node_routing -->|"routes to"| node_checkout
node_home -->|"fetches artworks"| node_catalogapi
node_home -->|"updates cart count"| node_cartstate
node_artists -->|"uses"| node_catalogapi
node_artists -->|"uses"| node_cartstate
node_product -->|"loads artwork"| node_catalogapi
node_product -->|"updates cart count"| node_cartstate
node_product -->|"requests artwork"| node_plangton
node_catalogapi -->|"calls API"| node_plangton
node_catalogapi -->|"calls API"| node_artshop
node_cartview -->|"loads artwork data"| node_catalogapi
node_cartview -->|"uses cart state"| node_cartstate
node_cartview -->|"uses checkout state"| node_productinfo
node_cartview -->|"fetches artwork"| node_plangton
node_login -->|"uses cart state"| node_cartstate
node_login -->|"registers account"| node_plangton
node_checkout -->|"checks access"| node_guard
node_checkout -->|"reads product state"| node_productinfo
node_checkout -->|"submits checkout"| node_artshop
node_guard -->|"redirects unauthenticated"| node_login
node_guard -->|"validates account"| node_plangton
node_likes -->|"uses"| node_catalogapi
node_offers -->|"uses cart state"| node_cartstate
node_history -->|"uses cart state"| node_cartstate
node_profile -->|"uses cart state"| node_cartstate

click node_appmod "https://github.com/badriit/artwebnew2/blob/main/src/app/app.module.ts"
click node_root "https://github.com/badriit/artwebnew2/blob/main/src/app/app.component.ts"
click node_routing "https://github.com/badriit/artwebnew2/blob/main/src/app/app-routing.module.ts"
click node_home "https://github.com/badriit/artwebnew2/blob/main/src/app/home/home.component.ts"
click node_artists "https://github.com/badriit/artwebnew2/blob/main/src/app/arters/arters.component.ts"
click node_artistdetail "https://github.com/badriit/artwebnew2/blob/main/src/app/each-arter/each-arter.component.ts"
click node_product "https://github.com/badriit/artwebnew2/blob/main/src/app/product/product.component.ts"
click node_catalogproduct "https://github.com/badriit/artwebnew2/blob/main/src/app/product-from-catalog/product-from-catalog.component.ts"
click node_catalogartist "https://github.com/badriit/artwebnew2/blob/main/src/app/each-arter-from-catalog/each-arter-from-catalog.component.ts"
click node_offers "https://github.com/badriit/artwebnew2/blob/main/src/app/offers/offers.component.ts"
click node_cartview "https://github.com/badriit/artwebnew2/blob/main/src/app/cart/cart.component.ts"
click node_checkout "https://github.com/badriit/artwebnew2/blob/main/src/app/pre-order-details/pre-order-details.component.ts"
click node_login "https://github.com/badriit/artwebnew2/blob/main/src/app/auth/auth.component.ts"
click node_profile "https://github.com/badriit/artwebnew2/blob/main/src/app/personal/personal.component.ts"
click node_history "https://github.com/badriit/artwebnew2/blob/main/src/app/order-history/order-history.component.ts"
click node_likes "https://github.com/badriit/artwebnew2/blob/main/src/app/liked-products/liked-products.component.ts"
click node_guard "https://github.com/badriit/artwebnew2/blob/main/src/app/auth.guard.service.ts"
click node_galleryservices "https://github.com/badriit/artwebnew2/blob/main/src/app/services-communicate/services-communicate.component.ts"
click node_contact "https://github.com/badriit/artwebnew2/blob/main/src/app/contact/contact.component.ts"
click node_catalogapi "https://github.com/badriit/artwebnew2/blob/main/src/app/service.service.ts"
click node_cartstate "https://github.com/badriit/artwebnew2/blob/main/src/app/cart.service.ts"
click node_productinfo "https://github.com/badriit/artwebnew2/blob/main/src/app/get-product-info.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_appmod,node_root,node_routing,node_galleryservices,node_contact toneBlue
class node_home,node_artists,node_artistdetail,node_product,node_catalogproduct,node_catalogartist,node_offers toneAmber
class node_cartview,node_checkout toneMint
class node_login,node_profile,node_history,node_likes,node_guard toneRose
class node_catalogapi,node_cartstate,node_productinfo,node_visitor,node_plangton,node_artshop toneIndigo
```

## Components

### Application shell

- [App module](https://github.com/badriit/artwebnew2/blob/main/src/app/app.module.ts): `src/app/app.module.ts`
- [Root component](https://github.com/badriit/artwebnew2/blob/main/src/app/app.component.ts): `src/app/app.component.ts`
- [Route configuration](https://github.com/badriit/artwebnew2/blob/main/src/app/app-routing.module.ts): `src/app/app-routing.module.ts`
- [Gallery services](https://github.com/badriit/artwebnew2/blob/main/src/app/services-communicate/services-communicate.component.ts): `src/app/services-communicate/services-communicate.component.ts`
- [Contact page](https://github.com/badriit/artwebnew2/blob/main/src/app/contact/contact.component.ts): `src/app/contact/contact.component.ts`

### Artwork discovery

- [Artwork home](https://github.com/badriit/artwebnew2/blob/main/src/app/home/home.component.ts): `src/app/home/home.component.ts`
- [Artist listings](https://github.com/badriit/artwebnew2/blob/main/src/app/arters/arters.component.ts): `src/app/arters/arters.component.ts`
- [Artist details](https://github.com/badriit/artwebnew2/blob/main/src/app/each-arter/each-arter.component.ts): `src/app/each-arter/each-arter.component.ts`
- [Artwork details](https://github.com/badriit/artwebnew2/blob/main/src/app/product/product.component.ts): `src/app/product/product.component.ts`
- [Catalog product](https://github.com/badriit/artwebnew2/blob/main/src/app/product-from-catalog/product-from-catalog.component.ts): `src/app/product-from-catalog/product-from-catalog.component.ts`
- [Catalog artist](https://github.com/badriit/artwebnew2/blob/main/src/app/each-arter-from-catalog/each-arter-from-catalog.component.ts): `src/app/each-arter-from-catalog/each-arter-from-catalog.component.ts`
- [Offers](https://github.com/badriit/artwebnew2/blob/main/src/app/offers/offers.component.ts): `src/app/offers/offers.component.ts`

### Cart and checkout

- [Shopping cart](https://github.com/badriit/artwebnew2/blob/main/src/app/cart/cart.component.ts): `src/app/cart/cart.component.ts`
- [Pre-order checkout](https://github.com/badriit/artwebnew2/blob/main/src/app/pre-order-details/pre-order-details.component.ts): `src/app/pre-order-details/pre-order-details.component.ts`

### Account

- [Authentication](https://github.com/badriit/artwebnew2/blob/main/src/app/auth/auth.component.ts): `src/app/auth/auth.component.ts`
- [Personal profile](https://github.com/badriit/artwebnew2/blob/main/src/app/personal/personal.component.ts): `src/app/personal/personal.component.ts`
- [Order history](https://github.com/badriit/artwebnew2/blob/main/src/app/order-history/order-history.component.ts): `src/app/order-history/order-history.component.ts`
- [Liked products](https://github.com/badriit/artwebnew2/blob/main/src/app/liked-products/liked-products.component.ts): `src/app/liked-products/liked-products.component.ts`
- [Auth guard](https://github.com/badriit/artwebnew2/blob/main/src/app/auth.guard.service.ts): `src/app/auth.guard.service.ts`

### Shared services

- [Artwork API](https://github.com/badriit/artwebnew2/blob/main/src/app/service.service.ts): `src/app/service.service.ts`
- [Cart service](https://github.com/badriit/artwebnew2/blob/main/src/app/cart.service.ts): `src/app/cart.service.ts`
- [Checkout product state](https://github.com/badriit/artwebnew2/blob/main/src/app/get-product-info.service.ts): `src/app/get-product-info.service.ts`

### Other components

- **Gallery visitor**
- **Plangton backend**
- **Artshop backend**

## Connections

- Gallery visitor → Route configuration: navigates (evidence: `src/app/app-routing.module.ts`)
- App module → Root component: bootstraps (evidence: `src/app/app.module.ts`)
- Route configuration → Artwork home: routes to (evidence: `src/app/app-routing.module.ts`)
- Route configuration → Artist listings: routes to (evidence: `src/app/app-routing.module.ts`)
- Route configuration → Gallery services: routes to (evidence: `src/app/app-routing.module.ts`)
- Route configuration → Contact page: routes to (evidence: `src/app/app-routing.module.ts`)
- Route configuration → Artwork details: routes to (evidence: `src/app/app-routing.module.ts`)
- Route configuration → Artist details: routes to (evidence: `src/app/app-routing.module.ts`)
- Route configuration → Catalog product: routes to (evidence: `src/app/app-routing.module.ts`)
- Route configuration → Catalog artist: routes to (evidence: `src/app/app-routing.module.ts`)
- Route configuration → Shopping cart: routes to (evidence: `src/app/app-routing.module.ts`)
- Route configuration → Liked products: routes to (evidence: `src/app/app-routing.module.ts`)
- Route configuration → Authentication: routes to (evidence: `src/app/app-routing.module.ts`)
- Route configuration → Personal profile: routes to (evidence: `src/app/app-routing.module.ts`)
- Route configuration → Offers: routes to (evidence: `src/app/app-routing.module.ts`)
- Route configuration → Pre-order checkout: routes to (evidence: `src/app/app-routing.module.ts`)
- Artwork home → Artwork API: fetches artworks (evidence: `src/app/home/home.component.ts`)
- Artwork home → Cart service: updates cart count (evidence: `src/app/home/home.component.ts`)
- Artist listings → Artwork API: uses (evidence: `src/app/arters/arters.component.ts`)
- Artist listings → Cart service: uses (evidence: `src/app/arters/arters.component.ts`)
- Artwork details → Artwork API: loads artwork (evidence: `src/app/product/product.component.ts`)
- Artwork details → Cart service: updates cart count (evidence: `src/app/product/product.component.ts`)
- Artwork details → Plangton backend: requests artwork
- Artwork API → Plangton backend: calls API (evidence: `src/app/service.service.ts`)
- Artwork API → Artshop backend: calls API (evidence: `src/app/service.service.ts`)
- Shopping cart → Artwork API: loads artwork data (evidence: `src/app/cart/cart.component.ts`)
- Shopping cart → Cart service: uses cart state (evidence: `src/app/cart/cart.component.ts`)
- Shopping cart → Checkout product state: uses checkout state (evidence: `src/app/cart/cart.component.ts`)
- Shopping cart → Plangton backend: fetches artwork (evidence: `src/app/cart/cart.component.ts`)
- Authentication → Cart service: uses cart state (evidence: `src/app/auth/auth.component.ts`)
- Authentication → Plangton backend: registers account (evidence: `src/app/auth/auth.component.ts`)
- Pre-order checkout → Auth guard: checks access (evidence: `src/app/pre-order-details/pre-order-details.component.ts`)
- Pre-order checkout → Checkout product state: reads product state (evidence: `src/app/pre-order-details/pre-order-details.component.ts`)
- Pre-order checkout → Artshop backend: submits checkout (evidence: `src/app/pre-order-details/pre-order-details.component.ts`)
- Auth guard → Authentication: redirects unauthenticated (evidence: `src/app/auth.guard.service.ts`)
- Auth guard → Plangton backend: validates account (evidence: `src/app/auth.guard.service.ts`)
- Liked products → Artwork API: uses (evidence: `src/app/liked-products/liked-products.component.ts`)
- Offers → Cart service: uses cart state (evidence: `src/app/offers/offers.component.ts`)
- Order history → Cart service: uses cart state (evidence: `src/app/order-history/order-history.component.ts`)
- Personal profile → Cart service: uses cart state (evidence: `src/app/personal/personal.component.ts`)
