# cpemistal-debug/cdlem-flower-shop architecture

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

- Interactive diagram: https://gitdiagram.com/cpemistal-debug/cdlem-flower-shop
- Repository: https://github.com/cpemistal-debug/cdlem-flower-shop

## Overview

Petal & Pot is an Angular flower-shop storefront. A shopper browses the catalog, searches and filters products, adds items to a cart, and places an order; account features support profile setup and order tracking. Admin functions manage catalog data and order status. The main component owns these workflows and makes the shown Firebase calls. The excerpts do not show every UI interaction or Firebase operation, so the graph omits uncertain links and groups related operations by responsibility.

Main entry points: [`src/app/app.component.ts`](https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/app.component.ts) (App Controller), [`src/app/app.component.html`](https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/app.component.html) (Storefront UI), [`src/app/product-search.ts`](https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/product-search.ts) (Product Search), [`src/app/core/firebase.ts`](https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/core/firebase.ts) (Firebase Setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_storefront_ui["Storefront UI<br/>[app.component.html]"]
  node_app_controller["App Controller<br/>[app.component.ts]"]
end

subgraph group_commerce["Shopping"]
  node_product_catalog["Product Catalog<br/>[products.ts]"]
  node_product_search["Product Search<br/>[product-search.ts]"]
  node_cart_checkout["Cart and Checkout<br/>[app.component.ts]"]
end

subgraph group_accounts["Accounts and Admin"]
  node_customer_profile["Customer Profile<br/>[app.component.ts]"]
  node_customer_orders["Order Tracking<br/>[app.component.ts]"]
  node_admin_tools["Admin Tools<br/>[app.component.ts]"]
end

subgraph group_backend["Firebase and Data"]
  node_firebase_auth["Firebase Auth"]
  node_firestore[("Cloud Firestore")]
  node_firebase_setup["Firebase Setup<br/>[firebase.ts]"]
  node_firebase_config["Firebase Config<br/>[environment.ts]"]
end

node_shopper(("Shopper"))
node_flower_photos["Product Photos"]

node_shopper -->|"uses"| node_storefront_ui
node_storefront_ui -->|"renders"| node_app_controller
node_app_controller -->|"loads catalog"| node_product_catalog
node_app_controller -->|"searches and ranks"| node_product_search
node_product_search -->|"indexes products"| node_product_catalog
node_app_controller -->|"manages cart"| node_cart_checkout
node_cart_checkout -->|"writes orders"| node_firestore
node_app_controller -->|"manages profile"| node_customer_profile
node_customer_profile -->|"reads and writes"| node_firestore
node_app_controller -->|"loads order status"| node_customer_orders
node_customer_orders -->|"listens for orders"| node_firestore
node_app_controller -->|"handles admin tasks"| node_admin_tools
node_admin_tools -->|"manages products and orders"| node_firestore
node_app_controller -->|"signs in and out"| node_firebase_auth
node_app_controller -->|"uses Firebase clients"| node_firebase_setup
node_firebase_setup -->|"loads options"| node_firebase_config
node_storefront_ui -.->|"displays photos"| node_flower_photos

click node_storefront_ui "https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/app.component.html"
click node_app_controller "https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/app.component.ts"
click node_product_catalog "https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/products.ts"
click node_product_search "https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/product-search.ts"
click node_cart_checkout "https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/app.component.ts"
click node_customer_profile "https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/app.component.ts"
click node_customer_orders "https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/app.component.ts"
click node_admin_tools "https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/app.component.ts"
click node_firebase_setup "https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/core/firebase.ts"
click node_firebase_config "https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/environments/environment.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_storefront_ui,node_app_controller toneBlue
class node_product_catalog,node_product_search,node_cart_checkout toneAmber
class node_customer_profile,node_customer_orders,node_admin_tools toneMint
class node_firebase_auth,node_firestore,node_firebase_setup,node_firebase_config toneRose
class node_shopper,node_flower_photos toneIndigo
```

## Components

### Storefront

- [Storefront UI](https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/app.component.html): `src/app/app.component.html`
- [App Controller](https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/app.component.ts): `src/app/app.component.ts`

### Shopping

- [Product Catalog](https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/products.ts): `src/app/products.ts`
- [Product Search](https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/product-search.ts): `src/app/product-search.ts`
- [Cart and Checkout](https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/app.component.ts): `src/app/app.component.ts`

### Accounts and Admin

- [Customer Profile](https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/app.component.ts): `src/app/app.component.ts`
- [Order Tracking](https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/app.component.ts): `src/app/app.component.ts`
- [Admin Tools](https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/app.component.ts): `src/app/app.component.ts`

### Firebase and Data

- **Firebase Auth**
- **Cloud Firestore**
- [Firebase Setup](https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/app/core/firebase.ts): `src/app/core/firebase.ts`
- [Firebase Config](https://github.com/cpemistal-debug/cdlem-flower-shop/blob/main/src/environments/environment.ts): `src/environments/environment.ts`

### Other components

- **Shopper**
- **Product Photos**

## Connections

- Shopper → Storefront UI: uses (evidence: `README.md`)
- Storefront UI → App Controller: renders (evidence: `src/app/app.component.ts`)
- App Controller → Product Catalog: loads catalog (evidence: `src/app/app.component.ts`)
- App Controller → Product Search: searches and ranks (evidence: `src/app/app.component.ts`)
- Product Search → Product Catalog: indexes products (evidence: `src/app/product-search.ts`)
- App Controller → Cart and Checkout: manages cart (evidence: `src/app/app.component.ts`)
- Cart and Checkout → Cloud Firestore: writes orders (evidence: `src/app/app.component.ts`)
- App Controller → Customer Profile: manages profile (evidence: `src/app/app.component.ts`)
- Customer Profile → Cloud Firestore: reads and writes (evidence: `src/app/app.component.ts`)
- App Controller → Order Tracking: loads order status (evidence: `src/app/app.component.ts`)
- Order Tracking → Cloud Firestore: listens for orders (evidence: `src/app/app.component.ts`)
- App Controller → Admin Tools: handles admin tasks (evidence: `src/app/app.component.ts`)
- Admin Tools → Cloud Firestore: manages products and orders (evidence: `src/app/app.component.ts`)
- App Controller → Firebase Auth: signs in and out (evidence: `src/app/app.component.ts`)
- App Controller → Firebase Setup: uses Firebase clients (evidence: `src/app/app.component.ts`)
- Firebase Setup → Firebase Config: loads options (evidence: `src/app/core/firebase.ts`)
- Storefront UI → Product Photos: displays photos (evidence: `README.md`)
