# osiris-booque/oyt-website architecture

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

- Interactive diagram: https://gitdiagram.com/osiris-booque/oyt-website
- Repository: https://github.com/osiris-booque/oyt-website

## Overview

Osiris Yoga Therapy combines a public marketing and offerings site with authenticated member, instructor, and admin portals. The main journey is attracting visitors, presenting wellness programs, taking enrollment through Stripe checkout, and delivering programs and community features to members. Supabase provides the application backend; separate edge functions handle payment events, CSV imports, account administration, and Google Calendar synchronization. The graph uses README-described capabilities and relationships visible in excerpts or the source index; unsampled page internals and integrations are not expanded into speculative call paths.

Main entry points: [`src/router`](https://github.com/osiris-booque/oyt-website/tree/main/src/router) (Application Routing), [`src/lib/supabase.ts`](https://github.com/osiris-booque/oyt-website/blob/main/src/lib/supabase.ts) (Supabase Client), [`src/pages/checkout`](https://github.com/osiris-booque/oyt-website/tree/main/src/pages/checkout) (Enrollment Checkout), [`src/pages/offerings`](https://github.com/osiris-booque/oyt-website/tree/main/src/pages/offerings) (Offerings Pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Marketing and Sales"]
  node_routes["Application Routing"]
  node_marketing["Marketing Pages"]
  node_offerings["Offerings Pages"]
  node_checkout["Enrollment Checkout"]
  node_paymentui["Payment Interface"]
end

subgraph group_identity["Identity and Access"]
  node_auth["Authentication Context<br/>[AuthContext.tsx]"]
end

subgraph group_member["Member Experience"]
  node_programs["Program Learning<br/>[CourseDetail.tsx]"]
  node_memberhome["Member Dashboard<br/>[DashboardHome.tsx]"]
  node_community["Community Forum<br/>[CommunityPage.tsx]"]
  node_messaging["Direct Messaging<br/>[MessagesPage.tsx]"]
  node_scheduling["Member Scheduling<br/>[BookingPage.tsx]"]
end

subgraph group_staff["Staff Operations"]
  node_instructor["Instructor Portal"]
  node_admin["Admin Management"]
end

subgraph group_services["Backend Services"]
  node_supaclient["Supabase Client<br/>[supabase.ts]"]
  node_supabase[("Supabase Backend")]
  node_csvimport["Program CSV Import<br/>[index.ts]"]
  node_stripe["Stripe Payments"]
  node_stripecheckout["Stripe Checkout Function<br/>[index.ts]"]
  node_webhook["Stripe Webhook<br/>[index.ts]"]
  node_calendar["Google Calendar Sync<br/>[index.ts]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens site"| node_routes
node_routes -->|"routes to"| node_marketing
node_routes -->|"routes to"| node_offerings
node_routes -->|"routes to"| node_checkout
node_offerings -->|"converts through"| node_checkout
node_checkout -->|"renders"| node_paymentui
node_checkout -.->|"creates payment"| node_stripecheckout
node_stripecheckout -->|"creates intents"| node_stripe
node_stripe -->|"sends events"| node_webhook
node_webhook -.->|"updates records"| node_supabase
node_routes -->|"provides identity"| node_auth
node_auth -->|"authenticates and reads profiles"| node_supaclient
node_supaclient -->|"connects to"| node_supabase
node_routes -->|"routes protected members"| node_memberhome
node_routes -->|"routes to"| node_programs
node_routes -->|"routes to"| node_community
node_routes -->|"routes to"| node_messaging
node_routes -->|"routes to"| node_scheduling
node_programs -->|"reads program data"| node_supaclient
node_community -->|"uses backend"| node_supaclient
node_messaging -->|"uses backend"| node_supaclient
node_routes -->|"routes protected staff"| node_instructor
node_routes -->|"routes protected staff"| node_admin
node_admin -.->|"imports programs"| node_csvimport
node_csvimport -->|"writes programs"| node_supabase
node_instructor -.->|"syncs availability"| node_calendar
node_calendar -->|"syncs schedule"| node_supabase

click node_routes "https://github.com/osiris-booque/oyt-website/tree/main/src/router"
click node_marketing "https://github.com/osiris-booque/oyt-website/tree/main/src/pages"
click node_offerings "https://github.com/osiris-booque/oyt-website/tree/main/src/pages/offerings"
click node_checkout "https://github.com/osiris-booque/oyt-website/tree/main/src/pages/checkout"
click node_paymentui "https://github.com/osiris-booque/oyt-website/tree/main/src/components/checkout"
click node_auth "https://github.com/osiris-booque/oyt-website/blob/main/src/components/context/AuthContext.tsx"
click node_supaclient "https://github.com/osiris-booque/oyt-website/blob/main/src/lib/supabase.ts"
click node_programs "https://github.com/osiris-booque/oyt-website/blob/main/src/pages/dashboard/CourseDetail.tsx"
click node_memberhome "https://github.com/osiris-booque/oyt-website/blob/main/src/pages/dashboard/DashboardHome.tsx"
click node_community "https://github.com/osiris-booque/oyt-website/blob/main/src/pages/dashboard/CommunityPage.tsx"
click node_messaging "https://github.com/osiris-booque/oyt-website/blob/main/src/pages/dashboard/MessagesPage.tsx"
click node_scheduling "https://github.com/osiris-booque/oyt-website/blob/main/src/pages/dashboard/BookingPage.tsx"
click node_instructor "https://github.com/osiris-booque/oyt-website/tree/main/src/pages/instructor"
click node_admin "https://github.com/osiris-booque/oyt-website/tree/main/src/pages/admin"
click node_csvimport "https://github.com/osiris-booque/oyt-website/blob/main/supabase/functions/import-program-csv/index.ts"
click node_stripecheckout "https://github.com/osiris-booque/oyt-website/blob/main/supabase/functions/stripe-checkout/index.ts"
click node_webhook "https://github.com/osiris-booque/oyt-website/blob/main/supabase/functions/stripe-webhook/index.ts"
click node_calendar "https://github.com/osiris-booque/oyt-website/blob/main/supabase/functions/sync-google-calendar/index.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_routes,node_marketing,node_offerings,node_checkout,node_paymentui toneBlue
class node_auth toneAmber
class node_programs,node_memberhome,node_community,node_messaging,node_scheduling toneMint
class node_instructor,node_admin toneRose
class node_supaclient,node_supabase,node_csvimport,node_stripe,node_stripecheckout,node_webhook,node_calendar,node_visitor toneIndigo
```

## Components

### Marketing and Sales

- [Application Routing](https://github.com/osiris-booque/oyt-website/tree/main/src/router): `src/router`
- [Marketing Pages](https://github.com/osiris-booque/oyt-website/tree/main/src/pages): `src/pages`
- [Offerings Pages](https://github.com/osiris-booque/oyt-website/tree/main/src/pages/offerings): `src/pages/offerings`
- [Enrollment Checkout](https://github.com/osiris-booque/oyt-website/tree/main/src/pages/checkout): `src/pages/checkout`
- [Payment Interface](https://github.com/osiris-booque/oyt-website/tree/main/src/components/checkout): `src/components/checkout`

### Identity and Access

- [Authentication Context](https://github.com/osiris-booque/oyt-website/blob/main/src/components/context/AuthContext.tsx): `src/components/context/AuthContext.tsx`

### Member Experience

- [Program Learning](https://github.com/osiris-booque/oyt-website/blob/main/src/pages/dashboard/CourseDetail.tsx): `src/pages/dashboard/CourseDetail.tsx`
- [Member Dashboard](https://github.com/osiris-booque/oyt-website/blob/main/src/pages/dashboard/DashboardHome.tsx): `src/pages/dashboard/DashboardHome.tsx`
- [Community Forum](https://github.com/osiris-booque/oyt-website/blob/main/src/pages/dashboard/CommunityPage.tsx): `src/pages/dashboard/CommunityPage.tsx`
- [Direct Messaging](https://github.com/osiris-booque/oyt-website/blob/main/src/pages/dashboard/MessagesPage.tsx): `src/pages/dashboard/MessagesPage.tsx`
- [Member Scheduling](https://github.com/osiris-booque/oyt-website/blob/main/src/pages/dashboard/BookingPage.tsx): `src/pages/dashboard/BookingPage.tsx`

### Staff Operations

- [Instructor Portal](https://github.com/osiris-booque/oyt-website/tree/main/src/pages/instructor): `src/pages/instructor`
- [Admin Management](https://github.com/osiris-booque/oyt-website/tree/main/src/pages/admin): `src/pages/admin`

### Backend Services

- [Supabase Client](https://github.com/osiris-booque/oyt-website/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- **Supabase Backend**
- [Program CSV Import](https://github.com/osiris-booque/oyt-website/blob/main/supabase/functions/import-program-csv/index.ts): `supabase/functions/import-program-csv/index.ts`
- **Stripe Payments**
- [Stripe Checkout Function](https://github.com/osiris-booque/oyt-website/blob/main/supabase/functions/stripe-checkout/index.ts): `supabase/functions/stripe-checkout/index.ts`
- [Stripe Webhook](https://github.com/osiris-booque/oyt-website/blob/main/supabase/functions/stripe-webhook/index.ts): `supabase/functions/stripe-webhook/index.ts`
- [Google Calendar Sync](https://github.com/osiris-booque/oyt-website/blob/main/supabase/functions/sync-google-calendar/index.ts): `supabase/functions/sync-google-calendar/index.ts`

### Other components

- **Visitor**

## Connections

- Visitor → Application Routing: opens site
- Application Routing → Marketing Pages: routes to (evidence: `src/router/marketingRoutes.tsx`)
- Application Routing → Offerings Pages: routes to (evidence: `src/router/offeringsRoutes.tsx`)
- Application Routing → Enrollment Checkout: routes to (evidence: `src/router/offeringsRoutes.tsx`)
- Offerings Pages → Enrollment Checkout: converts through
- Enrollment Checkout → Payment Interface: renders (evidence: `src/pages/checkout/SpringCohortCheckout.tsx`)
- Enrollment Checkout → Stripe Checkout Function: creates payment
- Stripe Checkout Function → Stripe Payments: creates intents
- Stripe Payments → Stripe Webhook: sends events
- Stripe Webhook → Supabase Backend: updates records
- Application Routing → Authentication Context: provides identity (evidence: `src/App.tsx`)
- Authentication Context → Supabase Client: authenticates and reads profiles (evidence: `src/components/context/AuthContext.tsx`)
- Supabase Client → Supabase Backend: connects to (evidence: `src/lib/supabase.ts`)
- Application Routing → Member Dashboard: routes protected members (evidence: `src/router/dashboardRoutes.tsx`)
- Application Routing → Program Learning: routes to (evidence: `src/router/dashboardRoutes.tsx`)
- Application Routing → Community Forum: routes to (evidence: `src/router/dashboardRoutes.tsx`)
- Application Routing → Direct Messaging: routes to (evidence: `src/router/dashboardRoutes.tsx`)
- Application Routing → Member Scheduling: routes to (evidence: `src/router/dashboardRoutes.tsx`)
- Program Learning → Supabase Client: reads program data (evidence: `src/pages/dashboard/CourseDetail.tsx`)
- Community Forum → Supabase Client: uses backend (evidence: `src/pages/dashboard/CommunityPage.tsx`)
- Direct Messaging → Supabase Client: uses backend (evidence: `src/pages/dashboard/MessagesPage.tsx`)
- Application Routing → Instructor Portal: routes protected staff (evidence: `src/router/instructorRoutes.tsx`)
- Application Routing → Admin Management: routes protected staff (evidence: `src/router/adminRoutes.tsx`)
- Admin Management → Program CSV Import: imports programs
- Program CSV Import → Supabase Backend: writes programs
- Instructor Portal → Google Calendar Sync: syncs availability
- Google Calendar Sync → Supabase Backend: syncs schedule
