# dhanyahegdek/kanyaka architecture

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

- Interactive diagram: https://gitdiagram.com/dhanyahegdek/kanyaka
- Repository: https://github.com/dhanyahegdek/kanyaka

## Overview

Kanyaka is a Django staff backend for a Shopify jewelry store. Staff authenticate, manage gold rates, and upload, edit, or review products and orders; product actions synchronize with Shopify, while Shopify webhooks update local product and order records. The graph preserves the documented API, dashboard, bulk-upload, and sync capabilities. Source excerpts show product creation and order-webhook persistence, but most views and service implementations were not sampled, so those connections rely on README statements; uncertain wiring is omitted.

Main entry points: [`products/views.py`](https://github.com/dhanyahegdek/kanyaka/blob/main/products/views.py) (Product workflows), [`core/urls.py`](https://github.com/dhanyahegdek/kanyaka/blob/main/core/urls.py) (Application routing), [`orders/views.py`](https://github.com/dhanyahegdek/kanyaka/blob/main/orders/views.py) (Order webhook and views), [`business/views.py`](https://github.com/dhanyahegdek/kanyaka/blob/main/business/views.py) (Staff dashboard and rates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_staff["Staff operations"]
  node_core_routes["Application routing<br/>[urls.py]"]
end

subgraph group_products["Product management"]
  node_product_views["Product workflows<br/>[views.py]"]
  node_product_forms["Product forms<br/>[forms.py]"]
  node_product_records["Product records<br/>[models.py]"]
  node_shopify_manager["Shopify manager<br/>[shopify_manager.py]"]
  node_bulk_upload["Bulk upload<br/>[shopify_bulk.py]"]
  node_product_sync["Product sync<br/>[shopify_sync.py]"]
end

subgraph group_orders["Order tracking"]
  node_order_views["Order webhook and views<br/>[views.py]"]
  node_order_records["Order records<br/>[models.py]"]
end

subgraph group_business_api["Business and API"]
  node_business_views["Staff dashboard and rates<br/>[views.py]"]
  node_gold_rate["Gold rate records<br/>[models.py]"]
  node_api_views["Gold rate and Shopify API<br/>[views.py]"]
end

node_staff_user(("Staff user"))
node_shopify{{"Shopify Admin"}}
node_local_db[("PostgreSQL database")]

node_staff_user -->|"opens staff routes"| node_core_routes
node_core_routes -->|"routes product requests"| node_product_views
node_core_routes -->|"routes staff requests"| node_business_views
node_core_routes -->|"routes order views"| node_order_views
node_core_routes -->|"routes API requests"| node_api_views
node_product_views -->|"uses forms"| node_product_forms
node_product_views -->|"creates and updates"| node_product_records
node_product_views -->|"sends product operations"| node_shopify
node_product_views -->|"receives product webhook"| node_shopify
node_product_views -->|"syncs product records"| node_local_db
node_shopify_manager -->|"dispatches large uploads"| node_bulk_upload
node_shopify_manager -->|"dispatches smaller uploads"| node_product_sync
node_bulk_upload -->|"runs bulk operations"| node_shopify
node_product_sync -->|"fetches products"| node_shopify
node_order_views -->|"stores verified orders"| node_order_records
node_order_views -->|"persists orders"| node_local_db
node_shopify -->|"sends order webhook"| node_order_views
node_business_views -->|"logs gold rates"| node_gold_rate
node_business_views -->|"reads current rate"| node_local_db
node_api_views -->|"returns latest rates"| node_gold_rate
node_api_views -->|"fetches REST products"| node_shopify

click node_product_views "https://github.com/dhanyahegdek/kanyaka/blob/main/products/views.py"
click node_product_forms "https://github.com/dhanyahegdek/kanyaka/blob/main/products/forms.py"
click node_product_records "https://github.com/dhanyahegdek/kanyaka/blob/main/products/models.py"
click node_shopify_manager "https://github.com/dhanyahegdek/kanyaka/blob/main/products/services/shopify_manager.py"
click node_bulk_upload "https://github.com/dhanyahegdek/kanyaka/blob/main/products/services/shopify_bulk.py"
click node_product_sync "https://github.com/dhanyahegdek/kanyaka/blob/main/products/services/shopify_sync.py"
click node_order_views "https://github.com/dhanyahegdek/kanyaka/blob/main/orders/views.py"
click node_order_records "https://github.com/dhanyahegdek/kanyaka/blob/main/orders/models.py"
click node_business_views "https://github.com/dhanyahegdek/kanyaka/blob/main/business/views.py"
click node_gold_rate "https://github.com/dhanyahegdek/kanyaka/blob/main/business/models.py"
click node_api_views "https://github.com/dhanyahegdek/kanyaka/blob/main/api/views.py"
click node_core_routes "https://github.com/dhanyahegdek/kanyaka/blob/main/core/urls.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_core_routes,node_staff_user toneBlue
class node_product_views,node_product_forms,node_product_records,node_shopify_manager,node_bulk_upload,node_product_sync,node_local_db toneAmber
class node_order_views,node_order_records toneMint
class node_business_views,node_gold_rate,node_api_views toneRose
class node_shopify toneIndigo
```

## Components

### Staff operations

- [Application routing](https://github.com/dhanyahegdek/kanyaka/blob/main/core/urls.py): `core/urls.py`

### Product management

- [Product workflows](https://github.com/dhanyahegdek/kanyaka/blob/main/products/views.py): `products/views.py`
- [Product forms](https://github.com/dhanyahegdek/kanyaka/blob/main/products/forms.py): `products/forms.py`
- [Product records](https://github.com/dhanyahegdek/kanyaka/blob/main/products/models.py): `products/models.py`
- [Shopify manager](https://github.com/dhanyahegdek/kanyaka/blob/main/products/services/shopify_manager.py): `products/services/shopify_manager.py`
- [Bulk upload](https://github.com/dhanyahegdek/kanyaka/blob/main/products/services/shopify_bulk.py): `products/services/shopify_bulk.py`
- [Product sync](https://github.com/dhanyahegdek/kanyaka/blob/main/products/services/shopify_sync.py): `products/services/shopify_sync.py`

### Order tracking

- [Order webhook and views](https://github.com/dhanyahegdek/kanyaka/blob/main/orders/views.py): `orders/views.py`
- [Order records](https://github.com/dhanyahegdek/kanyaka/blob/main/orders/models.py): `orders/models.py`

### Business and API

- [Staff dashboard and rates](https://github.com/dhanyahegdek/kanyaka/blob/main/business/views.py): `business/views.py`
- [Gold rate records](https://github.com/dhanyahegdek/kanyaka/blob/main/business/models.py): `business/models.py`
- [Gold rate and Shopify API](https://github.com/dhanyahegdek/kanyaka/blob/main/api/views.py): `api/views.py`

### Other components

- **Staff user**
- **Shopify Admin**
- **PostgreSQL database**

## Connections

- Staff user → Application routing: opens staff routes (evidence: `README.md`)
- Application routing → Product workflows: routes product requests (evidence: `README.md`)
- Application routing → Staff dashboard and rates: routes staff requests (evidence: `README.md`)
- Application routing → Order webhook and views: routes order views (evidence: `README.md`)
- Application routing → Gold rate and Shopify API: routes API requests (evidence: `README.md`)
- Product workflows → Product forms: uses forms (evidence: `products/views.py`)
- Product workflows → Product records: creates and updates (evidence: `products/views.py`)
- Product workflows → Shopify Admin: sends product operations (evidence: `README.md`)
- Product workflows → Shopify Admin: receives product webhook (evidence: `README.md`)
- Product workflows → PostgreSQL database: syncs product records (evidence: `README.md`)
- Shopify manager → Bulk upload: dispatches large uploads (evidence: `products/services/shopify_manager.py`)
- Shopify manager → Product sync: dispatches smaller uploads (evidence: `products/services/shopify_manager.py`)
- Bulk upload → Shopify Admin: runs bulk operations (evidence: `README.md`)
- Product sync → Shopify Admin: fetches products (evidence: `README.md`)
- Order webhook and views → Order records: stores verified orders (evidence: `orders/views.py`)
- Order webhook and views → PostgreSQL database: persists orders (evidence: `orders/views.py`)
- Shopify Admin → Order webhook and views: sends order webhook (evidence: `README.md`)
- Staff dashboard and rates → Gold rate records: logs gold rates (evidence: `README.md`)
- Staff dashboard and rates → PostgreSQL database: reads current rate (evidence: `README.md`)
- Gold rate and Shopify API → Gold rate records: returns latest rates (evidence: `README.md`)
- Gold rate and Shopify API → Shopify Admin: fetches REST products (evidence: `README.md`)
