# panglimabesarisis-cloud/emirate-artist-match architecture

> Architecture diagram of the GitHub repository panglimabesarisis-cloud/emirate-artist-match, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/panglimabesarisis-cloud/emirate-artist-match
- Repository: https://github.com/panglimabesarisis-cloud/emirate-artist-match

## Overview

Emirate Artist Match appears to be an artist-discovery and booking marketplace, with authenticated tools for managing bookings and business operations. The likely customer journey is browsing and filtering artists, viewing a profile, then requesting or paying for a booking; the tree also shows distinct payment, messaging, AI-flow, and MCP capabilities. The README gives little product detail, and several key routes and libraries were not sampled, so links for those workflows are shown only as unverified rather than asserted calls.

Main entry points: [`src/integrations/supabase/client.server.ts`](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/integrations/supabase/client.server.ts) (Supabase), [`src/components/site/SearchPage.tsx`](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/components/site/SearchPage.tsx) (Artist search), [`src/routes/api/public/whatsapp/fonnte-webhook.ts`](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/routes/api/public/whatsapp/fonnte-webhook.ts) (WhatsApp webhook), [`src/lib/fonnte-webhook.server.ts`](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/lib/fonnte-webhook.server.ts) (Fonnte processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Artist discovery"]
  node_search["Artist search<br/>[SearchPage.tsx]"]
  node_listing["Listing filters<br/>[ListingSearch.tsx]"]
  node_artist_card["Artist cards"]
  node_artist_profile["Artist profile<br/>[artist.$slug.tsx]"]
  node_public_data["Public data API"]
end

subgraph group_booking["Booking operations"]
  node_join["Talent onboarding<br/>[join.tsx]"]
  node_dashboard["Business dashboard<br/>[dashboard.tsx]"]
  node_booking_api["Booking operations"]
  node_payment_webhook["Payment webhook<br/>[webhook.ts]"]
  node_payment_events["Payment events"]
  node_flow_builder["Chat flow builder<br/>[FlowBuilder.tsx]"]
  node_flow_logic["AI flow logic<br/>[ai-flow.ts]"]
end

subgraph group_integrations["External integrations"]
  node_database[("Supabase<br/>[client.server.ts]")]
  node_whatsapp_route["WhatsApp webhook<br/>[fonnte-webhook.ts]"]
  node_whatsapp_processor["Fonnte processing"]
  node_whatsapp_provider["WhatsApp provider"]
end

subgraph group_access["Access and tools"]
  node_auth["Authentication<br/>[auth.tsx]"]
  node_auth_guard["Authenticated routes<br/>[route.tsx]"]
  node_mcp["MCP tools<br/>[index.ts]"]
  node_router["Application router<br/>[router.tsx]"]
  node_route_tree["Route registry<br/>[routeTree.gen.ts]"]
end

node_visitor(("Visitor"))

node_visitor -.->|"browses"| node_search
node_search -->|"renders"| node_listing
node_search -->|"renders"| node_artist_card
node_search -->|"queries"| node_public_data
node_visitor -.->|"opens profile"| node_artist_profile
node_artist_profile -.->|"requests booking"| node_join
node_join -.->|"submits details"| node_database
node_dashboard -.->|"manages bookings"| node_booking_api
node_payment_webhook -->|"dispatches"| node_payment_events
node_payment_webhook -.->|"uses admin client"| node_database
node_whatsapp_route -->|"authenticates and processes"| node_whatsapp_processor
node_whatsapp_route -->|"checks provider"| node_whatsapp_provider
node_whatsapp_route -->|"stores events"| node_database
node_whatsapp_processor -->|"reads configuration"| node_whatsapp_provider
node_whatsapp_processor -->|"persists workflow"| node_database
node_flow_builder -.->|"uses flow logic"| node_flow_logic
node_auth -->|"authenticates"| node_database
node_auth_guard -->|"checks user"| node_database
node_router -->|"loads routes"| node_route_tree

click node_search "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/components/site/SearchPage.tsx"
click node_listing "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/components/site/ListingSearch.tsx"
click node_artist_card "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/components/site/ListingArtistCard.tsx"
click node_artist_profile "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/routes/artist.%24slug.tsx"
click node_public_data "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/lib/public.functions.ts"
click node_join "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/routes/join.tsx"
click node_dashboard "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/routes/_authenticated/dashboard.tsx"
click node_booking_api "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/lib/bookings.functions.ts"
click node_payment_webhook "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/routes/api/public/payments/webhook.ts"
click node_payment_events "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/lib/payment-events.server.ts"
click node_database "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/integrations/supabase/client.server.ts"
click node_whatsapp_route "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/routes/api/public/whatsapp/fonnte-webhook.ts"
click node_whatsapp_processor "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/lib/fonnte-webhook.server.ts"
click node_whatsapp_provider "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/lib/whatsapp-provider.server.ts"
click node_flow_builder "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/components/flow/FlowBuilder.tsx"
click node_flow_logic "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/lib/ai-flow.ts"
click node_auth "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/routes/auth.tsx"
click node_auth_guard "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/routes/_authenticated/route.tsx"
click node_mcp "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/lib/mcp/index.ts"
click node_router "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/router.tsx"
click node_route_tree "https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/routeTree.gen.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_search,node_listing,node_artist_card,node_artist_profile,node_public_data toneBlue
class node_join,node_dashboard,node_booking_api,node_payment_webhook,node_payment_events,node_flow_builder,node_flow_logic toneAmber
class node_database,node_whatsapp_route,node_whatsapp_processor,node_whatsapp_provider toneMint
class node_auth,node_auth_guard,node_mcp,node_router,node_route_tree toneRose
class node_visitor toneIndigo
```

## Components

### Artist discovery

- [Artist search](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/components/site/SearchPage.tsx): `src/components/site/SearchPage.tsx`
- [Listing filters](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/components/site/ListingSearch.tsx): `src/components/site/ListingSearch.tsx`
- [Artist cards](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/components/site/ListingArtistCard.tsx): `src/components/site/ListingArtistCard.tsx`
- [Artist profile](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/routes/artist.%24slug.tsx): `src/routes/artist.$slug.tsx`
- [Public data API](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/lib/public.functions.ts): `src/lib/public.functions.ts`

### Booking operations

- [Talent onboarding](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/routes/join.tsx): `src/routes/join.tsx`
- [Business dashboard](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/routes/_authenticated/dashboard.tsx): `src/routes/_authenticated/dashboard.tsx`
- [Booking operations](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/lib/bookings.functions.ts): `src/lib/bookings.functions.ts`
- [Payment webhook](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/routes/api/public/payments/webhook.ts): `src/routes/api/public/payments/webhook.ts`
- [Payment events](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/lib/payment-events.server.ts): `src/lib/payment-events.server.ts`
- [Chat flow builder](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/components/flow/FlowBuilder.tsx): `src/components/flow/FlowBuilder.tsx`
- [AI flow logic](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/lib/ai-flow.ts): `src/lib/ai-flow.ts`

### External integrations

- [Supabase](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/integrations/supabase/client.server.ts): `src/integrations/supabase/client.server.ts`
- [WhatsApp webhook](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/routes/api/public/whatsapp/fonnte-webhook.ts): `src/routes/api/public/whatsapp/fonnte-webhook.ts`
- [Fonnte processing](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/lib/fonnte-webhook.server.ts): `src/lib/fonnte-webhook.server.ts`
- [WhatsApp provider](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/lib/whatsapp-provider.server.ts): `src/lib/whatsapp-provider.server.ts`

### Access and tools

- [Authentication](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/routes/auth.tsx): `src/routes/auth.tsx`
- [Authenticated routes](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/routes/_authenticated/route.tsx): `src/routes/_authenticated/route.tsx`
- [MCP tools](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/lib/mcp/index.ts): `src/lib/mcp/index.ts`
- [Application router](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/router.tsx): `src/router.tsx`
- [Route registry](https://github.com/panglimabesarisis-cloud/emirate-artist-match/blob/main/src/routeTree.gen.ts): `src/routeTree.gen.ts`

### Other components

- **Visitor**

## Connections

- Visitor → Artist search: browses
- Artist search → Listing filters: renders (evidence: `src/components/site/SearchPage.tsx`)
- Artist search → Artist cards: renders (evidence: `src/components/site/SearchPage.tsx`)
- Artist search → Public data API: queries (evidence: `src/components/site/SearchPage.tsx`)
- Visitor → Artist profile: opens profile
- Artist profile → Talent onboarding: requests booking
- Talent onboarding → Supabase: submits details
- Business dashboard → Booking operations: manages bookings
- Payment webhook → Payment events: dispatches (evidence: `src/routes/api/public/payments/webhook.ts`)
- Payment webhook → Supabase: uses admin client
- WhatsApp webhook → Fonnte processing: authenticates and processes (evidence: `src/routes/api/public/whatsapp/fonnte-webhook.ts`)
- WhatsApp webhook → WhatsApp provider: checks provider (evidence: `src/routes/api/public/whatsapp/fonnte-webhook.ts`)
- WhatsApp webhook → Supabase: stores events (evidence: `src/routes/api/public/whatsapp/fonnte-webhook.ts`)
- Fonnte processing → WhatsApp provider: reads configuration (evidence: `src/lib/fonnte-webhook.server.ts`)
- Fonnte processing → Supabase: persists workflow (evidence: `src/lib/fonnte-webhook.server.ts`)
- Chat flow builder → AI flow logic: uses flow logic
- Authentication → Supabase: authenticates (evidence: `src/routes/auth.tsx`)
- Authenticated routes → Supabase: checks user (evidence: `src/routes/_authenticated/route.tsx`)
- Application router → Route registry: loads routes (evidence: `src/router.tsx`)
