# sekhvolodymyr/lelekathoughts architecture

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

- Interactive diagram: https://gitdiagram.com/sekhvolodymyr/lelekathoughts
- Repository: https://github.com/sekhvolodymyr/lelekathoughts

## Overview

LelekaThoughts is a creator-focused social network. The principal workflow is a signed-in creator composing media or text, publishing it, and seeing it in feeds where people can interact; the README also documents stories, messaging, saved content, moderation, and PWA support. The sampled provider and client show state loading, authenticated mutations, Supabase RPC calls, and media storage. Several feature implementations and the app shell were not excerpted, so those connections are omitted or marked unverified. Connector runtime modules are included as a distinct internal capability; their product-facing use is not established by the README excerpts.

Main entry points: [`app/components/leleka/provider.tsx`](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/components/leleka/provider.tsx) (App state), [`app/components/leleka/pages.tsx`](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/components/leleka/pages.tsx) (Feed and pages), [`app/lib/leleka/client.ts`](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/lib/leleka/client.ts) (Supabase client), [`app/worker/index.ts`](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/worker/index.ts) (Fetch worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_shell["App shell<br/>[app-shell.tsx]"]
  node_pages["Feed and pages<br/>[pages.tsx]"]
  node_provider["App state<br/>[provider.tsx]"]
  node_pwa["Offline worker<br/>[sw.js]"]
  node_theme["Theme selection<br/>[theme-picker.tsx]"]
  node_localization["Localization<br/>[i18n.ts]"]
end

subgraph group_social["Social features"]
  node_composer["Composer<br/>[composer.tsx]"]
  node_post["Post interactions<br/>[post-card.tsx]"]
  node_stories["Stories and series<br/>[stories.tsx]"]
  node_messages["Chats<br/>[messages.tsx]"]
end

subgraph group_backend["Data and identity"]
  node_auth["Sign-in and onboarding<br/>[auth.tsx]"]
  node_client["Supabase client<br/>[client.ts]"]
  node_account["Account API<br/>[route.ts]"]
  node_dbschema["App data schema<br/>[schema.ts]"]
  node_accountfn["Account function<br/>[index.ts]"]
  node_cleanup["Cleanup function<br/>[index.ts]"]
end

subgraph group_runtime["Request runtime"]
  node_connectorcontract["Connector contract"]
  node_connectorcontext["Request binding context"]
  node_worker["Fetch worker<br/>[index.ts]"]
end

node_creator(("Creator"))
node_supabase[("Supabase services")]

node_creator -.->|"uses"| node_shell
node_shell -.->|"renders"| node_pages
node_pages -->|"reads state"| node_provider
node_pages -->|"renders"| node_post
node_pages -->|"renders"| node_stories
node_pages -->|"opens"| node_composer
node_composer -.->|"uses state"| node_provider
node_post -->|"mutates"| node_provider
node_stories -->|"uses state"| node_provider
node_messages -.->|"uses state"| node_provider
node_auth -->|"authenticates"| node_client
node_provider -->|"loads and mutates"| node_client
node_client -->|"queries and uploads"| node_supabase
node_client -->|"posts account action"| node_account
node_account -.->|"handles account"| node_supabase
node_accountfn -.->|"serves account"| node_supabase
node_cleanup -.->|"cleans data"| node_supabase
node_provider -->|"registers worker"| node_pwa
node_theme -->|"sets theme"| node_provider
node_provider -->|"translates text"| node_localization
node_worker -->|"binds request"| node_connectorcontext
node_worker -->|"uses binding type"| node_connectorcontract
node_connectorcontext -->|"stores binding"| node_connectorcontract

click node_shell "https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/components/leleka/app-shell.tsx"
click node_pages "https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/components/leleka/pages.tsx"
click node_provider "https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/components/leleka/provider.tsx"
click node_composer "https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/components/leleka/composer.tsx"
click node_post "https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/components/leleka/post-card.tsx"
click node_stories "https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/components/leleka/stories.tsx"
click node_messages "https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/components/leleka/messages.tsx"
click node_auth "https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/components/leleka/auth.tsx"
click node_client "https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/lib/leleka/client.ts"
click node_account "https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/app/api/account/route.ts"
click node_dbschema "https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/db/schema.ts"
click node_accountfn "https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/supabase/functions/account/index.ts"
click node_cleanup "https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/supabase/functions/cleanup/index.ts"
click node_pwa "https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/public/sw.js"
click node_connectorcontract "https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/lib/connector-contract.mts"
click node_connectorcontext "https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/lib/connector-context.ts"
click node_worker "https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/worker/index.ts"
click node_theme "https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/components/leleka/theme-picker.tsx"
click node_localization "https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/lib/leleka/i18n.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_shell,node_pages,node_provider,node_pwa,node_theme,node_localization toneBlue
class node_composer,node_post,node_stories,node_messages,node_supabase toneAmber
class node_auth,node_client,node_account,node_dbschema,node_accountfn,node_cleanup toneMint
class node_connectorcontract,node_connectorcontext,node_worker toneRose
class node_creator toneIndigo
```

## Components

### App experience

- [App shell](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/components/leleka/app-shell.tsx): `app/components/leleka/app-shell.tsx`
- [Feed and pages](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/components/leleka/pages.tsx): `app/components/leleka/pages.tsx`
- [App state](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/components/leleka/provider.tsx): `app/components/leleka/provider.tsx`
- [Offline worker](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/public/sw.js): `app/public/sw.js`
- [Theme selection](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/components/leleka/theme-picker.tsx): `app/components/leleka/theme-picker.tsx`
- [Localization](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/lib/leleka/i18n.ts): `app/lib/leleka/i18n.ts`

### Social features

- [Composer](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/components/leleka/composer.tsx): `app/components/leleka/composer.tsx`
- [Post interactions](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/components/leleka/post-card.tsx): `app/components/leleka/post-card.tsx`
- [Stories and series](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/components/leleka/stories.tsx): `app/components/leleka/stories.tsx`
- [Chats](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/components/leleka/messages.tsx): `app/components/leleka/messages.tsx`

### Data and identity

- [Sign-in and onboarding](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/components/leleka/auth.tsx): `app/components/leleka/auth.tsx`
- [Supabase client](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/lib/leleka/client.ts): `app/lib/leleka/client.ts`
- [Account API](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/app/api/account/route.ts): `app/app/api/account/route.ts`
- [App data schema](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/db/schema.ts): `app/db/schema.ts`
- [Account function](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/supabase/functions/account/index.ts): `app/supabase/functions/account/index.ts`
- [Cleanup function](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/supabase/functions/cleanup/index.ts): `app/supabase/functions/cleanup/index.ts`

### Request runtime

- [Connector contract](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/lib/connector-contract.mts): `app/lib/connector-contract.mts`
- [Request binding context](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/lib/connector-context.ts): `app/lib/connector-context.ts`
- [Fetch worker](https://github.com/sekhvolodymyr/lelekathoughts/blob/main/app/worker/index.ts): `app/worker/index.ts`

### Other components

- **Creator**
- **Supabase services**

## Connections

- Creator → App shell: uses (evidence: `README.md`)
- App shell → Feed and pages: renders
- Feed and pages → App state: reads state (evidence: `app/components/leleka/pages.tsx`)
- Feed and pages → Post interactions: renders (evidence: `app/components/leleka/pages.tsx`)
- Feed and pages → Stories and series: renders (evidence: `app/components/leleka/pages.tsx`)
- Feed and pages → Composer: opens (evidence: `app/components/leleka/pages.tsx`)
- Composer → App state: uses state (evidence: `app/components/leleka/composer.tsx`)
- Post interactions → App state: mutates (evidence: `app/components/leleka/post-card.tsx`)
- Stories and series → App state: uses state (evidence: `app/components/leleka/stories.tsx`)
- Chats → App state: uses state
- Sign-in and onboarding → Supabase client: authenticates (evidence: `app/components/leleka/auth.tsx`)
- App state → Supabase client: loads and mutates (evidence: `app/components/leleka/provider.tsx`)
- Supabase client → Supabase services: queries and uploads (evidence: `app/lib/leleka/client.ts`)
- Supabase client → Account API: posts account action (evidence: `app/lib/leleka/client.ts`)
- Account API → Supabase services: handles account
- Account function → Supabase services: serves account
- Cleanup function → Supabase services: cleans data
- App state → Offline worker: registers worker (evidence: `app/components/leleka/provider.tsx`)
- Theme selection → App state: sets theme (evidence: `app/components/leleka/theme-picker.tsx`)
- App state → Localization: translates text (evidence: `app/components/leleka/provider.tsx`)
- Fetch worker → Request binding context: binds request (evidence: `app/worker/index.ts`)
- Fetch worker → Connector contract: uses binding type (evidence: `app/worker/index.ts`)
- Request binding context → Connector contract: stores binding (evidence: `app/lib/connector-context.ts`)
