# i-am-navaneeth/eggpuff-web architecture

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

- Interactive diagram: https://gitdiagram.com/i-am-navaneeth/eggpuff-web
- Repository: https://github.com/i-am-navaneeth/eggpuff-web

## Overview

EggPuff is a Next.js campus social and discovery app: its tree includes a personalized question feed, Q&A, communities, profiles, campus matching, resources, creator promotions, notifications, and administration. The map preserves these product areas and the sampled internal UI/data layer. Source evidence is limited: several product routes and subsystems were not sampled, so their connections are omitted rather than inferred.

Main entry points: [`components/QuestionScreen.tsx`](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/QuestionScreen.tsx) (Question detail), [`components/ProfileScreen.tsx`](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/ProfileScreen.tsx) (Profile screen), [`app/(misc)/admin$$$db/AdminClient.tsx`](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/app/(misc)/admin%24%24%24db/AdminClient.tsx) (Admin console), [`app/api/cron/notifications/route.ts`](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/app/api/cron/notifications/route.ts) (Scheduled delivery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Feed &amp; Discovery"]
  node_feed["Question feed<br/>[page.tsx]"]
  node_feedload["Feed loading"]
  node_questions["Question detail<br/>[QuestionScreen.tsx]"]
  node_answers["Answer cards<br/>[AnswerCard.tsx]"]
  node_search["Search<br/>[SearchScreen.tsx]"]
  node_ask["Ask questions<br/>[page.tsx]"]
end

subgraph group_social["Community &amp; Profiles"]
  node_communities["Community detail<br/>[page.tsx]"]
  node_profile["Profile screen<br/>[ProfileScreen.tsx]"]
  node_profilepage["Profile route<br/>[page.tsx]"]
end

subgraph group_campus["Campus Features"]
  node_match["Campus matching<br/>[MatchRoom.tsx]"]
  node_matchbrowse["Browse matches<br/>[BrowseMatches.tsx]"]
end

subgraph group_resources["Resources &amp; Creators"]
  node_resources["Resource library<br/>[page.tsx]"]
  node_upload["Resource upload<br/>[page.tsx]"]
  node_reader["PDF reader<br/>[Reader.tsx]"]
  node_promotions["Creator promotions<br/>[CreatorHub.tsx]"]
end

subgraph group_platform["Notifications &amp; Platform"]
  node_admin["Admin console<br/>[AdminClient.tsx]"]
  node_notifications["Notification center"]
  node_pushclient["Browser push setup<br/>[pushClient.ts]"]
  node_cron["Scheduled delivery<br/>[route.ts]"]
  node_preview["Link preview API<br/>[route.ts]"]
end

node_user(("Campus user"))
node_supabase[("Supabase")]
node_pushservice["Browser push service"]

node_feedload -->|"queries feed data"| node_supabase
node_questions -->|"loads question data"| node_supabase
node_questions -->|"renders answers"| node_answers
node_profile -->|"reads profile data"| node_supabase
node_profile -->|"renders question cards"| node_questions
node_communities -->|"uses data client"| node_supabase
node_upload -->|"uses data client"| node_supabase
node_notifications -->|"reads notifications"| node_supabase
node_pushclient -->|"stores subscription"| node_supabase
node_admin -->|"manages records"| node_supabase
node_admin -->|"requests push send"| node_pushservice
node_cron -->|"loads and updates schedules"| node_supabase
node_cron -->|"dispatches notification"| node_pushservice
node_preview -.->|"none"| node_supabase

click node_feed "https://github.com/i-am-navaneeth/eggpuff-web/blob/main/app/(shell)/feed/page.tsx"
click node_feedload "https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/feed/hooks/useFeedInitialLoad.ts"
click node_questions "https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/QuestionScreen.tsx"
click node_answers "https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/AnswerCard.tsx"
click node_search "https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/SearchScreen.tsx"
click node_communities "https://github.com/i-am-navaneeth/eggpuff-web/blob/main/app/(shell)/communities/%5Bslug%5D/page.tsx"
click node_profile "https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/ProfileScreen.tsx"
click node_profilepage "https://github.com/i-am-navaneeth/eggpuff-web/blob/main/app/(shell)/u/%5Busername%5D/page.tsx"
click node_match "https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/campus-match/MatchRoom.tsx"
click node_matchbrowse "https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/campus-match/BrowseMatches.tsx"
click node_ask "https://github.com/i-am-navaneeth/eggpuff-web/blob/main/app/(shell)/ask/page.tsx"
click node_resources "https://github.com/i-am-navaneeth/eggpuff-web/blob/main/app/(misc)/resources/page.tsx"
click node_upload "https://github.com/i-am-navaneeth/eggpuff-web/blob/main/app/(fullscreen)/upload-resource/page.tsx"
click node_reader "https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/reader/Reader.tsx"
click node_promotions "https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/pyp/CreatorHub.tsx"
click node_admin "https://github.com/i-am-navaneeth/eggpuff-web/blob/main/app/(misc)/admin%24%24%24db/AdminClient.tsx"
click node_notifications "https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/NotificationProvider.tsx"
click node_pushclient "https://github.com/i-am-navaneeth/eggpuff-web/blob/main/lib/pushClient.ts"
click node_cron "https://github.com/i-am-navaneeth/eggpuff-web/blob/main/app/api/cron/notifications/route.ts"
click node_preview "https://github.com/i-am-navaneeth/eggpuff-web/blob/main/app/api/link-preview/route.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_feed,node_feedload,node_questions,node_answers,node_search,node_ask,node_user,node_pushservice toneBlue
class node_communities,node_profile,node_profilepage,node_supabase toneAmber
class node_match,node_matchbrowse toneMint
class node_resources,node_upload,node_reader,node_promotions toneRose
class node_admin,node_notifications,node_pushclient,node_cron,node_preview toneIndigo
```

## Components

### Feed & Discovery

- [Question feed](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/app/(shell)/feed/page.tsx): `app/(shell)/feed/page.tsx`
- [Feed loading](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/feed/hooks/useFeedInitialLoad.ts): `components/feed/hooks/useFeedInitialLoad.ts`
- [Question detail](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/QuestionScreen.tsx): `components/QuestionScreen.tsx`
- [Answer cards](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/AnswerCard.tsx): `components/AnswerCard.tsx`
- [Search](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/SearchScreen.tsx): `components/SearchScreen.tsx`
- [Ask questions](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/app/(shell)/ask/page.tsx): `app/(shell)/ask/page.tsx`

### Community & Profiles

- [Community detail](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/app/(shell)/communities/%5Bslug%5D/page.tsx): `app/(shell)/communities/[slug]/page.tsx`
- [Profile screen](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/ProfileScreen.tsx): `components/ProfileScreen.tsx`
- [Profile route](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/app/(shell)/u/%5Busername%5D/page.tsx): `app/(shell)/u/[username]/page.tsx`

### Campus Features

- [Campus matching](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/campus-match/MatchRoom.tsx): `components/campus-match/MatchRoom.tsx`
- [Browse matches](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/campus-match/BrowseMatches.tsx): `components/campus-match/BrowseMatches.tsx`

### Resources & Creators

- [Resource library](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/app/(misc)/resources/page.tsx): `app/(misc)/resources/page.tsx`
- [Resource upload](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/app/(fullscreen)/upload-resource/page.tsx): `app/(fullscreen)/upload-resource/page.tsx`
- [PDF reader](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/reader/Reader.tsx): `components/reader/Reader.tsx`
- [Creator promotions](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/pyp/CreatorHub.tsx): `components/pyp/CreatorHub.tsx`

### Notifications & Platform

- [Admin console](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/app/(misc)/admin%24%24%24db/AdminClient.tsx): `app/(misc)/admin$$$db/AdminClient.tsx`
- [Notification center](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/components/NotificationProvider.tsx): `components/NotificationProvider.tsx`
- [Browser push setup](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/lib/pushClient.ts): `lib/pushClient.ts`
- [Scheduled delivery](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/app/api/cron/notifications/route.ts): `app/api/cron/notifications/route.ts`
- [Link preview API](https://github.com/i-am-navaneeth/eggpuff-web/blob/main/app/api/link-preview/route.ts): `app/api/link-preview/route.ts`

### Other components

- **Campus user**
- **Supabase**
- **Browser push service**

## Connections

- Feed loading → Supabase: queries feed data (evidence: `components/feed/hooks/useFeedInitialLoad.ts`)
- Question detail → Supabase: loads question data (evidence: `components/QuestionScreen.tsx`)
- Question detail → Answer cards: renders answers (evidence: `components/QuestionScreen.tsx`)
- Profile screen → Supabase: reads profile data (evidence: `components/ProfileScreen.tsx`)
- Profile screen → Question detail: renders question cards (evidence: `components/ProfileScreen.tsx`)
- Community detail → Supabase: uses data client (evidence: `app/(shell)/communities/[slug]/page.tsx`)
- Resource upload → Supabase: uses data client (evidence: `app/(fullscreen)/upload-resource/page.tsx`)
- Notification center → Supabase: reads notifications (evidence: `components/NotificationProvider.tsx`)
- Browser push setup → Supabase: stores subscription (evidence: `lib/pushClient.ts`)
- Admin console → Supabase: manages records (evidence: `app/(misc)/admin$$$db/AdminClient.tsx`)
- Admin console → Browser push service: requests push send (evidence: `app/(misc)/admin$$$db/AdminClient.tsx`)
- Scheduled delivery → Supabase: loads and updates schedules (evidence: `app/api/cron/notifications/route.ts`)
- Scheduled delivery → Browser push service: dispatches notification (evidence: `app/api/cron/notifications/route.ts`)
- Link preview API → Supabase: none
