# ihebm199/dcs_dental architecture

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

## Overview

DCS Dental is a Tunisian dental and paramedical e-commerce platform. The main customer journey is browsing the catalogue, selecting products, and submitting an order; account access, promotions, and customer order tracking are related capabilities. Django REST Framework provides the backend API, with PostgreSQL-backed domain models and optional Celery email notifications. The README documents the main API areas, but sampled frontend pages do not establish their specific API calls, so those connections are marked unverified. Notification wiring is shown in the sampled backend sources.

Main entry points: [`backend/config/urls.py`](https://github.com/ihebm199/dcs_dental/blob/main/backend/config/urls.py) (Django REST API), [`backend/apps/notifications/tasks.py`](https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/notifications/tasks.py) (Email tasks), [`backend/apps/notifications/signals.py`](https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/notifications/signals.py) (Notification signals), [`backend/apps/orders/models.py`](https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/orders/models.py) (Orders)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shop["Storefront"]
  node_storefront["Web storefront<br/>[page.tsx]"]
  node_catalogue_ui["Catalogue<br/>[page.tsx]"]
  node_product_ui["Product detail<br/>[page.tsx]"]
  node_cart_state["Cart state<br/>[cart-provider.tsx]"]
  node_checkout_ui["Checkout<br/>[page.tsx]"]
  node_promotions_ui["Promotions page<br/>[page.tsx]"]
  node_dashboard_ui["Order dashboard<br/>[page.tsx]"]
end

subgraph group_commerce["Commerce API"]
  node_api["Django REST API<br/>[urls.py]"]
  node_products[("Product catalogue<br/>[models.py]")]
  node_orders[("Orders<br/>[models.py]")]
  node_promotions[("Promo codes<br/>[models.py]")]
  node_order_signals["Order signals<br/>[signals.py]"]
end

subgraph group_identity["Accounts"]
  node_accounts["Accounts and auth<br/>[views.py]"]
end

subgraph group_messaging["Notifications"]
  node_notification_signals["Notification signals<br/>[signals.py]"]
  node_tasks["Email tasks<br/>[tasks.py]"]
  node_email_services["Email services<br/>[services.py]"]
  node_newsletter[("Newsletter subscribers<br/>[models.py]")]
  node_celery["Celery worker<br/>[celery.py]"]
end

node_customer(("Customer"))
node_email["Email service"]

node_customer -->|"browses"| node_storefront
node_storefront -->|"opens catalogue"| node_catalogue_ui
node_customer -->|"submits order"| node_checkout_ui
node_checkout_ui -.->|"API request"| node_api
node_catalogue_ui -.->|"catalogue request"| node_api
node_product_ui -.->|"product request"| node_api
node_promotions_ui -.->|"promotion request"| node_api
node_dashboard_ui -.->|"order request"| node_api
node_api -->|"serves catalogue"| node_products
node_api -->|"serves orders"| node_orders
node_api -->|"serves promotions"| node_promotions
node_api -->|"serves accounts"| node_accounts
node_orders -->|"references products"| node_products
node_orders -->|"references promo code"| node_promotions
node_order_signals -->|"observes changes"| node_orders
node_order_signals -->|"dispatches tasks"| node_tasks
node_notification_signals -->|"observes promotions"| node_products
node_notification_signals -->|"observes publication"| node_promotions
node_notification_signals -->|"dispatches tasks"| node_tasks
node_tasks -->|"loads order"| node_orders
node_tasks -->|"loads product"| node_products
node_tasks -->|"loads promo"| node_promotions
node_tasks -->|"calls service"| node_email_services
node_email_services -->|"reads subscribers"| node_newsletter
node_email_services -->|"sends mail"| node_email
node_celery -->|"discovers tasks"| node_tasks
node_notification_signals -->|"registered at startup"| node_notification_signals

click node_storefront "https://github.com/ihebm199/dcs_dental/blob/main/dcs_dental/frontend/app/page.tsx"
click node_catalogue_ui "https://github.com/ihebm199/dcs_dental/blob/main/dcs_dental/frontend/app/catalogue/page.tsx"
click node_product_ui "https://github.com/ihebm199/dcs_dental/blob/main/dcs_dental/frontend/app/produit/%5Bslug%5D/page.tsx"
click node_cart_state "https://github.com/ihebm199/dcs_dental/blob/main/dcs_dental/frontend/components/cart-provider.tsx"
click node_checkout_ui "https://github.com/ihebm199/dcs_dental/blob/main/dcs_dental/frontend/app/checkout/page.tsx"
click node_promotions_ui "https://github.com/ihebm199/dcs_dental/blob/main/dcs_dental/frontend/app/promotions/page.tsx"
click node_dashboard_ui "https://github.com/ihebm199/dcs_dental/blob/main/dcs_dental/frontend/app/dashboard/page.tsx"
click node_api "https://github.com/ihebm199/dcs_dental/blob/main/backend/config/urls.py"
click node_products "https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/products/models.py"
click node_orders "https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/orders/models.py"
click node_promotions "https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/promotions/models.py"
click node_accounts "https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/accounts/views.py"
click node_notification_signals "https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/notifications/signals.py"
click node_order_signals "https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/orders/signals.py"
click node_tasks "https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/notifications/tasks.py"
click node_email_services "https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/notifications/services.py"
click node_newsletter "https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/notifications/models.py"
click node_celery "https://github.com/ihebm199/dcs_dental/blob/main/backend/config/celery.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_catalogue_ui,node_product_ui,node_cart_state,node_checkout_ui,node_promotions_ui,node_dashboard_ui toneBlue
class node_api,node_products,node_orders,node_promotions,node_order_signals toneAmber
class node_accounts toneMint
class node_notification_signals,node_tasks,node_email_services,node_newsletter,node_celery toneRose
class node_customer,node_email toneIndigo
```

## Components

### Storefront

- [Web storefront](https://github.com/ihebm199/dcs_dental/blob/main/dcs_dental/frontend/app/page.tsx): `dcs_dental/frontend/app/page.tsx`
- [Catalogue](https://github.com/ihebm199/dcs_dental/blob/main/dcs_dental/frontend/app/catalogue/page.tsx): `dcs_dental/frontend/app/catalogue/page.tsx`
- [Product detail](https://github.com/ihebm199/dcs_dental/blob/main/dcs_dental/frontend/app/produit/%5Bslug%5D/page.tsx): `dcs_dental/frontend/app/produit/[slug]/page.tsx`
- [Cart state](https://github.com/ihebm199/dcs_dental/blob/main/dcs_dental/frontend/components/cart-provider.tsx): `dcs_dental/frontend/components/cart-provider.tsx`
- [Checkout](https://github.com/ihebm199/dcs_dental/blob/main/dcs_dental/frontend/app/checkout/page.tsx): `dcs_dental/frontend/app/checkout/page.tsx`
- [Promotions page](https://github.com/ihebm199/dcs_dental/blob/main/dcs_dental/frontend/app/promotions/page.tsx): `dcs_dental/frontend/app/promotions/page.tsx`
- [Order dashboard](https://github.com/ihebm199/dcs_dental/blob/main/dcs_dental/frontend/app/dashboard/page.tsx): `dcs_dental/frontend/app/dashboard/page.tsx`

### Commerce API

- [Django REST API](https://github.com/ihebm199/dcs_dental/blob/main/backend/config/urls.py): `backend/config/urls.py`
- [Product catalogue](https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/products/models.py): `backend/apps/products/models.py`
- [Orders](https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/orders/models.py): `backend/apps/orders/models.py`
- [Promo codes](https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/promotions/models.py): `backend/apps/promotions/models.py`
- [Order signals](https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/orders/signals.py): `backend/apps/orders/signals.py`

### Accounts

- [Accounts and auth](https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/accounts/views.py): `backend/apps/accounts/views.py`

### Notifications

- [Notification signals](https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/notifications/signals.py): `backend/apps/notifications/signals.py`
- [Email tasks](https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/notifications/tasks.py): `backend/apps/notifications/tasks.py`
- [Email services](https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/notifications/services.py): `backend/apps/notifications/services.py`
- [Newsletter subscribers](https://github.com/ihebm199/dcs_dental/blob/main/backend/apps/notifications/models.py): `backend/apps/notifications/models.py`
- [Celery worker](https://github.com/ihebm199/dcs_dental/blob/main/backend/config/celery.py): `backend/config/celery.py`

### Other components

- **Customer**
- **Email service**

## Connections

- Customer → Web storefront: browses (evidence: `README.md`)
- Web storefront → Catalogue: opens catalogue (evidence: `README.md`)
- Customer → Checkout: submits order (evidence: `README.md`)
- Checkout → Django REST API: API request
- Catalogue → Django REST API: catalogue request
- Product detail → Django REST API: product request
- Promotions page → Django REST API: promotion request
- Order dashboard → Django REST API: order request
- Django REST API → Product catalogue: serves catalogue (evidence: `README.md`)
- Django REST API → Orders: serves orders (evidence: `README.md`)
- Django REST API → Promo codes: serves promotions (evidence: `README.md`)
- Django REST API → Accounts and auth: serves accounts (evidence: `README.md`)
- Orders → Product catalogue: references products (evidence: `backend/apps/orders/models.py`)
- Orders → Promo codes: references promo code (evidence: `backend/apps/orders/models.py`)
- Order signals → Orders: observes changes (evidence: `backend/apps/orders/signals.py`)
- Order signals → Email tasks: dispatches tasks (evidence: `backend/apps/orders/signals.py`)
- Notification signals → Product catalogue: observes promotions (evidence: `backend/apps/notifications/signals.py`)
- Notification signals → Promo codes: observes publication (evidence: `backend/apps/notifications/signals.py`)
- Notification signals → Email tasks: dispatches tasks (evidence: `backend/apps/notifications/signals.py`)
- Email tasks → Orders: loads order (evidence: `backend/apps/notifications/tasks.py`)
- Email tasks → Product catalogue: loads product (evidence: `backend/apps/notifications/tasks.py`)
- Email tasks → Promo codes: loads promo (evidence: `backend/apps/notifications/tasks.py`)
- Email tasks → Email services: calls service (evidence: `backend/apps/notifications/tasks.py`)
- Email services → Newsletter subscribers: reads subscribers (evidence: `backend/apps/notifications/services.py`)
- Email services → Email service: sends mail (evidence: `backend/apps/notifications/services.py`)
- Celery worker → Email tasks: discovers tasks (evidence: `backend/config/celery.py`)
- Notification signals → Notification signals: registered at startup (evidence: `backend/apps/notifications/apps.py`)
