# dakh524/sairamhub architecture

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

- Interactive diagram: https://gitdiagram.com/dakh524/sairamhub
- Repository: https://github.com/dakh524/sairamhub

## Overview

Sairam Hub is a student-facing campus learning and utility app, with an admin area for maintaining shared content. The main flow starts at the home screen, which fetches learning materials and announcements; students can search or browse materials, open details, and access career resources and tools. Separate routes provide calculators, campus updates, sharing, and video playback. Supabase and local storage support content and offline caching, while onboarding and notifications support the app experience. The README is empty, so capability descriptions and links rely on the tree and shown source references; unsampled route behavior is not assumed.

Main entry points: [`helpers/api.ts`](https://github.com/dakh524/sairamhub/blob/master/helpers/api.ts) (Content API), [`app/index.tsx`](https://github.com/dakh524/sairamhub/blob/master/app/index.tsx) (Home dashboard), [`components/Onboarding.tsx`](https://github.com/dakh524/sairamhub/blob/master/components/Onboarding.tsx) (Student onboarding), [`helpers/supabase.ts`](https://github.com/dakh524/sairamhub/blob/master/helpers/supabase.ts) (Supabase client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_student["Student experience"]
  node_home["Home dashboard<br/>[index.tsx]"]
  node_utilities["Student tools"]
  node_updates["Campus updates<br/>[updates.tsx]"]
  node_share["Share materials<br/>[share.tsx]"]
  node_onboarding["Student onboarding<br/>[Onboarding.tsx]"]
  node_splash["Animated splash"]
end

subgraph group_learning["Learning content"]
  node_search["Content search<br/>[search.tsx]"]
  node_resources["Resource browser<br/>[resources.tsx]"]
  node_detail["Material detail<br/>[detail.tsx]"]
  node_career["Career hub<br/>[career.tsx]"]
  node_career_detail["Career detail<br/>[career-detail.tsx]"]
  node_video["Video player<br/>[video-player.tsx]"]
  node_materials_data["Career resource data<br/>[materialsData.ts]"]
end

subgraph group_operations["Content operations"]
  node_admin["Admin console<br/>[admin.tsx]"]
end

subgraph group_platform["App platform"]
  node_api["Content API<br/>[api.ts]"]
  node_supabase_client["Supabase client<br/>[supabase.ts]"]
  node_backend[("Supabase backend")]
  node_local_storage[("Device storage")]
  node_notifications["Notifications<br/>[notifications.ts]"]
  node_layout["App layout<br/>[_layout.tsx]"]
end

node_student(("Student"))

node_student -->|"opens"| node_home
node_home -->|"fetches content"| node_api
node_home -.->|"checks alerts"| node_notifications
node_student -->|"searches"| node_search
node_search -->|"loads materials"| node_api
node_student -.->|"browses"| node_resources
node_resources -->|"loads materials"| node_api
node_student -.->|"opens material"| node_detail
node_student -.->|"explores careers"| node_career
node_career_detail -->|"uses resources"| node_materials_data
node_video -->|"uses video data"| node_materials_data
node_home -->|"opens CGPA tool"| node_utilities
node_student -.->|"views updates"| node_updates
node_student -.->|"shares materials"| node_share
node_admin -->|"manages content"| node_api
node_api -->|"queries"| node_supabase_client
node_supabase_client -->|"connects"| node_backend
node_api -->|"caches content"| node_local_storage
node_onboarding -->|"checks users"| node_supabase_client
node_onboarding -.->|"persists locally"| node_local_storage
node_layout -->|"renders"| node_splash
node_layout -->|"renders"| node_onboarding

click node_home "https://github.com/dakh524/sairamhub/blob/master/app/index.tsx"
click node_search "https://github.com/dakh524/sairamhub/blob/master/app/search.tsx"
click node_resources "https://github.com/dakh524/sairamhub/blob/master/app/resources.tsx"
click node_detail "https://github.com/dakh524/sairamhub/blob/master/app/detail.tsx"
click node_career "https://github.com/dakh524/sairamhub/blob/master/app/career.tsx"
click node_career_detail "https://github.com/dakh524/sairamhub/blob/master/app/career-detail.tsx"
click node_video "https://github.com/dakh524/sairamhub/blob/master/app/video-player.tsx"
click node_materials_data "https://github.com/dakh524/sairamhub/blob/master/helpers/materialsData.ts"
click node_utilities "https://github.com/dakh524/sairamhub/tree/master/app"
click node_updates "https://github.com/dakh524/sairamhub/blob/master/app/updates.tsx"
click node_share "https://github.com/dakh524/sairamhub/blob/master/app/share.tsx"
click node_admin "https://github.com/dakh524/sairamhub/blob/master/app/admin.tsx"
click node_api "https://github.com/dakh524/sairamhub/blob/master/helpers/api.ts"
click node_supabase_client "https://github.com/dakh524/sairamhub/blob/master/helpers/supabase.ts"
click node_notifications "https://github.com/dakh524/sairamhub/blob/master/helpers/notifications.ts"
click node_onboarding "https://github.com/dakh524/sairamhub/blob/master/components/Onboarding.tsx"
click node_splash "https://github.com/dakh524/sairamhub/blob/master/components/CustomSplashScreen.tsx"
click node_layout "https://github.com/dakh524/sairamhub/blob/master/app/_layout.tsx"

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_home,node_utilities,node_updates,node_share,node_onboarding,node_splash toneBlue
class node_search,node_resources,node_detail,node_career,node_career_detail,node_video,node_materials_data toneAmber
class node_admin toneMint
class node_api,node_supabase_client,node_backend,node_local_storage,node_notifications,node_layout toneRose
class node_student toneIndigo
```

## Components

### Student experience

- [Home dashboard](https://github.com/dakh524/sairamhub/blob/master/app/index.tsx): `app/index.tsx`
- [Student tools](https://github.com/dakh524/sairamhub/tree/master/app): `app`
- [Campus updates](https://github.com/dakh524/sairamhub/blob/master/app/updates.tsx): `app/updates.tsx`
- [Share materials](https://github.com/dakh524/sairamhub/blob/master/app/share.tsx): `app/share.tsx`
- [Student onboarding](https://github.com/dakh524/sairamhub/blob/master/components/Onboarding.tsx): `components/Onboarding.tsx`
- [Animated splash](https://github.com/dakh524/sairamhub/blob/master/components/CustomSplashScreen.tsx): `components/CustomSplashScreen.tsx`

### Learning content

- [Content search](https://github.com/dakh524/sairamhub/blob/master/app/search.tsx): `app/search.tsx`
- [Resource browser](https://github.com/dakh524/sairamhub/blob/master/app/resources.tsx): `app/resources.tsx`
- [Material detail](https://github.com/dakh524/sairamhub/blob/master/app/detail.tsx): `app/detail.tsx`
- [Career hub](https://github.com/dakh524/sairamhub/blob/master/app/career.tsx): `app/career.tsx`
- [Career detail](https://github.com/dakh524/sairamhub/blob/master/app/career-detail.tsx): `app/career-detail.tsx`
- [Video player](https://github.com/dakh524/sairamhub/blob/master/app/video-player.tsx): `app/video-player.tsx`
- [Career resource data](https://github.com/dakh524/sairamhub/blob/master/helpers/materialsData.ts): `helpers/materialsData.ts`

### Content operations

- [Admin console](https://github.com/dakh524/sairamhub/blob/master/app/admin.tsx): `app/admin.tsx`

### App platform

- [Content API](https://github.com/dakh524/sairamhub/blob/master/helpers/api.ts): `helpers/api.ts`
- [Supabase client](https://github.com/dakh524/sairamhub/blob/master/helpers/supabase.ts): `helpers/supabase.ts`
- **Supabase backend**
- **Device storage**
- [Notifications](https://github.com/dakh524/sairamhub/blob/master/helpers/notifications.ts): `helpers/notifications.ts`
- [App layout](https://github.com/dakh524/sairamhub/blob/master/app/_layout.tsx): `app/_layout.tsx`

### Other components

- **Student**

## Connections

- Student → Home dashboard: opens
- Home dashboard → Content API: fetches content (evidence: `app/index.tsx`)
- Home dashboard → Notifications: checks alerts (evidence: `app/index.tsx`)
- Student → Content search: searches (evidence: `app/search.tsx`)
- Content search → Content API: loads materials (evidence: `app/search.tsx`)
- Student → Resource browser: browses
- Resource browser → Content API: loads materials (evidence: `app/resources.tsx`)
- Student → Material detail: opens material
- Student → Career hub: explores careers
- Career detail → Career resource data: uses resources (evidence: `app/career-detail.tsx`)
- Video player → Career resource data: uses video data (evidence: `app/video-player.tsx`)
- Home dashboard → Student tools: opens CGPA tool (evidence: `app/index.tsx`)
- Student → Campus updates: views updates
- Student → Share materials: shares materials
- Admin console → Content API: manages content (evidence: `app/admin.tsx`)
- Content API → Supabase client: queries (evidence: `helpers/api.ts`)
- Supabase client → Supabase backend: connects (evidence: `helpers/supabase.ts`)
- Content API → Device storage: caches content (evidence: `helpers/api.ts`)
- Student onboarding → Supabase client: checks users (evidence: `components/Onboarding.tsx`)
- Student onboarding → Device storage: persists locally
- App layout → Animated splash: renders (evidence: `app/_layout.tsx`)
- App layout → Student onboarding: renders (evidence: `app/_layout.tsx`)
