# burakorkmez/codexgram architecture

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

- Interactive diagram: https://gitdiagram.com/burakorkmez/codexgram
- Repository: https://github.com/burakorkmez/codexgram

## Overview

Codexgram is an Expo social app backed by Convex. Its principal workflow is sign-in and profile completion, then browsing and creating social content or messaging through app screens, shared client state, and Convex functions. The graph also preserves major social domains and media uploads. Several backend and screen modules were not excerpted; their nodes use paths from the tree, while relationships without direct evidence are omitted or marked unverified.

Main entry points: [`src/lib/social.ts`](https://github.com/burakorkmez/codexgram/blob/master/src/lib/social.ts) (Social API client), [`convex/schema.ts`](https://github.com/burakorkmez/codexgram/blob/master/convex/schema.ts) (Convex data), [`src/context/social-context.tsx`](https://github.com/burakorkmez/codexgram/blob/master/src/context/social-context.tsx) (Profile gate), [`convex/lib/views.ts`](https://github.com/burakorkmez/codexgram/blob/master/convex/lib/views.ts) (Public views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["App experience"]
  node_routes["App routes"]
  node_signin["Sign-in<br/>[use-social-auth.ts]"]
  node_tabs["Tab navigation<br/>[app-tabs.tsx]"]
  node_home["Home feed<br/>[home-feed.tsx]"]
  node_explore["Explore<br/>[explore.tsx]"]
  node_composer["Post composer<br/>[composer.tsx]"]
  node_postview["Post views<br/>[post-detail.tsx]"]
  node_profileview["Profile views<br/>[profile.tsx]"]
  node_stories["Stories<br/>[stories.tsx]"]
  node_messages["Messaging screens<br/>[messages.tsx]"]
end

subgraph group_state["Client state"]
  node_feedstate["Feed state<br/>[feed-context.tsx]"]
  node_messagestate["Message state"]
  node_socialstate["Profile gate<br/>[social-context.tsx]"]
  node_feeddata["Demo feed data<br/>[feed-data.ts]"]
end

subgraph group_backend["Social backend"]
  node_accounts["Accounts<br/>[accounts.ts]"]
  node_profiles["Profiles<br/>[profiles.ts]"]
  node_posts["Posts<br/>[posts.ts]"]
  node_interactions["Post interactions"]
  node_social["Social graph<br/>[social.ts]"]
  node_storiesbackend["Story functions<br/>[stories.ts]"]
  node_messagingbackend["Messaging functions<br/>[messaging.ts]"]
  node_schema[("Convex data<br/>[schema.ts]")]
  node_views["Public views<br/>[views.ts]"]
  node_authhelper["Auth checks<br/>[auth.ts]"]
end

subgraph group_shared["Shared services"]
  node_socialclient["Social API client<br/>[social.ts]"]
  node_uploads["Media uploads<br/>[upload.ts]"]
end

node_person(("Member"))

node_person -.->|"uses"| node_routes
node_routes -.->|"starts sign-in"| node_signin
node_routes -.->|"shows tabs"| node_tabs
node_tabs -->|"provides"| node_feedstate
node_home -->|"reads state"| node_feedstate
node_home -->|"uses"| node_feeddata
node_feedstate -->|"initializes from"| node_feeddata
node_routes -.->|"wraps screens"| node_socialstate
node_socialstate -->|"queries profile"| node_profiles
node_socialstate -->|"checks deletion"| node_accounts
node_composer -->|"reads context"| node_socialstate
node_composer -->|"calls API"| node_socialclient
node_composer -->|"uploads media"| node_uploads
node_postview -->|"reads context"| node_socialstate
node_postview -->|"uses API types"| node_socialclient
node_explore -.->|"uses API"| node_socialclient
node_profileview -.->|"uses API"| node_socialclient
node_stories -.->|"uses API"| node_socialclient
node_messages -->|"uses state"| node_messagestate
node_messagestate -->|"uses API"| node_socialclient
node_socialclient -->|"imports view types"| node_views
node_socialclient -.->|"uses generated data types"| node_schema
node_accounts -->|"imports checks"| node_authhelper
node_social -->|"imports checks"| node_authhelper
node_social -->|"imports views"| node_views
node_messagingbackend -->|"imports checks"| node_authhelper
node_messagingbackend -->|"imports views"| node_views
node_profiles -.->|"uses data model"| node_schema
node_posts -.->|"uses data model"| node_schema
node_interactions -.->|"uses data model"| node_schema
node_storiesbackend -.->|"uses data model"| node_schema
node_views -->|"imports media type"| node_schema
node_views -.->|"reads records"| node_schema

click node_routes "https://github.com/burakorkmez/codexgram/tree/master/src/app"
click node_signin "https://github.com/burakorkmez/codexgram/blob/master/src/hooks/use-social-auth.ts"
click node_tabs "https://github.com/burakorkmez/codexgram/blob/master/src/components/app-tabs.tsx"
click node_home "https://github.com/burakorkmez/codexgram/blob/master/src/components/home-feed.tsx"
click node_explore "https://github.com/burakorkmez/codexgram/blob/master/src/components/social/explore.tsx"
click node_composer "https://github.com/burakorkmez/codexgram/blob/master/src/components/social/composer.tsx"
click node_postview "https://github.com/burakorkmez/codexgram/blob/master/src/components/social/post-detail.tsx"
click node_profileview "https://github.com/burakorkmez/codexgram/blob/master/src/components/social/profile.tsx"
click node_stories "https://github.com/burakorkmez/codexgram/blob/master/src/components/social/stories.tsx"
click node_messages "https://github.com/burakorkmez/codexgram/blob/master/src/components/social/messages.tsx"
click node_feedstate "https://github.com/burakorkmez/codexgram/blob/master/src/context/feed-context.tsx"
click node_messagestate "https://github.com/burakorkmez/codexgram/blob/master/src/context/messages-context.tsx"
click node_socialstate "https://github.com/burakorkmez/codexgram/blob/master/src/context/social-context.tsx"
click node_feeddata "https://github.com/burakorkmez/codexgram/blob/master/src/lib/feed-data.ts"
click node_socialclient "https://github.com/burakorkmez/codexgram/blob/master/src/lib/social.ts"
click node_uploads "https://github.com/burakorkmez/codexgram/blob/master/src/lib/upload.ts"
click node_accounts "https://github.com/burakorkmez/codexgram/blob/master/convex/accounts.ts"
click node_profiles "https://github.com/burakorkmez/codexgram/blob/master/convex/profiles.ts"
click node_posts "https://github.com/burakorkmez/codexgram/blob/master/convex/posts.ts"
click node_interactions "https://github.com/burakorkmez/codexgram/blob/master/convex/postInteractions.ts"
click node_social "https://github.com/burakorkmez/codexgram/blob/master/convex/social.ts"
click node_storiesbackend "https://github.com/burakorkmez/codexgram/blob/master/convex/stories.ts"
click node_messagingbackend "https://github.com/burakorkmez/codexgram/blob/master/convex/messaging.ts"
click node_schema "https://github.com/burakorkmez/codexgram/blob/master/convex/schema.ts"
click node_views "https://github.com/burakorkmez/codexgram/blob/master/convex/lib/views.ts"
click node_authhelper "https://github.com/burakorkmez/codexgram/blob/master/convex/lib/auth.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_routes,node_signin,node_tabs,node_home,node_explore,node_composer,node_postview,node_profileview,node_stories,node_messages toneBlue
class node_feedstate,node_messagestate,node_socialstate,node_feeddata toneAmber
class node_accounts,node_profiles,node_posts,node_interactions,node_social,node_storiesbackend,node_messagingbackend,node_schema,node_views,node_authhelper toneMint
class node_socialclient,node_uploads toneRose
class node_person toneIndigo
```

## Components

### App experience

- [App routes](https://github.com/burakorkmez/codexgram/tree/master/src/app): `src/app`
- [Sign-in](https://github.com/burakorkmez/codexgram/blob/master/src/hooks/use-social-auth.ts): `src/hooks/use-social-auth.ts`
- [Tab navigation](https://github.com/burakorkmez/codexgram/blob/master/src/components/app-tabs.tsx): `src/components/app-tabs.tsx`
- [Home feed](https://github.com/burakorkmez/codexgram/blob/master/src/components/home-feed.tsx): `src/components/home-feed.tsx`
- [Explore](https://github.com/burakorkmez/codexgram/blob/master/src/components/social/explore.tsx): `src/components/social/explore.tsx`
- [Post composer](https://github.com/burakorkmez/codexgram/blob/master/src/components/social/composer.tsx): `src/components/social/composer.tsx`
- [Post views](https://github.com/burakorkmez/codexgram/blob/master/src/components/social/post-detail.tsx): `src/components/social/post-detail.tsx`
- [Profile views](https://github.com/burakorkmez/codexgram/blob/master/src/components/social/profile.tsx): `src/components/social/profile.tsx`
- [Stories](https://github.com/burakorkmez/codexgram/blob/master/src/components/social/stories.tsx): `src/components/social/stories.tsx`
- [Messaging screens](https://github.com/burakorkmez/codexgram/blob/master/src/components/social/messages.tsx): `src/components/social/messages.tsx`

### Client state

- [Feed state](https://github.com/burakorkmez/codexgram/blob/master/src/context/feed-context.tsx): `src/context/feed-context.tsx`
- [Message state](https://github.com/burakorkmez/codexgram/blob/master/src/context/messages-context.tsx): `src/context/messages-context.tsx`
- [Profile gate](https://github.com/burakorkmez/codexgram/blob/master/src/context/social-context.tsx): `src/context/social-context.tsx`
- [Demo feed data](https://github.com/burakorkmez/codexgram/blob/master/src/lib/feed-data.ts): `src/lib/feed-data.ts`

### Social backend

- [Accounts](https://github.com/burakorkmez/codexgram/blob/master/convex/accounts.ts): `convex/accounts.ts`
- [Profiles](https://github.com/burakorkmez/codexgram/blob/master/convex/profiles.ts): `convex/profiles.ts`
- [Posts](https://github.com/burakorkmez/codexgram/blob/master/convex/posts.ts): `convex/posts.ts`
- [Post interactions](https://github.com/burakorkmez/codexgram/blob/master/convex/postInteractions.ts): `convex/postInteractions.ts`
- [Social graph](https://github.com/burakorkmez/codexgram/blob/master/convex/social.ts): `convex/social.ts`
- [Story functions](https://github.com/burakorkmez/codexgram/blob/master/convex/stories.ts): `convex/stories.ts`
- [Messaging functions](https://github.com/burakorkmez/codexgram/blob/master/convex/messaging.ts): `convex/messaging.ts`
- [Convex data](https://github.com/burakorkmez/codexgram/blob/master/convex/schema.ts): `convex/schema.ts`
- [Public views](https://github.com/burakorkmez/codexgram/blob/master/convex/lib/views.ts): `convex/lib/views.ts`
- [Auth checks](https://github.com/burakorkmez/codexgram/blob/master/convex/lib/auth.ts): `convex/lib/auth.ts`

### Shared services

- [Social API client](https://github.com/burakorkmez/codexgram/blob/master/src/lib/social.ts): `src/lib/social.ts`
- [Media uploads](https://github.com/burakorkmez/codexgram/blob/master/src/lib/upload.ts): `src/lib/upload.ts`

### Other components

- **Member**

## Connections

- Member → App routes: uses
- App routes → Sign-in: starts sign-in (evidence: `src/app/index.tsx`)
- App routes → Tab navigation: shows tabs (evidence: `src/app/design-preview/_layout.tsx`)
- Tab navigation → Feed state: provides (evidence: `src/components/app-tabs.tsx`)
- Home feed → Feed state: reads state (evidence: `src/components/home-feed.tsx`)
- Home feed → Demo feed data: uses (evidence: `src/components/home-feed.tsx`)
- Feed state → Demo feed data: initializes from (evidence: `src/context/feed-context.tsx`)
- App routes → Profile gate: wraps screens (evidence: `src/app/chat/[id].tsx`)
- Profile gate → Profiles: queries profile (evidence: `src/context/social-context.tsx`)
- Profile gate → Accounts: checks deletion (evidence: `src/context/social-context.tsx`)
- Post composer → Profile gate: reads context (evidence: `src/components/social/composer.tsx`)
- Post composer → Social API client: calls API (evidence: `src/components/social/composer.tsx`)
- Post composer → Media uploads: uploads media (evidence: `src/components/social/composer.tsx`)
- Post views → Profile gate: reads context (evidence: `src/components/social/post-detail.tsx`)
- Post views → Social API client: uses API types (evidence: `src/components/social/post-detail.tsx`)
- Explore → Social API client: uses API
- Profile views → Social API client: uses API
- Stories → Social API client: uses API
- Messaging screens → Message state: uses state (evidence: `src/components/social/messages.tsx`)
- Message state → Social API client: uses API (evidence: `src/context/messages-context.tsx`)
- Social API client → Public views: imports view types (evidence: `src/lib/social.ts`)
- Social API client → Convex data: uses generated data types
- Accounts → Auth checks: imports checks (evidence: `convex/accounts.ts`)
- Social graph → Auth checks: imports checks (evidence: `convex/social.ts`)
- Social graph → Public views: imports views (evidence: `convex/social.ts`)
- Messaging functions → Auth checks: imports checks (evidence: `convex/messaging.ts`)
- Messaging functions → Public views: imports views (evidence: `convex/messaging.ts`)
- Profiles → Convex data: uses data model
- Posts → Convex data: uses data model
- Post interactions → Convex data: uses data model
- Story functions → Convex data: uses data model
- Public views → Convex data: imports media type (evidence: `convex/lib/views.ts`)
- Public views → Convex data: reads records (evidence: `convex/lib/views.ts`)
