# deviceuser57-tech/zoos2 architecture

> Architecture diagram of the GitHub repository deviceuser57-tech/zoos2, 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/deviceuser57-tech/zoos2
- Repository: https://github.com/deviceuser57-tech/zoos2

## Overview

Zoos Electronics is a bilingual smart-electronics storefront with operational tools for catalog management, inventory, point-of-sale, and dropshipping. The main customer journey is browsing and comparing products, adding items to a cart, checking out, then tracking the order; the shared store context holds the application state behind those screens. Separate staff workflows cover administration, AI-assisted product work, supplier operations, and in-store sales. The README is empty, so capability coverage comes from the source index and visible UI excerpts; links for unsampled implementations are omitted rather than inferred.

Main entry points: [`src/App.tsx`](https://github.com/deviceuser57-tech/zoos2/blob/main/src/App.tsx) (Application Shell), [`src/context/StoreContext.tsx`](https://github.com/deviceuser57-tech/zoos2/blob/main/src/context/StoreContext.tsx) (Store State), [`src/components/DropshipOpsPortal.tsx`](https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/DropshipOpsPortal.tsx) (Dropship Operations), [`src/components/CartDrawer.tsx`](https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/CartDrawer.tsx) (Cart)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_app["Application Shell<br/>[App.tsx]"]
  node_catalog["Product Catalog<br/>[ProductCard.tsx]"]
  node_product_detail["Product Details"]
  node_comparison["Product Comparison"]
  node_compatibility["Compatibility Finder"]
  node_wishlist["Wishlist<br/>[WishlistDrawer.tsx]"]
end

subgraph group_commerce["Commerce Operations"]
  node_cart["Cart<br/>[CartDrawer.tsx]"]
  node_checkout["Checkout<br/>[CheckoutModal.tsx]"]
  node_secure_checkout["Secure Checkout"]
  node_order_tracking["Order Tracking"]
  node_pos["Point of Sale"]
  node_pos_receipt["POS Receipt<br/>[PosReceipt.tsx]"]
  node_outbox["Order Outbox Worker"]
end

subgraph group_staff["Staff Tools"]
  node_admin["Admin Portal<br/>[AdminPortal.tsx]"]
  node_bi["Business Dashboard<br/>[BIDashboard.tsx]"]
  node_dropship["Dropship Operations"]
  node_stock_alerts["Stock Alerts"]
  node_ai_studio["AI Product Studio"]
  node_ai_import["AI Product Import"]
  node_ai_refiner["AI Product Refiner"]
end

subgraph group_foundation["Shared Foundation"]
  node_store_state["Store State<br/>[StoreContext.tsx]"]
  node_product_data[("Product Seed Data<br/>[mockProducts.ts]")]
  node_local_storage["Browser Storage<br/>[useLocalStorage.ts]"]
  node_atomic_reserve["Atomic Reservation<br/>[AtomicReserve.ts]"]
end

node_customer(("Customer"))

node_customer -->|"browses"| node_app
node_app -->|"renders"| node_catalog
node_app -->|"renders"| node_comparison
node_app -->|"renders"| node_cart
node_app -->|"renders"| node_order_tracking
node_app -->|"renders"| node_admin
node_app -->|"renders"| node_dropship
node_app -->|"renders"| node_wishlist
node_app -->|"renders"| node_pos
node_app -->|"renders"| node_ai_studio
node_app -->|"renders"| node_compatibility
node_cart -->|"opens"| node_checkout
node_checkout -->|"delegates to"| node_secure_checkout
node_pos -->|"renders"| node_pos_receipt
node_admin -->|"renders"| node_bi
node_dropship -->|"renders"| node_stock_alerts
node_dropship -->|"uses"| node_ai_refiner
node_ai_studio -->|"uses"| node_ai_import
node_ai_studio -->|"uses"| node_ai_refiner
node_store_state -->|"persists via"| node_local_storage
node_store_state -->|"initializes from"| node_product_data
node_store_state -->|"reserves with"| node_atomic_reserve
node_checkout -->|"reads and updates"| node_store_state
node_cart -->|"reads and updates"| node_store_state
node_order_tracking -->|"reads"| node_store_state
node_admin -->|"reads and updates"| node_store_state
node_dropship -->|"reads and updates"| node_store_state
node_stock_alerts -->|"reads"| node_store_state
node_bi -->|"reads"| node_store_state
node_outbox -->|"processes events via"| node_store_state

click node_app "https://github.com/deviceuser57-tech/zoos2/blob/main/src/App.tsx"
click node_catalog "https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/ProductCard.tsx"
click node_product_detail "https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/ProductDetailModal.tsx"
click node_comparison "https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/ProductComparisonModal.tsx"
click node_compatibility "https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/CompatibilityFinder.tsx"
click node_wishlist "https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/WishlistDrawer.tsx"
click node_cart "https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/CartDrawer.tsx"
click node_checkout "https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/CheckoutModal.tsx"
click node_secure_checkout "https://github.com/deviceuser57-tech/zoos2/blob/main/src/utils/SecureCheckoutProcessor.ts"
click node_order_tracking "https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/OrderTrackingView.tsx"
click node_pos "https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/PosRegisterModal.tsx"
click node_pos_receipt "https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/PosReceipt.tsx"
click node_outbox "https://github.com/deviceuser57-tech/zoos2/blob/main/src/hooks/useOrderOutboxProcessor.ts"
click node_admin "https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/AdminPortal.tsx"
click node_bi "https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/BIDashboard.tsx"
click node_dropship "https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/DropshipOpsPortal.tsx"
click node_stock_alerts "https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/StockAlertManager.tsx"
click node_ai_studio "https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/AiImageStudioModal.tsx"
click node_ai_import "https://github.com/deviceuser57-tech/zoos2/blob/main/src/utils/AiProductImportProcessor.ts"
click node_ai_refiner "https://github.com/deviceuser57-tech/zoos2/blob/main/src/utils/AiProductRefiner.ts"
click node_store_state "https://github.com/deviceuser57-tech/zoos2/blob/main/src/context/StoreContext.tsx"
click node_product_data "https://github.com/deviceuser57-tech/zoos2/blob/main/src/data/mockProducts.ts"
click node_local_storage "https://github.com/deviceuser57-tech/zoos2/blob/main/src/hooks/useLocalStorage.ts"
click node_atomic_reserve "https://github.com/deviceuser57-tech/zoos2/blob/main/src/utils/AtomicReserve.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_catalog,node_product_detail,node_comparison,node_compatibility,node_wishlist toneBlue
class node_cart,node_checkout,node_secure_checkout,node_order_tracking,node_pos,node_pos_receipt,node_outbox toneAmber
class node_admin,node_bi,node_dropship,node_stock_alerts,node_ai_studio,node_ai_import,node_ai_refiner toneMint
class node_store_state,node_product_data,node_local_storage,node_atomic_reserve toneRose
class node_customer toneIndigo
```

## Components

### Storefront

- [Application Shell](https://github.com/deviceuser57-tech/zoos2/blob/main/src/App.tsx): `src/App.tsx`
- [Product Catalog](https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/ProductCard.tsx): `src/components/ProductCard.tsx`
- [Product Details](https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/ProductDetailModal.tsx): `src/components/ProductDetailModal.tsx`
- [Product Comparison](https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/ProductComparisonModal.tsx): `src/components/ProductComparisonModal.tsx`
- [Compatibility Finder](https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/CompatibilityFinder.tsx): `src/components/CompatibilityFinder.tsx`
- [Wishlist](https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/WishlistDrawer.tsx): `src/components/WishlistDrawer.tsx`

### Commerce Operations

- [Cart](https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/CartDrawer.tsx): `src/components/CartDrawer.tsx`
- [Checkout](https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/CheckoutModal.tsx): `src/components/CheckoutModal.tsx`
- [Secure Checkout](https://github.com/deviceuser57-tech/zoos2/blob/main/src/utils/SecureCheckoutProcessor.ts): `src/utils/SecureCheckoutProcessor.ts`
- [Order Tracking](https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/OrderTrackingView.tsx): `src/components/OrderTrackingView.tsx`
- [Point of Sale](https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/PosRegisterModal.tsx): `src/components/PosRegisterModal.tsx`
- [POS Receipt](https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/PosReceipt.tsx): `src/components/PosReceipt.tsx`
- [Order Outbox Worker](https://github.com/deviceuser57-tech/zoos2/blob/main/src/hooks/useOrderOutboxProcessor.ts): `src/hooks/useOrderOutboxProcessor.ts`

### Staff Tools

- [Admin Portal](https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/AdminPortal.tsx): `src/components/AdminPortal.tsx`
- [Business Dashboard](https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/BIDashboard.tsx): `src/components/BIDashboard.tsx`
- [Dropship Operations](https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/DropshipOpsPortal.tsx): `src/components/DropshipOpsPortal.tsx`
- [Stock Alerts](https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/StockAlertManager.tsx): `src/components/StockAlertManager.tsx`
- [AI Product Studio](https://github.com/deviceuser57-tech/zoos2/blob/main/src/components/AiImageStudioModal.tsx): `src/components/AiImageStudioModal.tsx`
- [AI Product Import](https://github.com/deviceuser57-tech/zoos2/blob/main/src/utils/AiProductImportProcessor.ts): `src/utils/AiProductImportProcessor.ts`
- [AI Product Refiner](https://github.com/deviceuser57-tech/zoos2/blob/main/src/utils/AiProductRefiner.ts): `src/utils/AiProductRefiner.ts`

### Shared Foundation

- [Store State](https://github.com/deviceuser57-tech/zoos2/blob/main/src/context/StoreContext.tsx): `src/context/StoreContext.tsx`
- [Product Seed Data](https://github.com/deviceuser57-tech/zoos2/blob/main/src/data/mockProducts.ts): `src/data/mockProducts.ts`
- [Browser Storage](https://github.com/deviceuser57-tech/zoos2/blob/main/src/hooks/useLocalStorage.ts): `src/hooks/useLocalStorage.ts`
- [Atomic Reservation](https://github.com/deviceuser57-tech/zoos2/blob/main/src/utils/AtomicReserve.ts): `src/utils/AtomicReserve.ts`

### Other components

- **Customer**

## Connections

- Customer → Application Shell: browses
- Application Shell → Product Catalog: renders (evidence: `src/App.tsx`)
- Application Shell → Product Comparison: renders (evidence: `src/App.tsx`)
- Application Shell → Cart: renders (evidence: `src/App.tsx`)
- Application Shell → Order Tracking: renders (evidence: `src/App.tsx`)
- Application Shell → Admin Portal: renders (evidence: `src/App.tsx`)
- Application Shell → Dropship Operations: renders (evidence: `src/App.tsx`)
- Application Shell → Wishlist: renders (evidence: `src/App.tsx`)
- Application Shell → Point of Sale: renders (evidence: `src/App.tsx`)
- Application Shell → AI Product Studio: renders (evidence: `src/App.tsx`)
- Application Shell → Compatibility Finder: renders (evidence: `src/App.tsx`)
- Cart → Checkout: opens (evidence: `src/components/CartDrawer.tsx`)
- Checkout → Secure Checkout: delegates to (evidence: `src/components/CheckoutModal.tsx`)
- Point of Sale → POS Receipt: renders (evidence: `src/components/PosRegisterModal.tsx`)
- Admin Portal → Business Dashboard: renders (evidence: `src/components/AdminPortal.tsx`)
- Dropship Operations → Stock Alerts: renders (evidence: `src/components/DropshipOpsPortal.tsx`)
- Dropship Operations → AI Product Refiner: uses (evidence: `src/components/DropshipOpsPortal.tsx`)
- AI Product Studio → AI Product Import: uses (evidence: `src/components/AiImageStudioModal.tsx`)
- AI Product Studio → AI Product Refiner: uses (evidence: `src/components/AiImageStudioModal.tsx`)
- Store State → Browser Storage: persists via (evidence: `src/context/StoreContext.tsx`)
- Store State → Product Seed Data: initializes from (evidence: `src/context/StoreContext.tsx`)
- Store State → Atomic Reservation: reserves with (evidence: `src/context/StoreContext.tsx`)
- Checkout → Store State: reads and updates (evidence: `src/components/CheckoutModal.tsx`)
- Cart → Store State: reads and updates (evidence: `src/components/CartDrawer.tsx`)
- Order Tracking → Store State: reads (evidence: `src/components/OrderTrackingView.tsx`)
- Admin Portal → Store State: reads and updates (evidence: `src/components/AdminPortal.tsx`)
- Dropship Operations → Store State: reads and updates (evidence: `src/components/DropshipOpsPortal.tsx`)
- Stock Alerts → Store State: reads (evidence: `src/components/StockAlertManager.tsx`)
- Business Dashboard → Store State: reads (evidence: `src/components/BIDashboard.tsx`)
- Order Outbox Worker → Store State: processes events via (evidence: `src/hooks/useOrderOutboxProcessor.ts`)
