# anuragcodes4u/whatsapp-clone architecture

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

- Interactive diagram: https://gitdiagram.com/anuragcodes4u/whatsapp-clone
- Repository: https://github.com/anuragcodes4u/whatsapp-clone

## Overview

This is a small React chat interface backed by Supabase. Users browse and search conversations, select a chat, and send messages; the app also subscribes to new message inserts. The sampled source shows the app importing and using the Supabase client, but the migration contents and full data-loading queries were not provided, so schema details and those specific relationships are omitted.

Main entry points: [`src/App.tsx`](https://github.com/anuragcodes4u/whatsapp-clone/blob/main/src/App.tsx) (Chat experience), [`src/main.tsx`](https://github.com/anuragcodes4u/whatsapp-clone/blob/main/src/main.tsx) (React entry), [`src/supabaseClient.ts`](https://github.com/anuragcodes4u/whatsapp-clone/blob/main/src/supabaseClient.ts) (Supabase client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Chat interface"]
  node_entry["React entry<br/>[main.tsx]"]
  node_chat["Chat experience<br/>[App.tsx]"]
end

subgraph group_backend["Data access"]
  node_client["Supabase client<br/>[supabaseClient.ts]"]
  node_supabase[("Supabase service")]
end

node_user(("Chat user"))

node_user -->|"uses"| node_entry
node_entry -->|"renders"| node_chat
node_chat -->|"uses"| node_client
node_client -->|"connects to"| node_supabase
node_chat -->|"queries and subscribes"| node_supabase

click node_entry "https://github.com/anuragcodes4u/whatsapp-clone/blob/main/src/main.tsx"
click node_chat "https://github.com/anuragcodes4u/whatsapp-clone/blob/main/src/App.tsx"
click node_client "https://github.com/anuragcodes4u/whatsapp-clone/blob/main/src/supabaseClient.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_entry,node_chat,node_user toneBlue
class node_client,node_supabase toneAmber
```

## Components

### Chat interface

- [React entry](https://github.com/anuragcodes4u/whatsapp-clone/blob/main/src/main.tsx): `src/main.tsx`
- [Chat experience](https://github.com/anuragcodes4u/whatsapp-clone/blob/main/src/App.tsx): `src/App.tsx`

### Data access

- [Supabase client](https://github.com/anuragcodes4u/whatsapp-clone/blob/main/src/supabaseClient.ts): `src/supabaseClient.ts`
- **Supabase service**

### Other components

- **Chat user**

## Connections

- Chat user → React entry: uses (evidence: `src/main.tsx`)
- React entry → Chat experience: renders (evidence: `src/main.tsx`)
- Chat experience → Supabase client: uses (evidence: `src/App.tsx`)
- Supabase client → Supabase service: connects to (evidence: `src/supabaseClient.ts`)
- Chat experience → Supabase service: queries and subscribes (evidence: `src/App.tsx`)
