# denesh-developer/cheyyar-hub architecture

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

- Interactive diagram: https://gitdiagram.com/denesh-developer/cheyyar-hub
- Repository: https://github.com/denesh-developer/cheyyar-hub

## Overview

CheyyarHub is a social-networking app with profiles, posts and comments, follows, messaging, notifications, and short-form reels. The principal user flow is to enter the app, authenticate, and interact with social content backed by Firebase. The tree contains three large App.jsx implementations; only src/main.jsx explicitly mounts src/App.jsx, so the other two are shown as separate app implementations rather than assumed to be connected. Source excerpts support the Firebase operations and the OTP and push service behavior; they do not establish client calls to those services.

Main entry points: [`src/App.jsx`](https://github.com/denesh-developer/cheyyar-hub/blob/main/src/App.jsx) (Social app), [`src/firebase.js`](https://github.com/denesh-developer/cheyyar-hub/blob/main/src/firebase.js) (Firebase setup), [`App.jsx`](https://github.com/denesh-developer/cheyyar-hub/blob/main/App.jsx) (App implementation), [`api/App.jsx`](https://github.com/denesh-developer/cheyyar-hub/blob/main/api/App.jsx) (API app implementation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Social app"]
  node_entry["React entry<br/>[main.jsx]"]
  node_srcapp["Social app<br/>[App.jsx]"]
  node_rootapp["App implementation<br/>[App.jsx]"]
  node_apiapp["API app implementation<br/>[App.jsx]"]
end

subgraph group_data["Firebase data"]
  node_firebase["Firebase setup<br/>[firebase.js]"]
  node_firestore[("Firestore")]
end

subgraph group_services["Account and notifications"]
  node_auth["Firebase Auth"]
  node_otp["Email OTP service<br/>[src.js]"]
  node_email["Resend email"]
  node_push["Push handler<br/>[send-push.js]"]
  node_fcm["Firebase Messaging"]
end

subgraph group_media["Social features"]
  node_profiles["Profiles and follows<br/>[App.jsx]"]
  node_feed["Posts and comments<br/>[App.jsx]"]
  node_reels["Reels<br/>[App.jsx]"]
  node_chat["Messaging<br/>[App.jsx]"]
  node_notifications["Notifications<br/>[App.jsx]"]
end

node_user(("User"))

node_user -->|"opens"| node_entry
node_entry -->|"renders"| node_srcapp
node_srcapp -->|"imports"| node_firebase
node_firebase -->|"initializes"| node_firestore
node_firebase -->|"initializes"| node_auth
node_srcapp -->|"reads and writes"| node_firestore
node_srcapp -->|"updates profile"| node_auth
node_rootapp -->|"reads and writes"| node_firestore
node_rootapp -->|"authenticates"| node_auth
node_apiapp -->|"reads and writes"| node_firestore
node_apiapp -->|"authenticates"| node_auth
node_otp -->|"sends OTP"| node_email
node_push -->|"reads tokens"| node_firestore
node_push -->|"sends push"| node_fcm

click node_entry "https://github.com/denesh-developer/cheyyar-hub/blob/main/src/main.jsx"
click node_srcapp "https://github.com/denesh-developer/cheyyar-hub/blob/main/src/App.jsx"
click node_rootapp "https://github.com/denesh-developer/cheyyar-hub/blob/main/App.jsx"
click node_apiapp "https://github.com/denesh-developer/cheyyar-hub/blob/main/api/App.jsx"
click node_firebase "https://github.com/denesh-developer/cheyyar-hub/blob/main/src/firebase.js"
click node_otp "https://github.com/denesh-developer/cheyyar-hub/blob/main/src/src.js"
click node_push "https://github.com/denesh-developer/cheyyar-hub/blob/main/api/send-push.js"
click node_profiles "https://github.com/denesh-developer/cheyyar-hub/blob/main/src/App.jsx"
click node_feed "https://github.com/denesh-developer/cheyyar-hub/blob/main/src/App.jsx"
click node_reels "https://github.com/denesh-developer/cheyyar-hub/blob/main/src/App.jsx"
click node_chat "https://github.com/denesh-developer/cheyyar-hub/blob/main/src/App.jsx"
click node_notifications "https://github.com/denesh-developer/cheyyar-hub/blob/main/src/App.jsx"

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_srcapp,node_rootapp,node_apiapp,node_user toneBlue
class node_firebase,node_firestore toneAmber
class node_auth,node_otp,node_email,node_push,node_fcm toneMint
class node_profiles,node_feed,node_reels,node_chat,node_notifications toneRose
```

## Components

### Social app

- [React entry](https://github.com/denesh-developer/cheyyar-hub/blob/main/src/main.jsx): `src/main.jsx`
- [Social app](https://github.com/denesh-developer/cheyyar-hub/blob/main/src/App.jsx): `src/App.jsx`
- [App implementation](https://github.com/denesh-developer/cheyyar-hub/blob/main/App.jsx): `App.jsx`
- [API app implementation](https://github.com/denesh-developer/cheyyar-hub/blob/main/api/App.jsx): `api/App.jsx`

### Firebase data

- [Firebase setup](https://github.com/denesh-developer/cheyyar-hub/blob/main/src/firebase.js): `src/firebase.js`
- **Firestore**

### Account and notifications

- **Firebase Auth**
- [Email OTP service](https://github.com/denesh-developer/cheyyar-hub/blob/main/src/src.js): `src/src.js`
- **Resend email**
- [Push handler](https://github.com/denesh-developer/cheyyar-hub/blob/main/api/send-push.js): `api/send-push.js`
- **Firebase Messaging**

### Social features

- [Profiles and follows](https://github.com/denesh-developer/cheyyar-hub/blob/main/src/App.jsx): `src/App.jsx`
- [Posts and comments](https://github.com/denesh-developer/cheyyar-hub/blob/main/src/App.jsx): `src/App.jsx`
- [Reels](https://github.com/denesh-developer/cheyyar-hub/blob/main/src/App.jsx): `src/App.jsx`
- [Messaging](https://github.com/denesh-developer/cheyyar-hub/blob/main/src/App.jsx): `src/App.jsx`
- [Notifications](https://github.com/denesh-developer/cheyyar-hub/blob/main/src/App.jsx): `src/App.jsx`

### Other components

- **User**

## Connections

- User → React entry: opens (evidence: `src/main.jsx`)
- React entry → Social app: renders (evidence: `src/main.jsx`)
- Social app → Firebase setup: imports (evidence: `src/App.jsx`)
- Firebase setup → Firestore: initializes (evidence: `src/firebase.js`)
- Firebase setup → Firebase Auth: initializes (evidence: `src/firebase.js`)
- Social app → Firestore: reads and writes (evidence: `src/App.jsx`)
- Social app → Firebase Auth: updates profile (evidence: `src/App.jsx`)
- App implementation → Firestore: reads and writes (evidence: `App.jsx`)
- App implementation → Firebase Auth: authenticates (evidence: `App.jsx`)
- API app implementation → Firestore: reads and writes (evidence: `api/App.jsx`)
- API app implementation → Firebase Auth: authenticates (evidence: `api/App.jsx`)
- Email OTP service → Resend email: sends OTP (evidence: `src/src.js`)
- Push handler → Firestore: reads tokens (evidence: `api/send-push.js`)
- Push handler → Firebase Messaging: sends push (evidence: `api/send-push.js`)
