# encredigitale/kozy-guest-app architecture

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

- Interactive diagram: https://gitdiagram.com/encredigitale/kozy-guest-app
- Repository: https://github.com/encredigitale/kozy-guest-app

## Overview

Guest Central is a web app for organizing events and coordinating guests. Its visible product areas include event and dashboard widgets, configurable extensions, invitations, profiles, and search. The clearest sampled workflow is search: a user enters a query, the page requests settings and results, and server-side search applies registered sources and scoring. The tree also shows event-planning and extension capabilities, but their runtime wiring was not sampled; those areas are represented without speculative connections.

Main entry points: [`src/integrations/supabase/client.ts`](https://github.com/encredigitale/kozy-guest-app/blob/main/src/integrations/supabase/client.ts) (Supabase client), [`src/lib/search.functions.ts`](https://github.com/encredigitale/kozy-guest-app/blob/main/src/lib/search.functions.ts) (Search server), [`src/core/search/useSearch.ts`](https://github.com/encredigitale/kozy-guest-app/blob/main/src/core/search/useSearch.ts) (Search queries), [`src/routes/_authenticated/app.search.tsx`](https://github.com/encredigitale/kozy-guest-app/blob/main/src/routes/_authenticated/app.search.tsx) (Search page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_router["Router<br/>[router.tsx]"]
  node_routes["Product routes"]
end

subgraph group_platform["Core platform"]
  node_supabase["Supabase client<br/>[client.ts]"]
  node_previewauth["Preview auth storage"]
  node_session["Session and roles<br/>[useSession.ts]"]
  node_registry["Widget registry<br/>[useRegistry.ts]"]
end

subgraph group_search["Search"]
  node_searchpage["Search page<br/>[app.search.tsx]"]
  node_searchhook["Search queries<br/>[useSearch.ts]"]
  node_searchserver["Search server"]
  node_searchregistry["Search sources<br/>[registry.ts]"]
  node_scoring["Search scoring<br/>[scoring.ts]"]
  node_messages["Message data<br/>[messages.server.ts]"]
  node_adminsearch["Search administration"]
end

subgraph group_extensions["Extensions"]
  node_extensions["Extension registry<br/>[registry.ts]"]
  node_extensionhooks["Extension loading<br/>[useExtensions.ts]"]
  node_contributions["Contributions"]
  node_profile["User profile<br/>[useUserProfile.ts]"]
  node_invitations["Invitation services"]
  node_recipes["Recipe services"]
end

subgraph group_event["Event features"]
  node_dashboard["Dashboard widgets"]
  node_eventwidgets["Event widgets"]
end

node_user(("User"))

node_router -->|"loads route tree"| node_routes
node_searchpage -->|"requests settings"| node_searchhook
node_searchpage -->|"queries event"| node_searchhook
node_searchhook -->|"fetches results"| node_searchserver
node_searchserver -->|"uses sources"| node_searchregistry
node_searchserver -->|"scores matches"| node_scoring
node_searchserver -->|"reads messages"| node_messages
node_searchserver -.->|"queries data"| node_supabase
node_searchhook -->|"returns results"| node_searchpage
node_adminsearch -->|"reads settings"| node_supabase
node_session -->|"checks session"| node_supabase
node_profile -->|"gets current user"| node_session
node_profile -->|"reads and writes"| node_supabase
node_contributions -->|"reads and writes"| node_supabase
node_extensionhooks -->|"loads definitions"| node_extensions
node_extensionhooks -->|"loads extensions"| node_supabase
node_registry -->|"loads widgets"| node_supabase
node_supabase -->|"configures auth storage"| node_previewauth
node_invitations -->|"uses server client"| node_supabase
node_invitations -->|"uses invitation config"| node_extensionhooks
node_recipes -.->|"uses data client"| node_supabase

click node_router "https://github.com/encredigitale/kozy-guest-app/blob/main/src/router.tsx"
click node_routes "https://github.com/encredigitale/kozy-guest-app/tree/main/src/routes"
click node_dashboard "https://github.com/encredigitale/kozy-guest-app/tree/main/src/widgets/dashboard"
click node_eventwidgets "https://github.com/encredigitale/kozy-guest-app/tree/main/src/widgets"
click node_supabase "https://github.com/encredigitale/kozy-guest-app/blob/main/src/integrations/supabase/client.ts"
click node_previewauth "https://github.com/encredigitale/kozy-guest-app/blob/main/src/integrations/supabase/previewAuthStorage.ts"
click node_session "https://github.com/encredigitale/kozy-guest-app/blob/main/src/core/auth/useSession.ts"
click node_registry "https://github.com/encredigitale/kozy-guest-app/blob/main/src/core/registry/useRegistry.ts"
click node_extensions "https://github.com/encredigitale/kozy-guest-app/blob/main/src/core/extensions/registry.ts"
click node_extensionhooks "https://github.com/encredigitale/kozy-guest-app/blob/main/src/core/extensions/useExtensions.ts"
click node_contributions "https://github.com/encredigitale/kozy-guest-app/blob/main/src/extensions/contributions/useContributions.ts"
click node_profile "https://github.com/encredigitale/kozy-guest-app/blob/main/src/extensions/user-info/useUserProfile.ts"
click node_searchpage "https://github.com/encredigitale/kozy-guest-app/blob/main/src/routes/_authenticated/app.search.tsx"
click node_searchhook "https://github.com/encredigitale/kozy-guest-app/blob/main/src/core/search/useSearch.ts"
click node_searchserver "https://github.com/encredigitale/kozy-guest-app/blob/main/src/lib/search.functions.ts"
click node_searchregistry "https://github.com/encredigitale/kozy-guest-app/blob/main/src/core/search/registry.ts"
click node_scoring "https://github.com/encredigitale/kozy-guest-app/blob/main/src/core/search/scoring.ts"
click node_messages "https://github.com/encredigitale/kozy-guest-app/blob/main/src/lib/messages.server.ts"
click node_adminsearch "https://github.com/encredigitale/kozy-guest-app/blob/main/src/routes/_authenticated/app.admin.search.tsx"
click node_invitations "https://github.com/encredigitale/kozy-guest-app/blob/main/src/lib/invitations.functions.ts"
click node_recipes "https://github.com/encredigitale/kozy-guest-app/blob/main/src/lib/recipes.functions.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_router,node_routes,node_user toneBlue
class node_supabase,node_previewauth,node_session,node_registry toneAmber
class node_searchpage,node_searchhook,node_searchserver,node_searchregistry,node_scoring,node_messages,node_adminsearch toneMint
class node_extensions,node_extensionhooks,node_contributions,node_profile,node_invitations,node_recipes toneRose
class node_dashboard,node_eventwidgets toneIndigo
```

## Components

### App shell

- [Router](https://github.com/encredigitale/kozy-guest-app/blob/main/src/router.tsx): `src/router.tsx`
- [Product routes](https://github.com/encredigitale/kozy-guest-app/tree/main/src/routes): `src/routes`

### Core platform

- [Supabase client](https://github.com/encredigitale/kozy-guest-app/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- [Preview auth storage](https://github.com/encredigitale/kozy-guest-app/blob/main/src/integrations/supabase/previewAuthStorage.ts): `src/integrations/supabase/previewAuthStorage.ts`
- [Session and roles](https://github.com/encredigitale/kozy-guest-app/blob/main/src/core/auth/useSession.ts): `src/core/auth/useSession.ts`
- [Widget registry](https://github.com/encredigitale/kozy-guest-app/blob/main/src/core/registry/useRegistry.ts): `src/core/registry/useRegistry.ts`

### Search

- [Search page](https://github.com/encredigitale/kozy-guest-app/blob/main/src/routes/_authenticated/app.search.tsx): `src/routes/_authenticated/app.search.tsx`
- [Search queries](https://github.com/encredigitale/kozy-guest-app/blob/main/src/core/search/useSearch.ts): `src/core/search/useSearch.ts`
- [Search server](https://github.com/encredigitale/kozy-guest-app/blob/main/src/lib/search.functions.ts): `src/lib/search.functions.ts`
- [Search sources](https://github.com/encredigitale/kozy-guest-app/blob/main/src/core/search/registry.ts): `src/core/search/registry.ts`
- [Search scoring](https://github.com/encredigitale/kozy-guest-app/blob/main/src/core/search/scoring.ts): `src/core/search/scoring.ts`
- [Message data](https://github.com/encredigitale/kozy-guest-app/blob/main/src/lib/messages.server.ts): `src/lib/messages.server.ts`
- [Search administration](https://github.com/encredigitale/kozy-guest-app/blob/main/src/routes/_authenticated/app.admin.search.tsx): `src/routes/_authenticated/app.admin.search.tsx`

### Extensions

- [Extension registry](https://github.com/encredigitale/kozy-guest-app/blob/main/src/core/extensions/registry.ts): `src/core/extensions/registry.ts`
- [Extension loading](https://github.com/encredigitale/kozy-guest-app/blob/main/src/core/extensions/useExtensions.ts): `src/core/extensions/useExtensions.ts`
- [Contributions](https://github.com/encredigitale/kozy-guest-app/blob/main/src/extensions/contributions/useContributions.ts): `src/extensions/contributions/useContributions.ts`
- [User profile](https://github.com/encredigitale/kozy-guest-app/blob/main/src/extensions/user-info/useUserProfile.ts): `src/extensions/user-info/useUserProfile.ts`
- [Invitation services](https://github.com/encredigitale/kozy-guest-app/blob/main/src/lib/invitations.functions.ts): `src/lib/invitations.functions.ts`
- [Recipe services](https://github.com/encredigitale/kozy-guest-app/blob/main/src/lib/recipes.functions.ts): `src/lib/recipes.functions.ts`

### Event features

- [Dashboard widgets](https://github.com/encredigitale/kozy-guest-app/tree/main/src/widgets/dashboard): `src/widgets/dashboard`
- [Event widgets](https://github.com/encredigitale/kozy-guest-app/tree/main/src/widgets): `src/widgets`

### Other components

- **User**

## Connections

- Router → Product routes: loads route tree (evidence: `src/router.tsx`)
- Search page → Search queries: requests settings (evidence: `src/routes/_authenticated/app.search.tsx`)
- Search page → Search queries: queries event (evidence: `src/routes/_authenticated/app.search.tsx`)
- Search queries → Search server: fetches results (evidence: `src/core/search/useSearch.ts`)
- Search server → Search sources: uses sources (evidence: `src/lib/search.functions.ts`)
- Search server → Search scoring: scores matches (evidence: `src/lib/search.functions.ts`)
- Search server → Message data: reads messages (evidence: `src/lib/search.functions.ts`)
- Search server → Supabase client: queries data
- Search queries → Search page: returns results (evidence: `src/core/search/useSearch.ts`)
- Search administration → Supabase client: reads settings (evidence: `src/routes/_authenticated/app.admin.search.tsx`)
- Session and roles → Supabase client: checks session (evidence: `src/core/auth/useSession.ts`)
- User profile → Session and roles: gets current user (evidence: `src/extensions/user-info/useUserProfile.ts`)
- User profile → Supabase client: reads and writes (evidence: `src/extensions/user-info/useUserProfile.ts`)
- Contributions → Supabase client: reads and writes (evidence: `src/extensions/contributions/useContributions.ts`)
- Extension loading → Extension registry: loads definitions (evidence: `src/core/extensions/useExtensions.ts`)
- Extension loading → Supabase client: loads extensions (evidence: `src/core/extensions/useExtensions.ts`)
- Widget registry → Supabase client: loads widgets (evidence: `src/core/registry/useRegistry.ts`)
- Supabase client → Preview auth storage: configures auth storage (evidence: `src/integrations/supabase/client.ts`)
- Invitation services → Supabase client: uses server client (evidence: `src/lib/invitations.functions.ts`)
- Invitation services → Extension loading: uses invitation config (evidence: `src/lib/invitations.functions.ts`)
- Recipe services → Supabase client: uses data client
