# albertlivingstan/sasher architecture

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

- Interactive diagram: https://gitdiagram.com/albertlivingstan/sasher
- Repository: https://github.com/albertlivingstan/sasher

## Overview

SASHER is a fashion commerce and product-discovery application with gaze-aware adaptation, account/order features, and research and analytics views. The visible user journey enters through the app shell, discovers products, and can move toward product detail and checkout; account, support, tracking, and return experiences extend that journey. Gaze tracking, AI assistance, and product research are distinct capabilities. The README is empty, and several service and component implementations were not sampled, so uncertain wiring is omitted.

Main entry points: [`src/App.tsx`](https://github.com/albertlivingstan/sasher/blob/main/src/App.tsx) (App Shell), [`src/context/SasherContext.tsx`](https://github.com/albertlivingstan/sasher/blob/main/src/context/SasherContext.tsx) (Commerce State), [`src/services/eyeTracker.ts`](https://github.com/albertlivingstan/sasher/blob/main/src/services/eyeTracker.ts) (Gaze Tracker), [`src/services/assistantService.ts`](https://github.com/albertlivingstan/sasher/blob/main/src/services/assistantService.ts) (Assistant Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_app["App Shell<br/>[App.tsx]"]
  node_state["Commerce State<br/>[SasherContext.tsx]"]
end

subgraph group_commerce["Fashion Commerce"]
  node_nav["Navigation<br/>[Navbar.tsx]"]
  node_catalog["Product Catalog<br/>[ProductGrid.tsx]"]
  node_product["Product Detail"]
  node_cart["Cart Drawer<br/>[CartDrawer.tsx]"]
  node_checkout["Checkout<br/>[CheckoutModal.tsx]"]
  node_orders["Order History<br/>[OrderHistory.tsx]"]
  node_returns["Returns"]
  node_tracking["Order Tracking"]
  node_support["Customer Support"]
  node_products["Product Data<br/>[products.ts]"]
end

subgraph group_gaze["Gaze Adaptation"]
  node_intent["Session Intent"]
  node_adaptation["Live Adaptation"]
  node_gazeview["Gaze Studio"]
  node_tracker["Gaze Tracker<br/>[eyeTracker.ts]"]
  node_engine["Gaze Engine"]
  node_assistant["Fashion Assistant"]
  node_assistantservice["Assistant Service"]
end

subgraph group_insights["Research Analytics"]
  node_research["Research Dashboard"]
  node_deepresearch["Product Research"]
  node_analytics["Platform Analytics"]
  node_evaluation["Evaluation Analytics"]
  node_insightsview["AI Insights<br/>[AiInsightsView.tsx]"]
end

subgraph group_platform["Identity Services"]
  node_auth["Auth Context<br/>[AuthContext.tsx]"]
  node_storage["Firestore Storage"]
  node_orderservice["Order Service<br/>[orderService.ts]"]
end

node_shopper(("Shopper"))
node_gemini["Gemini API"]
node_firestore[("Firestore")]

node_shopper -->|"uses"| node_app
node_app -->|"reads state"| node_state
node_app -->|"renders"| node_nav
node_app -->|"renders"| node_catalog
node_app -->|"renders"| node_adaptation
node_app -->|"renders"| node_intent
node_app -->|"routes to"| node_gazeview
node_app -->|"routes to"| node_research
node_app -->|"routes to"| node_analytics
node_app -->|"routes to"| node_evaluation
node_app -->|"routes to"| node_insightsview
node_app -->|"opens"| node_support
node_app -->|"opens"| node_tracking
node_app -->|"opens"| node_returns
node_state -->|"initializes from"| node_products
node_state -->|"starts tracking"| node_tracker
node_tracker -->|"uses"| node_engine
node_assistant -->|"requests answers"| node_assistantservice
node_assistantservice -.->|"calls"| node_gemini
node_research -->|"includes"| node_deepresearch
node_state -->|"saves user data"| node_storage
node_storage -->|"reads and writes"| node_firestore
node_auth -.->|"authenticates with"| node_firestore
node_state -.->|"uses"| node_orderservice

click node_app "https://github.com/albertlivingstan/sasher/blob/main/src/App.tsx"
click node_state "https://github.com/albertlivingstan/sasher/blob/main/src/context/SasherContext.tsx"
click node_nav "https://github.com/albertlivingstan/sasher/blob/main/src/components/navigation/Navbar.tsx"
click node_catalog "https://github.com/albertlivingstan/sasher/blob/main/src/components/product/ProductGrid.tsx"
click node_product "https://github.com/albertlivingstan/sasher/blob/main/src/components/product/ProductDetailModal.tsx"
click node_cart "https://github.com/albertlivingstan/sasher/blob/main/src/components/navigation/CartDrawer.tsx"
click node_checkout "https://github.com/albertlivingstan/sasher/blob/main/src/components/checkout/CheckoutModal.tsx"
click node_orders "https://github.com/albertlivingstan/sasher/blob/main/src/components/account/OrderHistory.tsx"
click node_returns "https://github.com/albertlivingstan/sasher/blob/main/src/components/returns/OrderReturnModal.tsx"
click node_tracking "https://github.com/albertlivingstan/sasher/blob/main/src/components/shipping/OrderTrackingModal.tsx"
click node_support "https://github.com/albertlivingstan/sasher/blob/main/src/components/support/CustomerSupportModal.tsx"
click node_products "https://github.com/albertlivingstan/sasher/blob/main/src/data/products.ts"
click node_intent "https://github.com/albertlivingstan/sasher/blob/main/src/components/session/SessionIntentWidget.tsx"
click node_adaptation "https://github.com/albertlivingstan/sasher/blob/main/src/components/session/LiveAdaptationDemo.tsx"
click node_gazeview "https://github.com/albertlivingstan/sasher/blob/main/src/components/eyetracking/GazeTrackingStudioView.tsx"
click node_tracker "https://github.com/albertlivingstan/sasher/blob/main/src/services/eyeTracker.ts"
click node_engine "https://github.com/albertlivingstan/sasher/blob/main/src/services/gazeTrackingEngine.ts"
click node_assistant "https://github.com/albertlivingstan/sasher/blob/main/src/components/assistant/FashionAssistantChatbot.tsx"
click node_assistantservice "https://github.com/albertlivingstan/sasher/blob/main/src/services/assistantService.ts"
click node_research "https://github.com/albertlivingstan/sasher/blob/main/src/components/research/ResearchDashboardView.tsx"
click node_deepresearch "https://github.com/albertlivingstan/sasher/blob/main/src/components/research/ProductDeepResearchSection.tsx"
click node_analytics "https://github.com/albertlivingstan/sasher/blob/main/src/components/analytics/PlatformAnalyticsView.tsx"
click node_evaluation "https://github.com/albertlivingstan/sasher/blob/main/src/components/analytics/EvaluationAnalyticsView.tsx"
click node_insightsview "https://github.com/albertlivingstan/sasher/blob/main/src/components/insights/AiInsightsView.tsx"
click node_auth "https://github.com/albertlivingstan/sasher/blob/main/src/context/AuthContext.tsx"
click node_storage "https://github.com/albertlivingstan/sasher/blob/main/src/services/firestoreStorage.ts"
click node_orderservice "https://github.com/albertlivingstan/sasher/blob/main/src/services/orderService.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_state toneBlue
class node_nav,node_catalog,node_product,node_cart,node_checkout,node_orders,node_returns,node_tracking,node_support,node_products,node_firestore toneAmber
class node_intent,node_adaptation,node_gazeview,node_tracker,node_engine,node_assistant,node_assistantservice,node_gemini toneMint
class node_research,node_deepresearch,node_analytics,node_evaluation,node_insightsview toneRose
class node_auth,node_storage,node_orderservice,node_shopper toneIndigo
```

## Components

### Application

- [App Shell](https://github.com/albertlivingstan/sasher/blob/main/src/App.tsx): `src/App.tsx`
- [Commerce State](https://github.com/albertlivingstan/sasher/blob/main/src/context/SasherContext.tsx): `src/context/SasherContext.tsx`

### Fashion Commerce

- [Navigation](https://github.com/albertlivingstan/sasher/blob/main/src/components/navigation/Navbar.tsx): `src/components/navigation/Navbar.tsx`
- [Product Catalog](https://github.com/albertlivingstan/sasher/blob/main/src/components/product/ProductGrid.tsx): `src/components/product/ProductGrid.tsx`
- [Product Detail](https://github.com/albertlivingstan/sasher/blob/main/src/components/product/ProductDetailModal.tsx): `src/components/product/ProductDetailModal.tsx`
- [Cart Drawer](https://github.com/albertlivingstan/sasher/blob/main/src/components/navigation/CartDrawer.tsx): `src/components/navigation/CartDrawer.tsx`
- [Checkout](https://github.com/albertlivingstan/sasher/blob/main/src/components/checkout/CheckoutModal.tsx): `src/components/checkout/CheckoutModal.tsx`
- [Order History](https://github.com/albertlivingstan/sasher/blob/main/src/components/account/OrderHistory.tsx): `src/components/account/OrderHistory.tsx`
- [Returns](https://github.com/albertlivingstan/sasher/blob/main/src/components/returns/OrderReturnModal.tsx): `src/components/returns/OrderReturnModal.tsx`
- [Order Tracking](https://github.com/albertlivingstan/sasher/blob/main/src/components/shipping/OrderTrackingModal.tsx): `src/components/shipping/OrderTrackingModal.tsx`
- [Customer Support](https://github.com/albertlivingstan/sasher/blob/main/src/components/support/CustomerSupportModal.tsx): `src/components/support/CustomerSupportModal.tsx`
- [Product Data](https://github.com/albertlivingstan/sasher/blob/main/src/data/products.ts): `src/data/products.ts`

### Gaze Adaptation

- [Session Intent](https://github.com/albertlivingstan/sasher/blob/main/src/components/session/SessionIntentWidget.tsx): `src/components/session/SessionIntentWidget.tsx`
- [Live Adaptation](https://github.com/albertlivingstan/sasher/blob/main/src/components/session/LiveAdaptationDemo.tsx): `src/components/session/LiveAdaptationDemo.tsx`
- [Gaze Studio](https://github.com/albertlivingstan/sasher/blob/main/src/components/eyetracking/GazeTrackingStudioView.tsx): `src/components/eyetracking/GazeTrackingStudioView.tsx`
- [Gaze Tracker](https://github.com/albertlivingstan/sasher/blob/main/src/services/eyeTracker.ts): `src/services/eyeTracker.ts`
- [Gaze Engine](https://github.com/albertlivingstan/sasher/blob/main/src/services/gazeTrackingEngine.ts): `src/services/gazeTrackingEngine.ts`
- [Fashion Assistant](https://github.com/albertlivingstan/sasher/blob/main/src/components/assistant/FashionAssistantChatbot.tsx): `src/components/assistant/FashionAssistantChatbot.tsx`
- [Assistant Service](https://github.com/albertlivingstan/sasher/blob/main/src/services/assistantService.ts): `src/services/assistantService.ts`

### Research Analytics

- [Research Dashboard](https://github.com/albertlivingstan/sasher/blob/main/src/components/research/ResearchDashboardView.tsx): `src/components/research/ResearchDashboardView.tsx`
- [Product Research](https://github.com/albertlivingstan/sasher/blob/main/src/components/research/ProductDeepResearchSection.tsx): `src/components/research/ProductDeepResearchSection.tsx`
- [Platform Analytics](https://github.com/albertlivingstan/sasher/blob/main/src/components/analytics/PlatformAnalyticsView.tsx): `src/components/analytics/PlatformAnalyticsView.tsx`
- [Evaluation Analytics](https://github.com/albertlivingstan/sasher/blob/main/src/components/analytics/EvaluationAnalyticsView.tsx): `src/components/analytics/EvaluationAnalyticsView.tsx`
- [AI Insights](https://github.com/albertlivingstan/sasher/blob/main/src/components/insights/AiInsightsView.tsx): `src/components/insights/AiInsightsView.tsx`

### Identity Services

- [Auth Context](https://github.com/albertlivingstan/sasher/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Firestore Storage](https://github.com/albertlivingstan/sasher/blob/main/src/services/firestoreStorage.ts): `src/services/firestoreStorage.ts`
- [Order Service](https://github.com/albertlivingstan/sasher/blob/main/src/services/orderService.ts): `src/services/orderService.ts`

### Other components

- **Shopper**
- **Gemini API**
- **Firestore**

## Connections

- Shopper → App Shell: uses
- App Shell → Commerce State: reads state
- App Shell → Navigation: renders
- App Shell → Product Catalog: renders
- App Shell → Live Adaptation: renders
- App Shell → Session Intent: renders
- App Shell → Gaze Studio: routes to
- App Shell → Research Dashboard: routes to
- App Shell → Platform Analytics: routes to
- App Shell → Evaluation Analytics: routes to
- App Shell → AI Insights: routes to
- App Shell → Customer Support: opens
- App Shell → Order Tracking: opens
- App Shell → Returns: opens
- Commerce State → Product Data: initializes from
- Commerce State → Gaze Tracker: starts tracking
- Gaze Tracker → Gaze Engine: uses
- Fashion Assistant → Assistant Service: requests answers
- Assistant Service → Gemini API: calls
- Research Dashboard → Product Research: includes
- Commerce State → Firestore Storage: saves user data
- Firestore Storage → Firestore: reads and writes
- Auth Context → Firestore: authenticates with
- Commerce State → Order Service: uses
