# helstore/new-helstore architecture

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

## Overview

HELSTORE is a digital-product storefront with customer browsing, cart and checkout, post-payment delivery, and store administration. The README describes the brand and storefront experience; the source index also reveals operational payment, download, newsletter, and admin capabilities. The principal workflow runs from product browsing through checkout to webhook-driven fulfillment. Some route and admin wiring was not sampled, so those connections are omitted rather than inferred.

Main entry points: [`src/routes/checkout/index.tsx`](https://github.com/helstore/new-helstore/blob/main/src/routes/checkout/index.tsx) (Checkout Page), [`src/routes/api/stripe/webhook.ts`](https://github.com/helstore/new-helstore/blob/main/src/routes/api/stripe/webhook.ts) (Stripe Webhook), [`src/data/catalog.ts`](https://github.com/helstore/new-helstore/blob/main/src/data/catalog.ts) (Product Catalog), [`src/routes/shop`](https://github.com/helstore/new-helstore/tree/main/src/routes/shop) (Shop Routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_home["Home Page<br/>[index.tsx]"]
  node_site_sections["Storefront Sections"]
  node_shop["Shop Routes"]
  node_product_page["Product Page<br/>[$slug.tsx]"]
  node_catalog["Product Catalog<br/>[catalog.ts]"]
end

subgraph group_commerce["Commerce"]
  node_cart_state["Cart State<br/>[cart.tsx]"]
  node_cart_page["Cart Page<br/>[cart.tsx]"]
  node_checkout_page["Checkout Page<br/>[index.tsx]"]
  node_stripe_checkout["Stripe Checkout API<br/>[checkout.ts]"]
  node_stripe{{"Stripe"}}
end

subgraph group_fulfillment["Order Fulfillment"]
  node_stripe_webhook["Stripe Webhook<br/>[webhook.ts]"]
  node_order_store[("Order Store<br/>[supabase-server.ts]")]
  node_download_links["Download Links"]
  node_order_email["Order Email<br/>[email.ts]"]
  node_download_api["Download Routes<br/>[$slug.ts]"]
  node_newsletter_api["Newsletter API<br/>[newsletter.ts]"]
  node_contact_api["Contact API<br/>[contact.ts]"]
end

subgraph group_admin["Store Administration"]
  node_admin_page["Admin Route<br/>[admin.tsx]"]
  node_store_manager["Store Manager<br/>[StoreManager.tsx]"]
  node_product_files["Product File Manager"]
  node_order_manager["Order Manager<br/>[OrderManager.tsx]"]
  node_overrides[("Catalog Overrides<br/>[admin-overrides.ts]")]
  node_product_file_service["Product File Service<br/>[product-files.ts]"]
end

node_customer(("Customer"))

node_customer -->|"browses"| node_home
node_home -->|"renders"| node_site_sections
node_customer -.->|"browses"| node_shop
node_shop -->|"reads"| node_catalog
node_shop -.->|"opens product"| node_product_page
node_product_page -->|"reads"| node_catalog
node_product_page -->|"adds items"| node_cart_state
node_customer -.->|"reviews cart"| node_cart_page
node_cart_page -.->|"reads"| node_cart_state
node_customer -.->|"checks out"| node_checkout_page
node_checkout_page -->|"reads"| node_cart_state
node_checkout_page -->|"reads"| node_catalog
node_checkout_page -.->|"starts payment"| node_stripe_checkout
node_stripe_checkout -.->|"creates session"| node_stripe
node_stripe -.->|"sends event"| node_stripe_webhook
node_stripe_webhook -->|"persists order"| node_order_store
node_stripe_webhook -->|"resolves links"| node_download_links
node_stripe_webhook -->|"sends receipt"| node_order_email
node_customer -.->|"downloads"| node_download_api
node_admin_page -.->|"hosts"| node_store_manager
node_store_manager -->|"loads and saves"| node_overrides
node_store_manager -.->|"uploads files"| node_product_files
node_product_files -->|"builds product list"| node_catalog
node_product_files -->|"uploads files"| node_product_file_service
node_order_manager -.->|"reads orders"| node_order_store
node_customer -.->|"subscribes"| node_newsletter_api
node_newsletter_api -->|"sends email"| node_order_email
node_customer -.->|"sends inquiry"| node_contact_api

click node_home "https://github.com/helstore/new-helstore/blob/main/src/routes/index.tsx"
click node_site_sections "https://github.com/helstore/new-helstore/tree/main/src/components/site"
click node_shop "https://github.com/helstore/new-helstore/tree/main/src/routes/shop"
click node_product_page "https://github.com/helstore/new-helstore/blob/main/src/routes/product/%24slug.tsx"
click node_catalog "https://github.com/helstore/new-helstore/blob/main/src/data/catalog.ts"
click node_cart_state "https://github.com/helstore/new-helstore/blob/main/src/lib/cart.tsx"
click node_cart_page "https://github.com/helstore/new-helstore/blob/main/src/routes/cart.tsx"
click node_checkout_page "https://github.com/helstore/new-helstore/blob/main/src/routes/checkout/index.tsx"
click node_stripe_checkout "https://github.com/helstore/new-helstore/blob/main/src/routes/api/stripe/checkout.ts"
click node_stripe_webhook "https://github.com/helstore/new-helstore/blob/main/src/routes/api/stripe/webhook.ts"
click node_order_store "https://github.com/helstore/new-helstore/blob/main/src/lib/supabase-server.ts"
click node_download_links "https://github.com/helstore/new-helstore/blob/main/src/lib/downloads.server.ts"
click node_order_email "https://github.com/helstore/new-helstore/blob/main/src/lib/email.ts"
click node_download_api "https://github.com/helstore/new-helstore/blob/main/src/routes/api/downloads/%24slug.ts"
click node_admin_page "https://github.com/helstore/new-helstore/blob/main/src/routes/admin.tsx"
click node_store_manager "https://github.com/helstore/new-helstore/blob/main/src/components/admin/StoreManager.tsx"
click node_product_files "https://github.com/helstore/new-helstore/blob/main/src/components/admin/ProductFilesManager.tsx"
click node_order_manager "https://github.com/helstore/new-helstore/blob/main/src/components/admin/OrderManager.tsx"
click node_overrides "https://github.com/helstore/new-helstore/blob/main/src/lib/admin-overrides.ts"
click node_product_file_service "https://github.com/helstore/new-helstore/blob/main/src/lib/product-files.ts"
click node_newsletter_api "https://github.com/helstore/new-helstore/blob/main/src/routes/api/newsletter.ts"
click node_contact_api "https://github.com/helstore/new-helstore/blob/main/src/routes/api/contact.ts"

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_home,node_site_sections,node_shop,node_product_page,node_catalog toneBlue
class node_cart_state,node_cart_page,node_checkout_page,node_stripe_checkout,node_stripe toneAmber
class node_stripe_webhook,node_order_store,node_download_links,node_order_email,node_download_api,node_newsletter_api,node_contact_api toneMint
class node_admin_page,node_store_manager,node_product_files,node_order_manager,node_overrides,node_product_file_service toneRose
class node_customer toneIndigo
```

## Components

### Storefront

- [Home Page](https://github.com/helstore/new-helstore/blob/main/src/routes/index.tsx): `src/routes/index.tsx`
- [Storefront Sections](https://github.com/helstore/new-helstore/tree/main/src/components/site): `src/components/site`
- [Shop Routes](https://github.com/helstore/new-helstore/tree/main/src/routes/shop): `src/routes/shop`
- [Product Page](https://github.com/helstore/new-helstore/blob/main/src/routes/product/%24slug.tsx): `src/routes/product/$slug.tsx`
- [Product Catalog](https://github.com/helstore/new-helstore/blob/main/src/data/catalog.ts): `src/data/catalog.ts`

### Commerce

- [Cart State](https://github.com/helstore/new-helstore/blob/main/src/lib/cart.tsx): `src/lib/cart.tsx`
- [Cart Page](https://github.com/helstore/new-helstore/blob/main/src/routes/cart.tsx): `src/routes/cart.tsx`
- [Checkout Page](https://github.com/helstore/new-helstore/blob/main/src/routes/checkout/index.tsx): `src/routes/checkout/index.tsx`
- [Stripe Checkout API](https://github.com/helstore/new-helstore/blob/main/src/routes/api/stripe/checkout.ts): `src/routes/api/stripe/checkout.ts`
- **Stripe**

### Order Fulfillment

- [Stripe Webhook](https://github.com/helstore/new-helstore/blob/main/src/routes/api/stripe/webhook.ts): `src/routes/api/stripe/webhook.ts`
- [Order Store](https://github.com/helstore/new-helstore/blob/main/src/lib/supabase-server.ts): `src/lib/supabase-server.ts`
- [Download Links](https://github.com/helstore/new-helstore/blob/main/src/lib/downloads.server.ts): `src/lib/downloads.server.ts`
- [Order Email](https://github.com/helstore/new-helstore/blob/main/src/lib/email.ts): `src/lib/email.ts`
- [Download Routes](https://github.com/helstore/new-helstore/blob/main/src/routes/api/downloads/%24slug.ts): `src/routes/api/downloads/$slug.ts`
- [Newsletter API](https://github.com/helstore/new-helstore/blob/main/src/routes/api/newsletter.ts): `src/routes/api/newsletter.ts`
- [Contact API](https://github.com/helstore/new-helstore/blob/main/src/routes/api/contact.ts): `src/routes/api/contact.ts`

### Store Administration

- [Admin Route](https://github.com/helstore/new-helstore/blob/main/src/routes/admin.tsx): `src/routes/admin.tsx`
- [Store Manager](https://github.com/helstore/new-helstore/blob/main/src/components/admin/StoreManager.tsx): `src/components/admin/StoreManager.tsx`
- [Product File Manager](https://github.com/helstore/new-helstore/blob/main/src/components/admin/ProductFilesManager.tsx): `src/components/admin/ProductFilesManager.tsx`
- [Order Manager](https://github.com/helstore/new-helstore/blob/main/src/components/admin/OrderManager.tsx): `src/components/admin/OrderManager.tsx`
- [Catalog Overrides](https://github.com/helstore/new-helstore/blob/main/src/lib/admin-overrides.ts): `src/lib/admin-overrides.ts`
- [Product File Service](https://github.com/helstore/new-helstore/blob/main/src/lib/product-files.ts): `src/lib/product-files.ts`

### Other components

- **Customer**

## Connections

- Customer → Home Page: browses (evidence: `src/routes/index.tsx`)
- Home Page → Storefront Sections: renders (evidence: `src/routes/index.tsx`)
- Customer → Shop Routes: browses
- Shop Routes → Product Catalog: reads (evidence: `src/routes/shop/index.tsx`)
- Shop Routes → Product Page: opens product
- Product Page → Product Catalog: reads (evidence: `src/routes/product/$slug.tsx`)
- Product Page → Cart State: adds items (evidence: `src/routes/product/$slug.tsx`)
- Customer → Cart Page: reviews cart
- Cart Page → Cart State: reads
- Customer → Checkout Page: checks out
- Checkout Page → Cart State: reads (evidence: `src/routes/checkout/index.tsx`)
- Checkout Page → Product Catalog: reads (evidence: `src/routes/checkout/index.tsx`)
- Checkout Page → Stripe Checkout API: starts payment
- Stripe Checkout API → Stripe: creates session
- Stripe → Stripe Webhook: sends event
- Stripe Webhook → Order Store: persists order (evidence: `src/routes/api/stripe/webhook.ts`)
- Stripe Webhook → Download Links: resolves links (evidence: `src/routes/api/stripe/webhook.ts`)
- Stripe Webhook → Order Email: sends receipt (evidence: `src/routes/api/stripe/webhook.ts`)
- Customer → Download Routes: downloads
- Admin Route → Store Manager: hosts
- Store Manager → Catalog Overrides: loads and saves (evidence: `src/components/admin/StoreManager.tsx`)
- Store Manager → Product File Manager: uploads files
- Product File Manager → Product Catalog: builds product list (evidence: `src/components/admin/ProductFilesManager.tsx`)
- Product File Manager → Product File Service: uploads files (evidence: `src/components/admin/ProductFilesManager.tsx`)
- Order Manager → Order Store: reads orders
- Customer → Newsletter API: subscribes
- Newsletter API → Order Email: sends email (evidence: `src/routes/api/newsletter.ts`)
- Customer → Contact API: sends inquiry
