# refathasanabir/stich architecture

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

- Interactive diagram: https://gitdiagram.com/refathasanabir/stich
- Repository: https://github.com/refathasanabir/stich

## Overview

This Django application provides a tailoring marketplace: people register and browse shops and designs, then customers save measurements and place or track orders. Separate interfaces support tailor/rider approval and administrator management and reporting. The graph captures documented routes and source-index references; where views or model interactions were not excerpted, it avoids asserting implementation details beyond those references.

Main entry points: [`adminpanel/views.py`](https://github.com/refathasanabir/stich/blob/main/adminpanel/views.py) (Admin operations), [`core/views.py`](https://github.com/refathasanabir/stich/blob/main/core/views.py) (Login and registration), [`customers/views.py`](https://github.com/refathasanabir/stich/blob/main/customers/views.py) (Cart and checkout), [`tailors/models.py`](https://github.com/refathasanabir/stich/blob/main/tailors/models.py) (Tailor shops)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_marketplace["Marketplace"]
  node_site["Home and gallery<br/>[views.py]"]
  node_shop_browse["Shop browsing<br/>[views.py]"]
  node_designs["Design catalog<br/>[models.py]"]
  node_tailor_shops["Tailor shops<br/>[models.py]"]
  node_tailor_portal["Tailor portal<br/>[views.py]"]
end

subgraph group_accounts["Accounts and roles"]
  node_identity["Login and registration<br/>[views.py]"]
  node_rider_portal["Rider portal<br/>[views.py]"]
end

subgraph group_customer["Customer orders"]
  node_customer_views["Customer account<br/>[views.py]"]
  node_measurement_edit["Measurement editing<br/>[views.py]"]
  node_cart_checkout["Cart and checkout<br/>[views.py]"]
end

subgraph group_admin["Administration"]
  node_approval[("Role approvals<br/>[models.py]")]
  node_admin_views["Admin operations<br/>[views.py]"]
end

subgraph group_data["Domain data"]
  node_profiles[("Role profiles<br/>[models.py]")]
  node_measure_profile[("Measurement profiles<br/>[models.py]")]
  node_orders[("Orders and tracking<br/>[models.py]")]
  node_admin_rules[("Platform rules<br/>[models.py]")]
end

node_visitor(("Visitor"))
node_customer(("Customer"))
node_tailor(("Tailor"))
node_rider(("Rider"))
node_administrator(("Administrator"))

node_visitor -->|"browses"| node_site
node_site -->|"queries"| node_designs
node_designs -->|"references shop"| node_tailor_shops
node_customer -->|"browses"| node_shop_browse
node_shop_browse -->|"queries"| node_tailor_shops
node_visitor -->|"registers or logs in"| node_identity
node_identity -->|"uses role data"| node_profiles
node_identity -.->|"approval workflow"| node_approval
node_customer -->|"manages account"| node_customer_views
node_customer_views -->|"reads orders"| node_orders
node_customer -->|"edits measurements"| node_measurement_edit
node_measurement_edit -->|"creates and updates"| node_measure_profile
node_customer -->|"checks out"| node_cart_checkout
node_cart_checkout -->|"selects profile"| node_measure_profile
node_cart_checkout -->|"places order"| node_orders
node_customer -->|"tracks order"| node_orders
node_administrator -->|"manages platform"| node_admin_views
node_admin_views -->|"reviews approvals"| node_approval
node_admin_views -->|"manages rules"| node_admin_rules
node_tailor -->|"uses portal"| node_tailor_portal
node_rider -->|"uses portal"| node_rider_portal
node_admin_views -->|"manages shops"| node_tailor_shops

click node_site "https://github.com/refathasanabir/stich/blob/main/core/views.py"
click node_shop_browse "https://github.com/refathasanabir/stich/blob/main/customers/views.py"
click node_designs "https://github.com/refathasanabir/stich/blob/main/core/models.py"
click node_tailor_shops "https://github.com/refathasanabir/stich/blob/main/tailors/models.py"
click node_identity "https://github.com/refathasanabir/stich/blob/main/core/views.py"
click node_profiles "https://github.com/refathasanabir/stich/blob/main/core/models.py"
click node_approval "https://github.com/refathasanabir/stich/blob/main/adminpanel/models.py"
click node_customer_views "https://github.com/refathasanabir/stich/blob/main/customers/views.py"
click node_measure_profile "https://github.com/refathasanabir/stich/blob/main/customers/models.py"
click node_measurement_edit "https://github.com/refathasanabir/stich/blob/main/measurements/views.py"
click node_cart_checkout "https://github.com/refathasanabir/stich/blob/main/customers/views.py"
click node_orders "https://github.com/refathasanabir/stich/blob/main/customers/models.py"
click node_admin_views "https://github.com/refathasanabir/stich/blob/main/adminpanel/views.py"
click node_admin_rules "https://github.com/refathasanabir/stich/blob/main/adminpanel/models.py"
click node_tailor_portal "https://github.com/refathasanabir/stich/blob/main/tailors/views.py"
click node_rider_portal "https://github.com/refathasanabir/stich/blob/main/riders/views.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_site,node_shop_browse,node_designs,node_tailor_shops,node_tailor_portal toneBlue
class node_identity,node_rider_portal toneAmber
class node_customer_views,node_measurement_edit,node_cart_checkout toneMint
class node_approval,node_admin_views toneRose
class node_profiles,node_measure_profile,node_orders,node_admin_rules,node_visitor,node_customer,node_tailor,node_rider,node_administrator toneIndigo
```

## Components

### Marketplace

- [Home and gallery](https://github.com/refathasanabir/stich/blob/main/core/views.py): `core/views.py`
- [Shop browsing](https://github.com/refathasanabir/stich/blob/main/customers/views.py): `customers/views.py`
- [Design catalog](https://github.com/refathasanabir/stich/blob/main/core/models.py): `core/models.py`
- [Tailor shops](https://github.com/refathasanabir/stich/blob/main/tailors/models.py): `tailors/models.py`
- [Tailor portal](https://github.com/refathasanabir/stich/blob/main/tailors/views.py): `tailors/views.py`

### Accounts and roles

- [Login and registration](https://github.com/refathasanabir/stich/blob/main/core/views.py): `core/views.py`
- [Rider portal](https://github.com/refathasanabir/stich/blob/main/riders/views.py): `riders/views.py`

### Customer orders

- [Customer account](https://github.com/refathasanabir/stich/blob/main/customers/views.py): `customers/views.py`
- [Measurement editing](https://github.com/refathasanabir/stich/blob/main/measurements/views.py): `measurements/views.py`
- [Cart and checkout](https://github.com/refathasanabir/stich/blob/main/customers/views.py): `customers/views.py`

### Administration

- [Role approvals](https://github.com/refathasanabir/stich/blob/main/adminpanel/models.py): `adminpanel/models.py`
- [Admin operations](https://github.com/refathasanabir/stich/blob/main/adminpanel/views.py): `adminpanel/views.py`

### Domain data

- [Role profiles](https://github.com/refathasanabir/stich/blob/main/core/models.py): `core/models.py`
- [Measurement profiles](https://github.com/refathasanabir/stich/blob/main/customers/models.py): `customers/models.py`
- [Orders and tracking](https://github.com/refathasanabir/stich/blob/main/customers/models.py): `customers/models.py`
- [Platform rules](https://github.com/refathasanabir/stich/blob/main/adminpanel/models.py): `adminpanel/models.py`

### Other components

- **Visitor**
- **Customer**
- **Tailor**
- **Rider**
- **Administrator**

## Connections

- Visitor → Home and gallery: browses
- Home and gallery → Design catalog: queries (evidence: `core/views.py`)
- Design catalog → Tailor shops: references shop (evidence: `core/models.py`)
- Customer → Shop browsing: browses
- Shop browsing → Tailor shops: queries (evidence: `customers/views.py`)
- Visitor → Login and registration: registers or logs in
- Login and registration → Role profiles: uses role data (evidence: `core/views.py`)
- Login and registration → Role approvals: approval workflow (evidence: `core/views.py`)
- Customer → Customer account: manages account
- Customer account → Orders and tracking: reads orders (evidence: `customers/views.py`)
- Customer → Measurement editing: edits measurements
- Measurement editing → Measurement profiles: creates and updates (evidence: `measurements/views.py`)
- Customer → Cart and checkout: checks out
- Cart and checkout → Measurement profiles: selects profile (evidence: `customers/views.py`)
- Cart and checkout → Orders and tracking: places order (evidence: `customers/views.py`)
- Customer → Orders and tracking: tracks order
- Administrator → Admin operations: manages platform
- Admin operations → Role approvals: reviews approvals (evidence: `adminpanel/views.py`)
- Admin operations → Platform rules: manages rules (evidence: `adminpanel/views.py`)
- Tailor → Tailor portal: uses portal
- Rider → Rider portal: uses portal
- Admin operations → Tailor shops: manages shops (evidence: `adminpanel/views.py`)
