# srtdio/app architecture

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

- Interactive diagram: https://gitdiagram.com/srtdio/app
- Repository: https://github.com/srtdio/app

## Overview

Sorted is a social-media operations platform for agencies. Users enter through the React application, authenticate, and work in a selected workspace; the pipeline supports finding posts and moving them through stages. Other major product areas visible in the repository include chat, planning, briefs, comments, assets, and notifications. The graph highlights those domain areas and the shared Supabase and workspace layers. Source evidence is incomplete, so unsampled features are represented without speculative call relationships.

Main entry points: [`src/components/pages/PipelinePage.tsx`](https://github.com/srtdio/app/blob/main/src/components/pages/PipelinePage.tsx) (Post pipeline), [`src/App.tsx`](https://github.com/srtdio/app/blob/main/src/App.tsx) (Application routes), [`packages/posts/src`](https://github.com/srtdio/app/tree/main/packages/posts/src) (Post workflows), [`src/lib/workspace-context.tsx`](https://github.com/srtdio/app/blob/main/src/lib/workspace-context.tsx) (Workspace context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App and access"]
  node_app["Application routes<br/>[App.tsx]"]
  node_auth["Authentication"]
end

subgraph group_content["Content operations"]
  node_pipeline["Post pipeline<br/>[PipelinePage.tsx]"]
  node_pipeline_board["Stage board<br/>[PipelineBoard.tsx]"]
  node_pipeline_reads["Pipeline post reads<br/>[pipeline-posts.ts]"]
  node_posts_domain["Post workflows"]
  node_briefs["Brief management"]
  node_assets["Asset handling<br/>[storage.ts]"]
end

subgraph group_collaboration["Team collaboration"]
  node_chat_ui["Chat experience"]
  node_chat_tasks["Chat tasks<br/>[useChatTasks.ts]"]
  node_chat_domain["Chat operations<br/>[tasks.ts]"]
  node_plans["Plans and scheduling"]
  node_comments["Comments and mentions"]
  node_inbox["Inbox notifications"]
end

subgraph group_platform["Shared platform"]
  node_workspace["Workspace context"]
  node_schemas["Data schemas"]
  node_supabase_client["Supabase client<br/>[supabase.ts]"]
end

node_user(("Agency user"))
node_supabase[("Supabase service")]

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_auth
node_app -->|"routes to"| node_pipeline
node_pipeline -->|"reads posts"| node_pipeline_reads
node_pipeline -->|"loads and transitions"| node_posts_domain
node_pipeline -->|"renders board"| node_pipeline_board
node_pipeline_board -->|"checks stage actions"| node_posts_domain
node_chat_tasks -->|"reads and saves"| node_chat_domain
node_workspace -->|"uses client"| node_supabase_client
node_workspace -->|"lists workspaces"| node_posts_domain
node_supabase_client -->|"sends requests"| node_supabase

click node_app "https://github.com/srtdio/app/blob/main/src/App.tsx"
click node_auth "https://github.com/srtdio/app/tree/main/src/components/auth"
click node_workspace "https://github.com/srtdio/app/blob/main/src/lib/workspace-context.tsx"
click node_pipeline "https://github.com/srtdio/app/blob/main/src/components/pages/PipelinePage.tsx"
click node_pipeline_board "https://github.com/srtdio/app/blob/main/src/components/pages/pipeline/PipelineBoard.tsx"
click node_pipeline_reads "https://github.com/srtdio/app/blob/main/src/lib/pipeline-posts.ts"
click node_posts_domain "https://github.com/srtdio/app/tree/main/packages/posts/src"
click node_briefs "https://github.com/srtdio/app/tree/main/packages/briefs/src"
click node_assets "https://github.com/srtdio/app/blob/main/packages/storage/src/storage.ts"
click node_chat_ui "https://github.com/srtdio/app/tree/main/src/components/chat"
click node_chat_tasks "https://github.com/srtdio/app/blob/main/src/components/chat/tasks/useChatTasks.ts"
click node_chat_domain "https://github.com/srtdio/app/blob/main/src/lib/chat/tasks.ts"
click node_plans "https://github.com/srtdio/app/tree/main/src/components/pages/plan-tab"
click node_comments "https://github.com/srtdio/app/tree/main/packages/comments/src"
click node_inbox "https://github.com/srtdio/app/tree/main/packages/inbox/src"
click node_schemas "https://github.com/srtdio/app/tree/main/packages/schemas/src/zod"
click node_supabase_client "https://github.com/srtdio/app/blob/main/src/lib/supabase.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_app,node_auth,node_user toneBlue
class node_pipeline,node_pipeline_board,node_pipeline_reads,node_posts_domain,node_briefs,node_assets,node_supabase toneAmber
class node_chat_ui,node_chat_tasks,node_chat_domain,node_plans,node_comments,node_inbox toneMint
class node_workspace,node_schemas,node_supabase_client toneRose
```

## Components

### App and access

- [Application routes](https://github.com/srtdio/app/blob/main/src/App.tsx): `src/App.tsx`
- [Authentication](https://github.com/srtdio/app/tree/main/src/components/auth): `src/components/auth`

### Content operations

- [Post pipeline](https://github.com/srtdio/app/blob/main/src/components/pages/PipelinePage.tsx): `src/components/pages/PipelinePage.tsx`
- [Stage board](https://github.com/srtdio/app/blob/main/src/components/pages/pipeline/PipelineBoard.tsx): `src/components/pages/pipeline/PipelineBoard.tsx`
- [Pipeline post reads](https://github.com/srtdio/app/blob/main/src/lib/pipeline-posts.ts): `src/lib/pipeline-posts.ts`
- [Post workflows](https://github.com/srtdio/app/tree/main/packages/posts/src): `packages/posts/src`
- [Brief management](https://github.com/srtdio/app/tree/main/packages/briefs/src): `packages/briefs/src`
- [Asset handling](https://github.com/srtdio/app/blob/main/packages/storage/src/storage.ts): `packages/storage/src/storage.ts`

### Team collaboration

- [Chat experience](https://github.com/srtdio/app/tree/main/src/components/chat): `src/components/chat`
- [Chat tasks](https://github.com/srtdio/app/blob/main/src/components/chat/tasks/useChatTasks.ts): `src/components/chat/tasks/useChatTasks.ts`
- [Chat operations](https://github.com/srtdio/app/blob/main/src/lib/chat/tasks.ts): `src/lib/chat/tasks.ts`
- [Plans and scheduling](https://github.com/srtdio/app/tree/main/src/components/pages/plan-tab): `src/components/pages/plan-tab`
- [Comments and mentions](https://github.com/srtdio/app/tree/main/packages/comments/src): `packages/comments/src`
- [Inbox notifications](https://github.com/srtdio/app/tree/main/packages/inbox/src): `packages/inbox/src`

### Shared platform

- [Workspace context](https://github.com/srtdio/app/blob/main/src/lib/workspace-context.tsx): `src/lib/workspace-context.tsx`
- [Data schemas](https://github.com/srtdio/app/tree/main/packages/schemas/src/zod): `packages/schemas/src/zod`
- [Supabase client](https://github.com/srtdio/app/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`

### Other components

- **Agency user**
- **Supabase service**

## Connections

- Agency user → Application routes: opens
- Application routes → Authentication: routes to (evidence: `src/App.tsx`)
- Application routes → Post pipeline: routes to (evidence: `src/App.tsx`)
- Post pipeline → Pipeline post reads: reads posts (evidence: `src/components/pages/PipelinePage.tsx`)
- Post pipeline → Post workflows: loads and transitions (evidence: `src/components/pages/PipelinePage.tsx`)
- Post pipeline → Stage board: renders board (evidence: `src/components/pages/PipelinePage.tsx`)
- Stage board → Post workflows: checks stage actions (evidence: `src/components/pages/pipeline/PipelineBoard.tsx`)
- Chat tasks → Chat operations: reads and saves (evidence: `src/components/chat/tasks/useChatTasks.ts`)
- Workspace context → Supabase client: uses client (evidence: `src/lib/workspace-context.tsx`)
- Workspace context → Post workflows: lists workspaces (evidence: `src/lib/workspace-context.tsx`)
- Supabase client → Supabase service: sends requests (evidence: `src/lib/supabase.ts`)
