# mturner1158/potting-parlour architecture

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

## Overview

Potting Parlour is a Django plant shop with an ownership-care tracker. The main journey is browsing and filtering the catalog, managing a session basket, completing payment, and—when signed in—having purchased plants added to a personal tracker. Separate branches cover account details and order history, plant-care updates, and shop-owner catalog management. Edges follow shown calls or explicit README behavior; some unsampled views and routing are represented only where their relationships are documented or indexed.

Main entry points: [`checkout/views.py`](https://github.com/mturner1158/potting-parlour/blob/main/checkout/views.py) (Checkout flow), [`checkout/webhook_handler.py`](https://github.com/mturner1158/potting-parlour/blob/main/checkout/webhook_handler.py) (Payment handler), [`profiles/views.py`](https://github.com/mturner1158/potting-parlour/blob/main/profiles/views.py) (Profile and history), [`plants/views.py`](https://github.com/mturner1158/potting-parlour/blob/main/plants/views.py) (Browse and manage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Plant catalog"]
  node_catalog_views["Browse and manage<br/>[views.py]"]
  node_catalog_data[("Plants and categories<br/>[models.py]")]
  node_catalog_form["Plant form<br/>[forms.py]"]
end

subgraph group_purchase["Basket and checkout"]
  node_basket_views["Basket actions<br/>[views.py]"]
  node_basket_totals["Basket totals<br/>[contexts.py]"]
  node_checkout_views["Checkout flow<br/>[views.py]"]
  node_checkout_form["Order form<br/>[forms.py]"]
  node_orders[("Orders and items<br/>[models.py]")]
  node_webhook["Payment webhooks<br/>[webhooks.py]"]
  node_webhook_handler["Payment handler<br/>[webhook_handler.py]"]
end

subgraph group_accounts["Accounts and orders"]
  node_profiles[("Profile details<br/>[models.py]")]
  node_profile_views["Profile and history<br/>[views.py]"]
  node_profile_form["Profile form<br/>[forms.py]"]
end

subgraph group_care["Plant tracking"]
  node_tracker_views["Tracker dashboard<br/>[views.py]"]
  node_tracker_data[("Owned plants and logs<br/>[models.py]")]
  node_tracker_service["Order enrollment<br/>[services.py]"]
end

subgraph group_site["Site experience"]
  node_home["Home page<br/>[views.py]"]
end

node_visitor(("Shopper"))
node_manager(("Shop manager"))
node_stripe{{"Stripe"}}

node_visitor -->|"browses"| node_catalog_views
node_manager -->|"manages listings"| node_catalog_views
node_catalog_views -->|"queries"| node_catalog_data
node_catalog_views -->|"uses form"| node_catalog_form
node_visitor -->|"updates basket"| node_basket_views
node_basket_views -.->|"supplies basket data"| node_basket_totals
node_basket_totals -->|"reads plants"| node_catalog_data
node_visitor -->|"checks out"| node_checkout_views
node_checkout_views -->|"reads totals"| node_basket_totals
node_checkout_views -->|"validates order"| node_checkout_form
node_checkout_views -->|"creates order"| node_orders
node_checkout_views -->|"uses saved details"| node_profiles
node_checkout_views -->|"enrolls purchase"| node_tracker_service
node_checkout_views -.->|"initiates payment"| node_stripe
node_stripe -->|"sends events"| node_webhook
node_webhook -->|"dispatches event"| node_webhook_handler
node_webhook_handler -->|"validates metadata"| node_checkout_form
node_webhook_handler -->|"creates order"| node_orders
node_webhook_handler -->|"updates delivery details"| node_profiles
node_webhook_handler -->|"enrolls purchase"| node_tracker_service
node_tracker_service -->|"creates owned plants"| node_tracker_data
node_tracker_data -->|"references purchase"| node_orders
node_tracker_data -->|"references plant"| node_catalog_data
node_visitor -->|"manages account"| node_profile_views
node_profile_views -->|"updates profile"| node_profiles
node_profile_views -->|"uses form"| node_profile_form
node_profile_views -->|"shows history"| node_orders
node_visitor -->|"tracks plants"| node_tracker_views
node_tracker_views -->|"reads and updates"| node_tracker_data
node_visitor -->|"opens site"| node_home

click node_catalog_views "https://github.com/mturner1158/potting-parlour/blob/main/plants/views.py"
click node_catalog_data "https://github.com/mturner1158/potting-parlour/blob/main/plants/models.py"
click node_catalog_form "https://github.com/mturner1158/potting-parlour/blob/main/plants/forms.py"
click node_basket_views "https://github.com/mturner1158/potting-parlour/blob/main/basket/views.py"
click node_basket_totals "https://github.com/mturner1158/potting-parlour/blob/main/basket/contexts.py"
click node_checkout_views "https://github.com/mturner1158/potting-parlour/blob/main/checkout/views.py"
click node_checkout_form "https://github.com/mturner1158/potting-parlour/blob/main/checkout/forms.py"
click node_orders "https://github.com/mturner1158/potting-parlour/blob/main/checkout/models.py"
click node_webhook "https://github.com/mturner1158/potting-parlour/blob/main/checkout/webhooks.py"
click node_webhook_handler "https://github.com/mturner1158/potting-parlour/blob/main/checkout/webhook_handler.py"
click node_profiles "https://github.com/mturner1158/potting-parlour/blob/main/profiles/models.py"
click node_profile_views "https://github.com/mturner1158/potting-parlour/blob/main/profiles/views.py"
click node_profile_form "https://github.com/mturner1158/potting-parlour/blob/main/profiles/forms.py"
click node_tracker_views "https://github.com/mturner1158/potting-parlour/blob/main/tracker/views.py"
click node_tracker_data "https://github.com/mturner1158/potting-parlour/blob/main/tracker/models.py"
click node_tracker_service "https://github.com/mturner1158/potting-parlour/blob/main/tracker/services.py"
click node_home "https://github.com/mturner1158/potting-parlour/blob/main/core/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_catalog_views,node_catalog_data,node_catalog_form toneBlue
class node_basket_views,node_basket_totals,node_checkout_views,node_checkout_form,node_orders,node_webhook,node_webhook_handler toneAmber
class node_profiles,node_profile_views,node_profile_form toneMint
class node_tracker_views,node_tracker_data,node_tracker_service toneRose
class node_home,node_visitor,node_manager,node_stripe toneIndigo
```

## Components

### Plant catalog

- [Browse and manage](https://github.com/mturner1158/potting-parlour/blob/main/plants/views.py): `plants/views.py`
- [Plants and categories](https://github.com/mturner1158/potting-parlour/blob/main/plants/models.py): `plants/models.py`
- [Plant form](https://github.com/mturner1158/potting-parlour/blob/main/plants/forms.py): `plants/forms.py`

### Basket and checkout

- [Basket actions](https://github.com/mturner1158/potting-parlour/blob/main/basket/views.py): `basket/views.py`
- [Basket totals](https://github.com/mturner1158/potting-parlour/blob/main/basket/contexts.py): `basket/contexts.py`
- [Checkout flow](https://github.com/mturner1158/potting-parlour/blob/main/checkout/views.py): `checkout/views.py`
- [Order form](https://github.com/mturner1158/potting-parlour/blob/main/checkout/forms.py): `checkout/forms.py`
- [Orders and items](https://github.com/mturner1158/potting-parlour/blob/main/checkout/models.py): `checkout/models.py`
- [Payment webhooks](https://github.com/mturner1158/potting-parlour/blob/main/checkout/webhooks.py): `checkout/webhooks.py`
- [Payment handler](https://github.com/mturner1158/potting-parlour/blob/main/checkout/webhook_handler.py): `checkout/webhook_handler.py`

### Accounts and orders

- [Profile details](https://github.com/mturner1158/potting-parlour/blob/main/profiles/models.py): `profiles/models.py`
- [Profile and history](https://github.com/mturner1158/potting-parlour/blob/main/profiles/views.py): `profiles/views.py`
- [Profile form](https://github.com/mturner1158/potting-parlour/blob/main/profiles/forms.py): `profiles/forms.py`

### Plant tracking

- [Tracker dashboard](https://github.com/mturner1158/potting-parlour/blob/main/tracker/views.py): `tracker/views.py`
- [Owned plants and logs](https://github.com/mturner1158/potting-parlour/blob/main/tracker/models.py): `tracker/models.py`
- [Order enrollment](https://github.com/mturner1158/potting-parlour/blob/main/tracker/services.py): `tracker/services.py`

### Site experience

- [Home page](https://github.com/mturner1158/potting-parlour/blob/main/core/views.py): `core/views.py`

### Other components

- **Shopper**
- **Shop manager**
- **Stripe**

## Connections

- Shopper → Browse and manage: browses
- Shop manager → Browse and manage: manages listings
- Browse and manage → Plants and categories: queries (evidence: `plants/views.py`)
- Browse and manage → Plant form: uses form (evidence: `plants/views.py`)
- Shopper → Basket actions: updates basket
- Basket actions → Basket totals: supplies basket data
- Basket totals → Plants and categories: reads plants (evidence: `basket/contexts.py`)
- Shopper → Checkout flow: checks out
- Checkout flow → Basket totals: reads totals (evidence: `checkout/views.py`)
- Checkout flow → Order form: validates order (evidence: `checkout/views.py`)
- Checkout flow → Orders and items: creates order (evidence: `checkout/views.py`)
- Checkout flow → Profile details: uses saved details (evidence: `checkout/views.py`)
- Checkout flow → Order enrollment: enrolls purchase (evidence: `checkout/views.py`)
- Checkout flow → Stripe: initiates payment
- Stripe → Payment webhooks: sends events (evidence: `checkout/webhooks.py`)
- Payment webhooks → Payment handler: dispatches event (evidence: `checkout/webhooks.py`)
- Payment handler → Order form: validates metadata (evidence: `checkout/webhook_handler.py`)
- Payment handler → Orders and items: creates order (evidence: `checkout/webhook_handler.py`)
- Payment handler → Profile details: updates delivery details (evidence: `checkout/webhook_handler.py`)
- Payment handler → Order enrollment: enrolls purchase (evidence: `checkout/webhook_handler.py`)
- Order enrollment → Owned plants and logs: creates owned plants (evidence: `tracker/services.py`)
- Owned plants and logs → Orders and items: references purchase (evidence: `tracker/models.py`)
- Owned plants and logs → Plants and categories: references plant (evidence: `tracker/models.py`)
- Shopper → Profile and history: manages account
- Profile and history → Profile details: updates profile (evidence: `profiles/views.py`)
- Profile and history → Profile form: uses form (evidence: `profiles/views.py`)
- Profile and history → Orders and items: shows history (evidence: `profiles/views.py`)
- Shopper → Tracker dashboard: tracks plants
- Tracker dashboard → Owned plants and logs: reads and updates (evidence: `tracker/views.py`)
- Shopper → Home page: opens site
