# shoaib20455/eligo-leather-personal-chatgpt architecture

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

- Interactive diagram: https://gitdiagram.com/shoaib20455/eligo-leather-personal-chatgpt
- Repository: https://github.com/shoaib20455/eligo-leather-personal-chatgpt

## Overview

Eligo is a leather e-commerce platform with a customer storefront, an administrative portal, and a FastAPI backend. The main customer journey is browsing products and placing an order; staff manage catalog, orders, customers, content, discounts, and store settings through the admin portal. The backend exposes API routers for these domains and persists their data. The graph includes documented product capabilities and sampled backend relationships; several frontend-to-backend and unsampled subsystem links remain dashed because their wiring was not shown.

Main entry points: [`eligo-backend/app/main.py`](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/main.py) (API application), [`eligo-backend/app/modules/orders/router.py`](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/orders/router.py) (Orders and checkout), [`eligo-frontend/src/app/page.tsx`](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-frontend/src/app/page.tsx) (Storefront pages), [`eligo-backend/app/db/session.py`](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/db/session.py) (Database sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Customer storefront"]
  node_storefront["Storefront pages<br/>[page.tsx]"]
  node_catalog_ui["Catalog browsing<br/>[api.ts]"]
  node_checkout_ui["Checkout<br/>[page.tsx]"]
  node_cart["Cart state<br/>[store.ts]"]
end

subgraph group_admin["Admin portal"]
  node_admin_ui["Admin portal<br/>[page.tsx]"]
  node_admin_proxy["API proxy<br/>[route.ts]"]
end

subgraph group_backend["Backend domain API"]
  node_catalog["Catalog<br/>[service.py]"]
  node_orders["Orders and checkout<br/>[router.py]"]
  node_customers["Customers<br/>[service.py]"]
  node_discounts["Discounts<br/>[service.py]"]
  node_content["Store content<br/>[service.py]"]
  node_shipping["Shipping settings<br/>[service.py]"]
  node_notifications["Notifications<br/>[service.py]"]
  node_catalog_model["Catalog models<br/>[model.py]"]
  node_customer_model["Customer models<br/>[model.py]"]
  node_order_model["Order models<br/>[model.py]"]
end

subgraph group_foundation["Backend foundation"]
  node_api_app["API application<br/>[main.py]"]
  node_config["Runtime configuration<br/>[config.py]"]
  node_authz["Auth dependencies<br/>[dependencies.py]"]
  node_db_session["Database sessions<br/>[session.py]"]
  node_db_base["ORM base<br/>[base.py]"]
end

node_shopper(("Shopper"))
node_admin_user(("Staff user"))
node_database[("Relational database")]

node_shopper -->|"browses"| node_storefront
node_storefront -.->|"offers browsing"| node_catalog_ui
node_shopper -.->|"adds items"| node_cart
node_cart -.->|"provides cart"| node_checkout_ui
node_shopper -->|"places order"| node_checkout_ui
node_checkout_ui -.->|"submits checkout"| node_orders
node_storefront -.->|"requests API"| node_api_app
node_admin_user -->|"manages store"| node_admin_ui
node_admin_ui -.->|"sends API requests"| node_admin_proxy
node_admin_proxy -.->|"forwards requests"| node_api_app
node_api_app -->|"registers routes"| node_catalog
node_api_app -->|"registers routes"| node_orders
node_api_app -.->|"registers routes"| node_content
node_api_app -.->|"registers routes"| node_customers
node_api_app -.->|"registers routes"| node_discounts
node_orders -->|"validates promo"| node_discounts
node_orders -->|"resolves products"| node_catalog_model
node_orders -->|"uses order records"| node_order_model
node_catalog -->|"uses models"| node_catalog_model
node_customers -->|"uses models"| node_customer_model
node_discounts -->|"checks customer"| node_customer_model
node_api_app -->|"configures guards"| node_authz
node_authz -->|"gets sessions"| node_db_session
node_db_session -->|"reads database URL"| node_config
node_db_session -->|"opens sessions"| node_database
node_catalog_model -->|"extends ORM base"| node_db_base
node_customer_model -->|"extends ORM base"| node_db_base
node_order_model -->|"extends ORM base"| node_db_base
node_orders -.->|"uses shipping"| node_shipping
node_orders -.->|"dispatches notices"| node_notifications

click node_storefront "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-frontend/src/app/page.tsx"
click node_catalog_ui "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-frontend/src/modules/catalog/api.ts"
click node_checkout_ui "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-frontend/src/app/checkout/page.tsx"
click node_cart "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-frontend/src/modules/cart/store.ts"
click node_admin_ui "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/admin-frontend/src/app/page.tsx"
click node_admin_proxy "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/admin-frontend/src/app/api/v1/%5B...path%5D/route.ts"
click node_catalog "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/catalog/service.py"
click node_orders "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/orders/router.py"
click node_customers "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/customers/service.py"
click node_discounts "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/discounts/service.py"
click node_content "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/content/service.py"
click node_shipping "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/settings/shipping_and_delivery/service.py"
click node_notifications "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/settings/notifications/service.py"
click node_api_app "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/main.py"
click node_config "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/core/config.py"
click node_authz "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/core/dependencies.py"
click node_db_session "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/db/session.py"
click node_db_base "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/db/base.py"
click node_catalog_model "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/catalog/model.py"
click node_customer_model "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/customers/model.py"
click node_order_model "https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/orders/model.py"

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,node_catalog_ui,node_checkout_ui,node_cart,node_admin_user toneBlue
class node_admin_ui,node_admin_proxy,node_database toneAmber
class node_catalog,node_orders,node_customers,node_discounts,node_content,node_shipping,node_notifications,node_catalog_model,node_customer_model,node_order_model toneMint
class node_api_app,node_config,node_authz,node_db_session,node_db_base toneRose
class node_shopper toneIndigo
```

## Components

### Customer storefront

- [Storefront pages](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-frontend/src/app/page.tsx): `eligo-frontend/src/app/page.tsx`
- [Catalog browsing](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-frontend/src/modules/catalog/api.ts): `eligo-frontend/src/modules/catalog/api.ts`
- [Checkout](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-frontend/src/app/checkout/page.tsx): `eligo-frontend/src/app/checkout/page.tsx`
- [Cart state](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-frontend/src/modules/cart/store.ts): `eligo-frontend/src/modules/cart/store.ts`

### Admin portal

- [Admin portal](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/admin-frontend/src/app/page.tsx): `admin-frontend/src/app/page.tsx`
- [API proxy](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/admin-frontend/src/app/api/v1/%5B...path%5D/route.ts): `admin-frontend/src/app/api/v1/[...path]/route.ts`

### Backend domain API

- [Catalog](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/catalog/service.py): `eligo-backend/app/modules/catalog/service.py`
- [Orders and checkout](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/orders/router.py): `eligo-backend/app/modules/orders/router.py`
- [Customers](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/customers/service.py): `eligo-backend/app/modules/customers/service.py`
- [Discounts](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/discounts/service.py): `eligo-backend/app/modules/discounts/service.py`
- [Store content](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/content/service.py): `eligo-backend/app/modules/content/service.py`
- [Shipping settings](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/settings/shipping_and_delivery/service.py): `eligo-backend/app/modules/settings/shipping_and_delivery/service.py`
- [Notifications](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/settings/notifications/service.py): `eligo-backend/app/modules/settings/notifications/service.py`
- [Catalog models](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/catalog/model.py): `eligo-backend/app/modules/catalog/model.py`
- [Customer models](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/customers/model.py): `eligo-backend/app/modules/customers/model.py`
- [Order models](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/modules/orders/model.py): `eligo-backend/app/modules/orders/model.py`

### Backend foundation

- [API application](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/main.py): `eligo-backend/app/main.py`
- [Runtime configuration](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/core/config.py): `eligo-backend/app/core/config.py`
- [Auth dependencies](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/core/dependencies.py): `eligo-backend/app/core/dependencies.py`
- [Database sessions](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/db/session.py): `eligo-backend/app/db/session.py`
- [ORM base](https://github.com/shoaib20455/eligo-leather-personal-chatgpt/blob/main/eligo-backend/app/db/base.py): `eligo-backend/app/db/base.py`

### Other components

- **Shopper**
- **Staff user**
- **Relational database**

## Connections

- Shopper → Storefront pages: browses (evidence: `README.md`)
- Storefront pages → Catalog browsing: offers browsing
- Shopper → Cart state: adds items
- Cart state → Checkout: provides cart
- Shopper → Checkout: places order (evidence: `README.md`)
- Checkout → Orders and checkout: submits checkout
- Storefront pages → API application: requests API
- Staff user → Admin portal: manages store (evidence: `README.md`)
- Admin portal → API proxy: sends API requests
- API proxy → API application: forwards requests
- API application → Catalog: registers routes (evidence: `eligo-backend/app/main.py`)
- API application → Orders and checkout: registers routes (evidence: `eligo-backend/app/main.py`)
- API application → Store content: registers routes
- API application → Customers: registers routes
- API application → Discounts: registers routes
- Orders and checkout → Discounts: validates promo (evidence: `eligo-backend/app/modules/orders/router.py`)
- Orders and checkout → Catalog models: resolves products (evidence: `eligo-backend/app/modules/orders/router.py`)
- Orders and checkout → Order models: uses order records (evidence: `eligo-backend/app/modules/orders/router.py`)
- Catalog → Catalog models: uses models (evidence: `eligo-backend/app/modules/catalog/service.py`)
- Customers → Customer models: uses models (evidence: `eligo-backend/app/modules/customers/service.py`)
- Discounts → Customer models: checks customer (evidence: `eligo-backend/app/modules/discounts/service.py`)
- API application → Auth dependencies: configures guards (evidence: `eligo-backend/app/main.py`)
- Auth dependencies → Database sessions: gets sessions (evidence: `eligo-backend/app/core/dependencies.py`)
- Database sessions → Runtime configuration: reads database URL (evidence: `eligo-backend/app/db/session.py`)
- Database sessions → Relational database: opens sessions (evidence: `eligo-backend/app/db/session.py`)
- Catalog models → ORM base: extends ORM base (evidence: `eligo-backend/app/modules/catalog/model.py`)
- Customer models → ORM base: extends ORM base (evidence: `eligo-backend/app/modules/customers/model.py`)
- Order models → ORM base: extends ORM base (evidence: `eligo-backend/app/modules/orders/model.py`)
- Orders and checkout → Shipping settings: uses shipping (evidence: `eligo-backend/app/modules/orders/router.py`)
- Orders and checkout → Notifications: dispatches notices (evidence: `eligo-backend/app/modules/orders/router.py`)
