# raunaks1/almanet architecture

> Architecture diagram of the GitHub repository raunaks1/almanet, 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/raunaks1/almanet
- Repository: https://github.com/raunaks1/almanet

## Overview

AlmaNET is a React alumni-network application: users enter through the public home or authentication screens, then reach a dashboard and gated community features such as the alumni directory, profiles, forums, jobs, events, and chat. Admins have a separate dashboard. The sampled code confirms routing, sign-up, verification, event/job creation, and chat operations; several other page-to-backend interactions are not shown, so those links are omitted. Supabase is the configured backend. Major features are represented from the source index, not treated as fully inspected.

Main entry points: [`src/components/VerificationGate.tsx`](https://github.com/raunaks1/almanet/blob/main/src/components/VerificationGate.tsx) (Verification Gate), [`src/App.tsx`](https://github.com/raunaks1/almanet/blob/main/src/App.tsx) (Route Application), [`src/lib/supabase.ts`](https://github.com/raunaks1/almanet/blob/main/src/lib/supabase.ts) (Supabase Client), [`src/pages/Auth.tsx`](https://github.com/raunaks1/almanet/blob/main/src/pages/Auth.tsx) (Sign In and Join)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App Entry"]
  node_app["Route Application<br/>[App.tsx]"]
  node_home["Public Home<br/>[Home.tsx]"]
  node_theme["Theme Context<br/>[ThemeContext.tsx]"]
end

subgraph group_identity["Identity and Access"]
  node_authpage["Sign In and Join<br/>[Auth.tsx]"]
  node_authhook["Session and Profile<br/>[useAuth.ts]"]
  node_gate["Verification Gate"]
end

subgraph group_community["Alumni Community"]
  node_dashboard["Member Dashboard<br/>[Dashboard.tsx]"]
  node_directory["Alumni Directory<br/>[Directory.tsx]"]
  node_profile["Member Profile<br/>[Profile.tsx]"]
  node_colleges["College Data<br/>[colleges.ts]"]
  node_admin["Admin Dashboard<br/>[AdminDashboard.tsx]"]
end

subgraph group_opportunities["Community Activities"]
  node_forums["Forums<br/>[Forums.tsx]"]
  node_newpost["Post Composer<br/>[NewPostModal.tsx]"]
  node_jobs["Job Portal<br/>[Jobs.tsx]"]
  node_newjob["Job Composer<br/>[NewJobModal.tsx]"]
  node_events["Events<br/>[Events.tsx]"]
  node_newevent["Event Composer<br/>[NewEventModal.tsx]"]
  node_chatpage["Messaging<br/>[Chat.tsx]"]
end

subgraph group_platform["Backend Services"]
  node_chatlib["Chat Operations<br/>[chat.ts]"]
  node_news["College News<br/>[collegeNews.ts]"]
  node_supabase["Supabase Client<br/>[supabase.ts]"]
end

node_visitor(("Visitor or Member"))
node_backend[("Supabase Backend")]

node_visitor -->|"opens"| node_app
node_app -->|"provides theme"| node_theme
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_authpage
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_admin
node_app -->|"wraps restricted routes"| node_gate
node_gate -->|"gates"| node_directory
node_gate -->|"gates"| node_profile
node_gate -->|"gates"| node_forums
node_gate -->|"gates"| node_jobs
node_gate -->|"gates"| node_events
node_gate -->|"gates"| node_chatpage
node_gate -->|"checks access"| node_authhook
node_authhook -->|"reads session and profile"| node_supabase
node_authpage -->|"signs up"| node_supabase
node_authpage -->|"uses college choices"| node_colleges
node_dashboard -->|"uses news data"| node_news
node_newevent -->|"inserts event"| node_supabase
node_newevent -->|"returns new event"| node_events
node_events -->|"renders composer"| node_newevent
node_newjob -->|"inserts job"| node_supabase
node_jobs -->|"renders composer"| node_newjob
node_chatpage -->|"calls chat operations"| node_chatlib
node_chatlib -->|"uses client"| node_supabase
node_supabase -->|"connects to"| node_backend

click node_app "https://github.com/raunaks1/almanet/blob/main/src/App.tsx"
click node_home "https://github.com/raunaks1/almanet/blob/main/src/pages/Home.tsx"
click node_theme "https://github.com/raunaks1/almanet/blob/main/src/ThemeContext.tsx"
click node_authpage "https://github.com/raunaks1/almanet/blob/main/src/pages/Auth.tsx"
click node_authhook "https://github.com/raunaks1/almanet/blob/main/src/lib/useAuth.ts"
click node_gate "https://github.com/raunaks1/almanet/blob/main/src/components/VerificationGate.tsx"
click node_dashboard "https://github.com/raunaks1/almanet/blob/main/src/pages/Dashboard.tsx"
click node_directory "https://github.com/raunaks1/almanet/blob/main/src/pages/Directory.tsx"
click node_profile "https://github.com/raunaks1/almanet/blob/main/src/pages/Profile.tsx"
click node_colleges "https://github.com/raunaks1/almanet/blob/main/src/lib/colleges.ts"
click node_admin "https://github.com/raunaks1/almanet/blob/main/src/pages/AdminDashboard.tsx"
click node_forums "https://github.com/raunaks1/almanet/blob/main/src/pages/Forums.tsx"
click node_newpost "https://github.com/raunaks1/almanet/blob/main/src/components/NewPostModal.tsx"
click node_jobs "https://github.com/raunaks1/almanet/blob/main/src/pages/Jobs.tsx"
click node_newjob "https://github.com/raunaks1/almanet/blob/main/src/components/NewJobModal.tsx"
click node_events "https://github.com/raunaks1/almanet/blob/main/src/pages/Events.tsx"
click node_newevent "https://github.com/raunaks1/almanet/blob/main/src/components/NewEventModal.tsx"
click node_chatpage "https://github.com/raunaks1/almanet/blob/main/src/pages/Chat.tsx"
click node_chatlib "https://github.com/raunaks1/almanet/blob/main/src/lib/chat.ts"
click node_news "https://github.com/raunaks1/almanet/blob/main/src/lib/collegeNews.ts"
click node_supabase "https://github.com/raunaks1/almanet/blob/main/src/lib/supabase.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_app,node_home,node_theme toneBlue
class node_authpage,node_authhook,node_gate,node_backend toneAmber
class node_dashboard,node_directory,node_profile,node_colleges,node_admin toneMint
class node_forums,node_newpost,node_jobs,node_newjob,node_events,node_newevent,node_chatpage toneRose
class node_chatlib,node_news,node_supabase,node_visitor toneIndigo
```

## Components

### App Entry

- [Route Application](https://github.com/raunaks1/almanet/blob/main/src/App.tsx): `src/App.tsx`
- [Public Home](https://github.com/raunaks1/almanet/blob/main/src/pages/Home.tsx): `src/pages/Home.tsx`
- [Theme Context](https://github.com/raunaks1/almanet/blob/main/src/ThemeContext.tsx): `src/ThemeContext.tsx`

### Identity and Access

- [Sign In and Join](https://github.com/raunaks1/almanet/blob/main/src/pages/Auth.tsx): `src/pages/Auth.tsx`
- [Session and Profile](https://github.com/raunaks1/almanet/blob/main/src/lib/useAuth.ts): `src/lib/useAuth.ts`
- [Verification Gate](https://github.com/raunaks1/almanet/blob/main/src/components/VerificationGate.tsx): `src/components/VerificationGate.tsx`

### Alumni Community

- [Member Dashboard](https://github.com/raunaks1/almanet/blob/main/src/pages/Dashboard.tsx): `src/pages/Dashboard.tsx`
- [Alumni Directory](https://github.com/raunaks1/almanet/blob/main/src/pages/Directory.tsx): `src/pages/Directory.tsx`
- [Member Profile](https://github.com/raunaks1/almanet/blob/main/src/pages/Profile.tsx): `src/pages/Profile.tsx`
- [College Data](https://github.com/raunaks1/almanet/blob/main/src/lib/colleges.ts): `src/lib/colleges.ts`
- [Admin Dashboard](https://github.com/raunaks1/almanet/blob/main/src/pages/AdminDashboard.tsx): `src/pages/AdminDashboard.tsx`

### Community Activities

- [Forums](https://github.com/raunaks1/almanet/blob/main/src/pages/Forums.tsx): `src/pages/Forums.tsx`
- [Post Composer](https://github.com/raunaks1/almanet/blob/main/src/components/NewPostModal.tsx): `src/components/NewPostModal.tsx`
- [Job Portal](https://github.com/raunaks1/almanet/blob/main/src/pages/Jobs.tsx): `src/pages/Jobs.tsx`
- [Job Composer](https://github.com/raunaks1/almanet/blob/main/src/components/NewJobModal.tsx): `src/components/NewJobModal.tsx`
- [Events](https://github.com/raunaks1/almanet/blob/main/src/pages/Events.tsx): `src/pages/Events.tsx`
- [Event Composer](https://github.com/raunaks1/almanet/blob/main/src/components/NewEventModal.tsx): `src/components/NewEventModal.tsx`
- [Messaging](https://github.com/raunaks1/almanet/blob/main/src/pages/Chat.tsx): `src/pages/Chat.tsx`

### Backend Services

- [Chat Operations](https://github.com/raunaks1/almanet/blob/main/src/lib/chat.ts): `src/lib/chat.ts`
- [College News](https://github.com/raunaks1/almanet/blob/main/src/lib/collegeNews.ts): `src/lib/collegeNews.ts`
- [Supabase Client](https://github.com/raunaks1/almanet/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`

### Other components

- **Visitor or Member**
- **Supabase Backend**

## Connections

- Visitor or Member → Route Application: opens
- Route Application → Theme Context: provides theme (evidence: `src/App.tsx`)
- Route Application → Public Home: routes to (evidence: `src/App.tsx`)
- Route Application → Sign In and Join: routes to (evidence: `src/App.tsx`)
- Route Application → Member Dashboard: routes to (evidence: `src/App.tsx`)
- Route Application → Admin Dashboard: routes to (evidence: `src/App.tsx`)
- Route Application → Verification Gate: wraps restricted routes (evidence: `src/App.tsx`)
- Verification Gate → Alumni Directory: gates (evidence: `src/App.tsx`)
- Verification Gate → Member Profile: gates (evidence: `src/App.tsx`)
- Verification Gate → Forums: gates (evidence: `src/App.tsx`)
- Verification Gate → Job Portal: gates (evidence: `src/App.tsx`)
- Verification Gate → Events: gates (evidence: `src/App.tsx`)
- Verification Gate → Messaging: gates (evidence: `src/App.tsx`)
- Verification Gate → Session and Profile: checks access (evidence: `src/components/VerificationGate.tsx`)
- Session and Profile → Supabase Client: reads session and profile (evidence: `src/lib/useAuth.ts`)
- Sign In and Join → Supabase Client: signs up (evidence: `src/pages/Auth.tsx`)
- Sign In and Join → College Data: uses college choices (evidence: `src/pages/Auth.tsx`)
- Member Dashboard → College News: uses news data (evidence: `src/pages/Dashboard.tsx`)
- Event Composer → Supabase Client: inserts event (evidence: `src/components/NewEventModal.tsx`)
- Event Composer → Events: returns new event (evidence: `src/components/NewEventModal.tsx`)
- Events → Event Composer: renders composer (evidence: `src/pages/Events.tsx`)
- Job Composer → Supabase Client: inserts job (evidence: `src/components/NewJobModal.tsx`)
- Job Portal → Job Composer: renders composer (evidence: `src/pages/Jobs.tsx`)
- Messaging → Chat Operations: calls chat operations (evidence: `src/pages/Chat.tsx`)
- Chat Operations → Supabase Client: uses client (evidence: `src/lib/chat.ts`)
- Supabase Client → Supabase Backend: connects to (evidence: `src/lib/supabase.ts`)
