# moen-nganga/smartart254 architecture

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

- Interactive diagram: https://gitdiagram.com/moen-nganga/smartart254
- Repository: https://github.com/moen-nganga/smartart254

## Overview

SmartArt254 is a public site for hands-on art programmes, workshops and events, with account-based booking and an admin booking view. Visitors browse offerings, sign in, submit a booking request and can contact the business through WhatsApp; admins review and update requests. The route table, booking and admin calls, and session helper are evidenced in the excerpts or SOURCE INDEX. Backend persistence and Google OAuth details are not sampled, so those connections are shown only as unverified where appropriate.

Main entry points: [`src/main.tsx`](https://github.com/moen-nganga/smartart254/blob/master/src/main.tsx) (Route selection), [`src/pages/Home.tsx`](https://github.com/moen-nganga/smartart254/blob/master/src/pages/Home.tsx) (Home), [`src/pages/Book.tsx`](https://github.com/moen-nganga/smartart254/blob/master/src/pages/Book.tsx) (Booking form), [`api/bookings.ts`](https://github.com/moen-nganga/smartart254/blob/master/api/bookings.ts) (Booking API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Public discovery"]
  node_home["Home<br/>[Home.tsx]"]
  node_school["School programmes<br/>[Schools.tsx]"]
  node_workshops["Workshops<br/>[Workshops.tsx]"]
  node_events["Events<br/>[Events.tsx]"]
end

subgraph group_accounts["Accounts and booking"]
  node_signin["Sign in<br/>[SignIn.tsx]"]
  node_signup["Sign up<br/>[SignUp.tsx]"]
  node_book["Booking form<br/>[Book.tsx]"]
  node_member["Member area<br/>[Member.tsx]"]
  node_authclient["Auth client<br/>[auth.ts]"]
  node_authapi["Auth API<br/>[auth.ts]"]
  node_session["Session signing<br/>[_session.ts]"]
  node_googlestart["Google sign-in start<br/>[start.ts]"]
  node_googlecallback["Google callback<br/>[callback.ts]"]
end

subgraph group_operations["Booking operations"]
  node_bookingapi["Booking API<br/>[bookings.ts]"]
  node_adminbookings["Admin bookings<br/>[AdminBookings.tsx]"]
  node_bookingdb[("Booking database<br/>[schema.sql]")]
end

subgraph group_shared["Shared UI and data"]
  node_catalog["Offer catalogue<br/>[data.ts]"]
  node_featurelist["Offer listings<br/>[FeatureList.tsx]"]
  node_layout["Site layout<br/>[Layout.tsx]"]
  node_router["Route selection<br/>[main.tsx]"]
  node_whatsapp["WhatsApp contact<br/>[WhatsAppMenu.tsx]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens site"| node_router
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_school
node_router -->|"routes to"| node_workshops
node_router -->|"routes to"| node_events
node_router -->|"routes to"| node_book
node_router -->|"routes to"| node_signin
node_router -->|"routes to"| node_signup
node_router -->|"routes to"| node_member
node_home -->|"renders in"| node_layout
node_home -->|"renders contact"| node_whatsapp
node_home -->|"links to"| node_school
node_home -->|"links to"| node_workshops
node_home -->|"links to"| node_events
node_school -->|"renders offers"| node_featurelist
node_workshops -->|"renders offers"| node_featurelist
node_events -->|"renders offers"| node_featurelist
node_featurelist -->|"reads offers"| node_catalog
node_featurelist -->|"links to booking"| node_book
node_book -->|"checks account"| node_authclient
node_book -->|"submits request"| node_bookingapi
node_book -->|"loads options"| node_catalog
node_authclient -->|"calls auth"| node_authapi
node_authapi -->|"uses sessions"| node_session
node_member -->|"checks account"| node_authclient
node_member -->|"submits request"| node_bookingapi
node_member -->|"renders admin view"| node_adminbookings
node_adminbookings -->|"manages requests"| node_bookingapi
node_bookingapi -->|"uses sessions"| node_session
node_bookingapi -.->|"may persist requests"| node_bookingdb
node_googlestart -.->|"continues sign-in"| node_googlecallback
node_googlecallback -->|"uses sessions"| node_session

click node_home "https://github.com/moen-nganga/smartart254/blob/master/src/pages/Home.tsx"
click node_school "https://github.com/moen-nganga/smartart254/blob/master/src/pages/Schools.tsx"
click node_workshops "https://github.com/moen-nganga/smartart254/blob/master/src/pages/Workshops.tsx"
click node_events "https://github.com/moen-nganga/smartart254/blob/master/src/pages/Events.tsx"
click node_signin "https://github.com/moen-nganga/smartart254/blob/master/src/pages/SignIn.tsx"
click node_signup "https://github.com/moen-nganga/smartart254/blob/master/src/pages/SignUp.tsx"
click node_book "https://github.com/moen-nganga/smartart254/blob/master/src/pages/Book.tsx"
click node_member "https://github.com/moen-nganga/smartart254/blob/master/src/pages/Member.tsx"
click node_authclient "https://github.com/moen-nganga/smartart254/blob/master/src/auth.ts"
click node_authapi "https://github.com/moen-nganga/smartart254/blob/master/api/auth.ts"
click node_session "https://github.com/moen-nganga/smartart254/blob/master/api/_session.ts"
click node_googlestart "https://github.com/moen-nganga/smartart254/blob/master/api/google/start.ts"
click node_googlecallback "https://github.com/moen-nganga/smartart254/blob/master/api/google/callback.ts"
click node_bookingapi "https://github.com/moen-nganga/smartart254/blob/master/api/bookings.ts"
click node_adminbookings "https://github.com/moen-nganga/smartart254/blob/master/src/components/AdminBookings.tsx"
click node_bookingdb "https://github.com/moen-nganga/smartart254/blob/master/db/schema.sql"
click node_catalog "https://github.com/moen-nganga/smartart254/blob/master/src/data.ts"
click node_featurelist "https://github.com/moen-nganga/smartart254/blob/master/src/components/FeatureList.tsx"
click node_layout "https://github.com/moen-nganga/smartart254/blob/master/src/components/Layout.tsx"
click node_router "https://github.com/moen-nganga/smartart254/blob/master/src/main.tsx"
click node_whatsapp "https://github.com/moen-nganga/smartart254/blob/master/src/components/WhatsAppMenu.tsx"

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_school,node_workshops,node_events toneBlue
class node_signin,node_signup,node_book,node_member,node_authclient,node_authapi,node_session,node_googlestart,node_googlecallback toneAmber
class node_bookingapi,node_adminbookings,node_bookingdb toneMint
class node_catalog,node_featurelist,node_layout,node_router,node_whatsapp toneRose
class node_visitor toneIndigo
```

## Components

### Public discovery

- [Home](https://github.com/moen-nganga/smartart254/blob/master/src/pages/Home.tsx): `src/pages/Home.tsx`
- [School programmes](https://github.com/moen-nganga/smartart254/blob/master/src/pages/Schools.tsx): `src/pages/Schools.tsx`
- [Workshops](https://github.com/moen-nganga/smartart254/blob/master/src/pages/Workshops.tsx): `src/pages/Workshops.tsx`
- [Events](https://github.com/moen-nganga/smartart254/blob/master/src/pages/Events.tsx): `src/pages/Events.tsx`

### Accounts and booking

- [Sign in](https://github.com/moen-nganga/smartart254/blob/master/src/pages/SignIn.tsx): `src/pages/SignIn.tsx`
- [Sign up](https://github.com/moen-nganga/smartart254/blob/master/src/pages/SignUp.tsx): `src/pages/SignUp.tsx`
- [Booking form](https://github.com/moen-nganga/smartart254/blob/master/src/pages/Book.tsx): `src/pages/Book.tsx`
- [Member area](https://github.com/moen-nganga/smartart254/blob/master/src/pages/Member.tsx): `src/pages/Member.tsx`
- [Auth client](https://github.com/moen-nganga/smartart254/blob/master/src/auth.ts): `src/auth.ts`
- [Auth API](https://github.com/moen-nganga/smartart254/blob/master/api/auth.ts): `api/auth.ts`
- [Session signing](https://github.com/moen-nganga/smartart254/blob/master/api/_session.ts): `api/_session.ts`
- [Google sign-in start](https://github.com/moen-nganga/smartart254/blob/master/api/google/start.ts): `api/google/start.ts`
- [Google callback](https://github.com/moen-nganga/smartart254/blob/master/api/google/callback.ts): `api/google/callback.ts`

### Booking operations

- [Booking API](https://github.com/moen-nganga/smartart254/blob/master/api/bookings.ts): `api/bookings.ts`
- [Admin bookings](https://github.com/moen-nganga/smartart254/blob/master/src/components/AdminBookings.tsx): `src/components/AdminBookings.tsx`
- [Booking database](https://github.com/moen-nganga/smartart254/blob/master/db/schema.sql): `db/schema.sql`

### Shared UI and data

- [Offer catalogue](https://github.com/moen-nganga/smartart254/blob/master/src/data.ts): `src/data.ts`
- [Offer listings](https://github.com/moen-nganga/smartart254/blob/master/src/components/FeatureList.tsx): `src/components/FeatureList.tsx`
- [Site layout](https://github.com/moen-nganga/smartart254/blob/master/src/components/Layout.tsx): `src/components/Layout.tsx`
- [Route selection](https://github.com/moen-nganga/smartart254/blob/master/src/main.tsx): `src/main.tsx`
- [WhatsApp contact](https://github.com/moen-nganga/smartart254/blob/master/src/components/WhatsAppMenu.tsx): `src/components/WhatsAppMenu.tsx`

### Other components

- **Visitor**

## Connections

- Visitor → Route selection: opens site (evidence: `src/main.tsx`)
- Route selection → Home: routes to (evidence: `src/main.tsx`)
- Route selection → School programmes: routes to (evidence: `src/main.tsx`)
- Route selection → Workshops: routes to (evidence: `src/main.tsx`)
- Route selection → Events: routes to (evidence: `src/main.tsx`)
- Route selection → Booking form: routes to (evidence: `src/main.tsx`)
- Route selection → Sign in: routes to (evidence: `src/main.tsx`)
- Route selection → Sign up: routes to (evidence: `src/main.tsx`)
- Route selection → Member area: routes to (evidence: `src/main.tsx`)
- Home → Site layout: renders in (evidence: `src/pages/Home.tsx`)
- Home → WhatsApp contact: renders contact (evidence: `src/pages/Home.tsx`)
- Home → School programmes: links to (evidence: `src/pages/Home.tsx`)
- Home → Workshops: links to (evidence: `src/pages/Home.tsx`)
- Home → Events: links to (evidence: `src/pages/Home.tsx`)
- School programmes → Offer listings: renders offers (evidence: `src/pages/Schools.tsx`)
- Workshops → Offer listings: renders offers (evidence: `src/pages/Workshops.tsx`)
- Events → Offer listings: renders offers (evidence: `src/pages/Events.tsx`)
- Offer listings → Offer catalogue: reads offers (evidence: `src/components/FeatureList.tsx`)
- Offer listings → Booking form: links to booking (evidence: `src/components/FeatureList.tsx`)
- Booking form → Auth client: checks account (evidence: `src/pages/Book.tsx`)
- Booking form → Booking API: submits request (evidence: `src/pages/Book.tsx`)
- Booking form → Offer catalogue: loads options (evidence: `src/pages/Book.tsx`)
- Auth client → Auth API: calls auth (evidence: `src/auth.ts`)
- Auth API → Session signing: uses sessions (evidence: `api/auth.ts`)
- Member area → Auth client: checks account (evidence: `src/pages/Member.tsx`)
- Member area → Booking API: submits request (evidence: `src/pages/Member.tsx`)
- Member area → Admin bookings: renders admin view (evidence: `src/pages/Member.tsx`)
- Admin bookings → Booking API: manages requests (evidence: `src/components/AdminBookings.tsx`)
- Booking API → Session signing: uses sessions (evidence: `api/bookings.ts`)
- Booking API → Booking database: may persist requests
- Google sign-in start → Google callback: continues sign-in
- Google callback → Session signing: uses sessions (evidence: `api/google/callback.ts`)
