# lsiphonl/greenleaf architecture

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

- Interactive diagram: https://gitdiagram.com/lsiphonl/greenleaf
- Repository: https://github.com/lsiphonl/greenleaf

## Overview

The GreenLeaf Club is a members-only cannabis retail portal. Its visible workflow mounts the app, gates access through login, then routes signed-in members to shopping, product, location, community, profile, FAQ, or staff-admin views. The app also restores remembered sessions and reads a member count from a database service. The tree omits the imported page, component, and service files, and the README is empty, so their internals and further relationships cannot be verified.

Main entry points: [`App.tsx`](https://github.com/lsiphonl/greenleaf/blob/main/App.tsx) (App router), [`index.tsx`](https://github.com/lsiphonl/greenleaf/blob/main/index.tsx) (React mount), [`constants.ts`](https://github.com/lsiphonl/greenleaf/blob/main/constants.ts) (Catalog data), [`types.ts`](https://github.com/lsiphonl/greenleaf/blob/main/types.ts) (Domain types)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_mount["React mount<br/>[index.tsx]"]
  node_app["App router<br/>[App.tsx]"]
end

subgraph group_access["Member access"]
  node_login["Login"]
  node_session[("Remembered session<br/>[App.tsx]")]
end

subgraph group_portal["Member portal"]
  node_navigation["Navigation"]
  node_shop["Shop"]
  node_product["Product details"]
  node_locations["Store locations"]
  node_lounge["Member lounge"]
  node_faq["FAQs"]
  node_profile["Member profile"]
  node_admin["Staff admin"]
  node_chat["Chatbot"]
end

subgraph group_data["Domain data"]
  node_db[("Database service")]
  node_catalog["Catalog data<br/>[constants.ts]"]
  node_domain["Domain types<br/>[types.ts]"]
end

node_browser(("Visitor or member"))

node_browser -->|"opens"| node_mount
node_mount -->|"renders"| node_app
node_app -->|"restores and updates"| node_session
node_app -->|"reads member count"| node_db
node_app -->|"routes to"| node_login
node_login -->|"reports login"| node_app
node_app -->|"renders"| node_navigation
node_app -->|"routes to"| node_shop
node_app -->|"routes to"| node_product
node_app -->|"routes to"| node_locations
node_app -->|"routes to"| node_lounge
node_app -->|"routes to"| node_faq
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_admin
node_app -->|"renders"| node_chat
node_catalog -->|"types use"| node_domain

click node_mount "https://github.com/lsiphonl/greenleaf/blob/main/index.tsx"
click node_app "https://github.com/lsiphonl/greenleaf/blob/main/App.tsx"
click node_session "https://github.com/lsiphonl/greenleaf/blob/main/App.tsx"
click node_catalog "https://github.com/lsiphonl/greenleaf/blob/main/constants.ts"
click node_domain "https://github.com/lsiphonl/greenleaf/blob/main/types.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_mount,node_app toneBlue
class node_login,node_session toneAmber
class node_navigation,node_shop,node_product,node_locations,node_lounge,node_faq,node_profile,node_admin,node_chat toneMint
class node_db,node_catalog,node_domain toneRose
class node_browser toneIndigo
```

## Components

### Application entry

- [React mount](https://github.com/lsiphonl/greenleaf/blob/main/index.tsx): `index.tsx`
- [App router](https://github.com/lsiphonl/greenleaf/blob/main/App.tsx): `App.tsx`

### Member access

- **Login**
- [Remembered session](https://github.com/lsiphonl/greenleaf/blob/main/App.tsx): `App.tsx`

### Member portal

- **Navigation**
- **Shop**
- **Product details**
- **Store locations**
- **Member lounge**
- **FAQs**
- **Member profile**
- **Staff admin**
- **Chatbot**

### Domain data

- **Database service**
- [Catalog data](https://github.com/lsiphonl/greenleaf/blob/main/constants.ts): `constants.ts`
- [Domain types](https://github.com/lsiphonl/greenleaf/blob/main/types.ts): `types.ts`

### Other components

- **Visitor or member**

## Connections

- Visitor or member → React mount: opens (evidence: `index.tsx`)
- React mount → App router: renders (evidence: `index.tsx`)
- App router → Remembered session: restores and updates (evidence: `App.tsx`)
- App router → Database service: reads member count (evidence: `App.tsx`)
- App router → Login: routes to (evidence: `App.tsx`)
- Login → App router: reports login (evidence: `App.tsx`)
- App router → Navigation: renders (evidence: `App.tsx`)
- App router → Shop: routes to (evidence: `App.tsx`)
- App router → Product details: routes to (evidence: `App.tsx`)
- App router → Store locations: routes to (evidence: `App.tsx`)
- App router → Member lounge: routes to (evidence: `App.tsx`)
- App router → FAQs: routes to (evidence: `App.tsx`)
- App router → Member profile: routes to (evidence: `App.tsx`)
- App router → Staff admin: routes to (evidence: `App.tsx`)
- App router → Chatbot: renders (evidence: `App.tsx`)
- Catalog data → Domain types: types use (evidence: `constants.ts`)
