# owshuhnee/eldr architecture

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

- Interactive diagram: https://gitdiagram.com/owshuhnee/eldr
- Repository: https://github.com/owshuhnee/eldr

## Overview

ELDR is an accessible marketplace for older adults and caregivers. The main journey is browsing and filtering verified products, adding items to a cart, checking out, and viewing order history; account, onboarding, caregiver linking, reviews, wishlists, and administration are supporting capabilities. The graph distinguishes frontend pages, Flask route handlers, shared persistence, and accessibility UI. Several page-to-endpoint relationships are documented by fetch calls; other unsampled integrations are omitted rather than inferred.

Main entry points: [`backend/app/__init__.py`](https://github.com/owshuhnee/eldr/blob/main/backend/app/__init__.py) (Flask app and blueprints), [`backend/app/db.py`](https://github.com/owshuhnee/eldr/blob/main/backend/app/db.py) (Database sessions), [`backend/app/models.py`](https://github.com/owshuhnee/eldr/blob/main/backend/app/models.py) (Marketplace models), [`backend/app/routes/orders.py`](https://github.com/owshuhnee/eldr/blob/main/backend/app/routes/orders.py) (Order operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Marketplace frontend"]
  node_browse["Browse products<br/>[page.tsx]"]
  node_filter["Need filtering<br/>[filterProducts.ts]"]
  node_product["Product detail<br/>[page.tsx]"]
  node_cartpage["Cart<br/>[page.tsx]"]
  node_checkout["Checkout<br/>[page.tsx]"]
  node_orderspage["Order history<br/>[page.tsx]"]
  node_confirm["Order confirmation<br/>[page.tsx]"]
  node_account["Account and auth<br/>[page.tsx]"]
  node_onboardpage["Guided onboarding<br/>[page.tsx]"]
  node_carepage["Caregiver links<br/>[page.tsx]"]
  node_wishpage["Wishlist<br/>[page.tsx]"]
  node_reviewsui["Product reviews<br/>[ReviewsSection.tsx]"]
  node_adminpage["Admin console<br/>[page.tsx]"]
end

subgraph group_api["Flask API"]
  node_app["Flask app and blueprints<br/>[__init__.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_products["Product catalog<br/>[products.py]"]
  node_cartapi["Cart operations<br/>[cart.py]"]
  node_orders["Order operations<br/>[orders.py]"]
  node_onboarding["Onboarding data<br/>[onboarding.py]"]
  node_caregiver["Caregiver linking<br/>[caregiver.py]"]
  node_wishlist["Wishlist operations<br/>[wishlist.py]"]
  node_reviews["Review operations<br/>[reviews.py]"]
  node_admin["Administration<br/>[admin.py]"]
end

subgraph group_data["Persistence"]
  node_models["Marketplace models<br/>[models.py]"]
  node_dbsession["Database sessions<br/>[db.py]"]
  node_postgres[("PostgreSQL database")]
end

subgraph group_access["Accessible experience"]
  node_layout["Application layout<br/>[layout.tsx]"]
  node_a11y["Accessibility settings"]
  node_navbar["Navigation and toggle<br/>[Navbar.tsx]"]
  node_toggle["Accessibility toggle"]
end

node_shopper(("Shopper or caregiver"))

node_shopper -->|"browses"| node_browse
node_browse -->|"fetches catalog"| node_products
node_browse -->|"filters products"| node_filter
node_shopper -->|"shops"| node_cartpage
node_cartpage -->|"requests cart"| node_cartapi
node_shopper -->|"checks out"| node_checkout
node_checkout -.->|"submits order"| node_orders
node_orderspage -->|"fetches history"| node_orders
node_shopper -->|"views orders"| node_orderspage
node_shopper -->|"creates account"| node_account
node_account -.->|"authenticates"| node_auth
node_shopper -->|"personalizes"| node_onboardpage
node_onboardpage -.->|"saves preferences"| node_onboarding
node_carepage -->|"requests links"| node_caregiver
node_shopper -->|"links accounts"| node_carepage
node_shopper -->|"saves products"| node_wishpage
node_wishpage -.->|"manages wishlist"| node_wishlist
node_product -.->|"shows reviews"| node_reviewsui
node_reviewsui -.->|"loads reviews"| node_reviews
node_adminpage -.->|"manages listings"| node_admin
node_app -->|"registers blueprint"| node_auth
node_app -->|"registers blueprint"| node_products
node_app -->|"registers blueprint"| node_cartapi
node_app -->|"registers blueprint"| node_orders
node_app -->|"registers blueprint"| node_onboarding
node_app -->|"registers blueprint"| node_caregiver
node_app -->|"registers blueprint"| node_wishlist
node_app -->|"registers blueprint"| node_reviews
node_app -->|"registers blueprint"| node_admin
node_products -->|"opens sessions"| node_dbsession
node_products -->|"queries products"| node_models
node_cartapi -->|"opens sessions"| node_dbsession
node_cartapi -->|"queries cart items"| node_models
node_orders -->|"opens sessions"| node_dbsession
node_orders -->|"queries orders"| node_models
node_caregiver -->|"opens sessions"| node_dbsession
node_caregiver -->|"queries links"| node_models
node_reviews -->|"opens sessions"| node_dbsession
node_reviews -->|"queries reviews"| node_models
node_dbsession -->|"connects to"| node_postgres
node_models -->|"uses base"| node_dbsession
node_layout -->|"provides context"| node_a11y
node_navbar -->|"renders toggle"| node_toggle
node_shopper -.->|"uses navigation"| node_navbar

click node_browse "https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/page.tsx"
click node_filter "https://github.com/owshuhnee/eldr/blob/main/frontend/src/lib/filterProducts.ts"
click node_product "https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/product/%5Bid%5D/page.tsx"
click node_cartpage "https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/cart/page.tsx"
click node_checkout "https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/checkout/page.tsx"
click node_orderspage "https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/orders/page.tsx"
click node_confirm "https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/order-confirmation/page.tsx"
click node_account "https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/account/page.tsx"
click node_onboardpage "https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/onboarding/page.tsx"
click node_carepage "https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/caregiver/page.tsx"
click node_wishpage "https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/wishlist/page.tsx"
click node_reviewsui "https://github.com/owshuhnee/eldr/blob/main/frontend/src/components/ui/ReviewsSection.tsx"
click node_adminpage "https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/admin/page.tsx"
click node_app "https://github.com/owshuhnee/eldr/blob/main/backend/app/__init__.py"
click node_auth "https://github.com/owshuhnee/eldr/blob/main/backend/app/routes/auth.py"
click node_products "https://github.com/owshuhnee/eldr/blob/main/backend/app/routes/products.py"
click node_cartapi "https://github.com/owshuhnee/eldr/blob/main/backend/app/routes/cart.py"
click node_orders "https://github.com/owshuhnee/eldr/blob/main/backend/app/routes/orders.py"
click node_onboarding "https://github.com/owshuhnee/eldr/blob/main/backend/app/routes/onboarding.py"
click node_caregiver "https://github.com/owshuhnee/eldr/blob/main/backend/app/routes/caregiver.py"
click node_wishlist "https://github.com/owshuhnee/eldr/blob/main/backend/app/routes/wishlist.py"
click node_reviews "https://github.com/owshuhnee/eldr/blob/main/backend/app/routes/reviews.py"
click node_admin "https://github.com/owshuhnee/eldr/blob/main/backend/app/routes/admin.py"
click node_models "https://github.com/owshuhnee/eldr/blob/main/backend/app/models.py"
click node_dbsession "https://github.com/owshuhnee/eldr/blob/main/backend/app/db.py"
click node_layout "https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/layout.tsx"
click node_a11y "https://github.com/owshuhnee/eldr/blob/main/frontend/src/context/AccessibilityContext.tsx"
click node_navbar "https://github.com/owshuhnee/eldr/blob/main/frontend/src/components/ui/Navbar.tsx"
click node_toggle "https://github.com/owshuhnee/eldr/blob/main/frontend/src/components/ui/AccessibilityToggle.tsx"

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_browse,node_filter,node_product,node_cartpage,node_checkout,node_orderspage,node_confirm,node_account,node_onboardpage,node_carepage,node_wishpage,node_reviewsui,node_adminpage toneBlue
class node_app,node_auth,node_products,node_cartapi,node_orders,node_onboarding,node_caregiver,node_wishlist,node_reviews,node_admin toneAmber
class node_models,node_dbsession,node_postgres toneMint
class node_layout,node_a11y,node_navbar,node_toggle toneRose
class node_shopper toneIndigo
```

## Components

### Marketplace frontend

- [Browse products](https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/page.tsx): `frontend/src/app/page.tsx`
- [Need filtering](https://github.com/owshuhnee/eldr/blob/main/frontend/src/lib/filterProducts.ts): `frontend/src/lib/filterProducts.ts`
- [Product detail](https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/product/%5Bid%5D/page.tsx): `frontend/src/app/product/[id]/page.tsx`
- [Cart](https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/cart/page.tsx): `frontend/src/app/cart/page.tsx`
- [Checkout](https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/checkout/page.tsx): `frontend/src/app/checkout/page.tsx`
- [Order history](https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/orders/page.tsx): `frontend/src/app/orders/page.tsx`
- [Order confirmation](https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/order-confirmation/page.tsx): `frontend/src/app/order-confirmation/page.tsx`
- [Account and auth](https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/account/page.tsx): `frontend/src/app/account/page.tsx`
- [Guided onboarding](https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/onboarding/page.tsx): `frontend/src/app/onboarding/page.tsx`
- [Caregiver links](https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/caregiver/page.tsx): `frontend/src/app/caregiver/page.tsx`
- [Wishlist](https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/wishlist/page.tsx): `frontend/src/app/wishlist/page.tsx`
- [Product reviews](https://github.com/owshuhnee/eldr/blob/main/frontend/src/components/ui/ReviewsSection.tsx): `frontend/src/components/ui/ReviewsSection.tsx`
- [Admin console](https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/admin/page.tsx): `frontend/src/app/admin/page.tsx`

### Flask API

- [Flask app and blueprints](https://github.com/owshuhnee/eldr/blob/main/backend/app/__init__.py): `backend/app/__init__.py`
- [Authentication](https://github.com/owshuhnee/eldr/blob/main/backend/app/routes/auth.py): `backend/app/routes/auth.py`
- [Product catalog](https://github.com/owshuhnee/eldr/blob/main/backend/app/routes/products.py): `backend/app/routes/products.py`
- [Cart operations](https://github.com/owshuhnee/eldr/blob/main/backend/app/routes/cart.py): `backend/app/routes/cart.py`
- [Order operations](https://github.com/owshuhnee/eldr/blob/main/backend/app/routes/orders.py): `backend/app/routes/orders.py`
- [Onboarding data](https://github.com/owshuhnee/eldr/blob/main/backend/app/routes/onboarding.py): `backend/app/routes/onboarding.py`
- [Caregiver linking](https://github.com/owshuhnee/eldr/blob/main/backend/app/routes/caregiver.py): `backend/app/routes/caregiver.py`
- [Wishlist operations](https://github.com/owshuhnee/eldr/blob/main/backend/app/routes/wishlist.py): `backend/app/routes/wishlist.py`
- [Review operations](https://github.com/owshuhnee/eldr/blob/main/backend/app/routes/reviews.py): `backend/app/routes/reviews.py`
- [Administration](https://github.com/owshuhnee/eldr/blob/main/backend/app/routes/admin.py): `backend/app/routes/admin.py`

### Persistence

- [Marketplace models](https://github.com/owshuhnee/eldr/blob/main/backend/app/models.py): `backend/app/models.py`
- [Database sessions](https://github.com/owshuhnee/eldr/blob/main/backend/app/db.py): `backend/app/db.py`
- **PostgreSQL database**

### Accessible experience

- [Application layout](https://github.com/owshuhnee/eldr/blob/main/frontend/src/app/layout.tsx): `frontend/src/app/layout.tsx`
- [Accessibility settings](https://github.com/owshuhnee/eldr/blob/main/frontend/src/context/AccessibilityContext.tsx): `frontend/src/context/AccessibilityContext.tsx`
- [Navigation and toggle](https://github.com/owshuhnee/eldr/blob/main/frontend/src/components/ui/Navbar.tsx): `frontend/src/components/ui/Navbar.tsx`
- [Accessibility toggle](https://github.com/owshuhnee/eldr/blob/main/frontend/src/components/ui/AccessibilityToggle.tsx): `frontend/src/components/ui/AccessibilityToggle.tsx`

### Other components

- **Shopper or caregiver**

## Connections

- Shopper or caregiver → Browse products: browses (evidence: `README.md`)
- Browse products → Product catalog: fetches catalog (evidence: `frontend/src/app/page.tsx`)
- Browse products → Need filtering: filters products (evidence: `frontend/src/app/page.tsx`)
- Shopper or caregiver → Cart: shops (evidence: `README.md`)
- Cart → Cart operations: requests cart (evidence: `frontend/src/app/cart/page.tsx`)
- Shopper or caregiver → Checkout: checks out (evidence: `README.md`)
- Checkout → Order operations: submits order
- Order history → Order operations: fetches history (evidence: `frontend/src/app/orders/page.tsx`)
- Shopper or caregiver → Order history: views orders (evidence: `README.md`)
- Shopper or caregiver → Account and auth: creates account (evidence: `README.md`)
- Account and auth → Authentication: authenticates
- Shopper or caregiver → Guided onboarding: personalizes (evidence: `README.md`)
- Guided onboarding → Onboarding data: saves preferences
- Caregiver links → Caregiver linking: requests links (evidence: `frontend/src/app/caregiver/page.tsx`)
- Shopper or caregiver → Caregiver links: links accounts (evidence: `README.md`)
- Shopper or caregiver → Wishlist: saves products (evidence: `README.md`)
- Wishlist → Wishlist operations: manages wishlist
- Product detail → Product reviews: shows reviews
- Product reviews → Review operations: loads reviews
- Admin console → Administration: manages listings
- Flask app and blueprints → Authentication: registers blueprint (evidence: `backend/app/__init__.py`)
- Flask app and blueprints → Product catalog: registers blueprint (evidence: `backend/app/__init__.py`)
- Flask app and blueprints → Cart operations: registers blueprint (evidence: `backend/app/__init__.py`)
- Flask app and blueprints → Order operations: registers blueprint (evidence: `backend/app/__init__.py`)
- Flask app and blueprints → Onboarding data: registers blueprint (evidence: `backend/app/__init__.py`)
- Flask app and blueprints → Caregiver linking: registers blueprint (evidence: `backend/app/__init__.py`)
- Flask app and blueprints → Wishlist operations: registers blueprint (evidence: `backend/app/__init__.py`)
- Flask app and blueprints → Review operations: registers blueprint (evidence: `backend/app/__init__.py`)
- Flask app and blueprints → Administration: registers blueprint (evidence: `backend/app/__init__.py`)
- Product catalog → Database sessions: opens sessions (evidence: `backend/app/routes/products.py`)
- Product catalog → Marketplace models: queries products (evidence: `backend/app/routes/products.py`)
- Cart operations → Database sessions: opens sessions (evidence: `backend/app/routes/cart.py`)
- Cart operations → Marketplace models: queries cart items (evidence: `backend/app/routes/cart.py`)
- Order operations → Database sessions: opens sessions (evidence: `backend/app/routes/orders.py`)
- Order operations → Marketplace models: queries orders (evidence: `backend/app/routes/orders.py`)
- Caregiver linking → Database sessions: opens sessions (evidence: `backend/app/routes/caregiver.py`)
- Caregiver linking → Marketplace models: queries links (evidence: `backend/app/routes/caregiver.py`)
- Review operations → Database sessions: opens sessions (evidence: `backend/app/routes/reviews.py`)
- Review operations → Marketplace models: queries reviews (evidence: `backend/app/routes/reviews.py`)
- Database sessions → PostgreSQL database: connects to (evidence: `backend/app/db.py`)
- Marketplace models → Database sessions: uses base (evidence: `backend/app/models.py`)
- Application layout → Accessibility settings: provides context (evidence: `frontend/src/app/layout.tsx`)
- Navigation and toggle → Accessibility toggle: renders toggle (evidence: `frontend/src/components/ui/Navbar.tsx`)
- Shopper or caregiver → Navigation and toggle: uses navigation
