# pixelpioneersbu/campuscompass architecture

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

- Interactive diagram: https://gitdiagram.com/pixelpioneersbu/campuscompass
- Repository: https://github.com/pixelpioneersbu/campuscompass

## Overview

CampusCompass is a browser-based student companion. Students sign up or log in, then use a dashboard and dedicated pages to explore events, track deadlines, plan study sessions, browse and bookmark resources, and edit their profile. Supabase supplies authentication and persistent data for the account, dashboard, deadlines, study planner, and profile; events and resource bookmarks use browser-local data. Unsampled page wiring and persistence details are represented only where documented; the specific resource and event storage behaviors shown come from excerpts.

Main entry points: [`supabase.js`](https://github.com/pixelpioneersbu/campuscompass/blob/main/supabase.js) (Supabase Client), [`profile.js`](https://github.com/pixelpioneersbu/campuscompass/blob/main/profile.js) (Profile Management), [`script.js`](https://github.com/pixelpioneersbu/campuscompass/blob/main/script.js) (Dashboard), [`auth.js`](https://github.com/pixelpioneersbu/campuscompass/blob/main/auth.js) (Sign-up & Recovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_account["Account &amp; Profile"]
  node_authui["Authentication<br/>[auth.html]"]
  node_authflows["Sign-up &amp; Recovery<br/>[auth.js]"]
  node_sessionguard["Session Guard<br/>[auth-guard.js]"]
  node_profile["Profile Management<br/>[profile.js]"]
  node_reset["Password Reset<br/>[reset-password.js]"]
  node_resetpage["Reset Page"]
  node_supabaseclient["Supabase Client<br/>[supabase.js]"]
end

subgraph group_overview["Student Dashboard"]
  node_dashboard["Dashboard<br/>[script.js]"]
  node_home["Dashboard Page<br/>[index.html]"]
end

subgraph group_planning["Academic Planning"]
  node_deadlines["Deadline Tracker<br/>[deadlines.js]"]
  node_deadlinepage["Deadlines Page<br/>[deadlines.html]"]
  node_study["Study Planner<br/>[study.js]"]
  node_studypage["Study Page<br/>[study.html]"]
end

subgraph group_campus["Campus &amp; Learning"]
  node_events["Events Explorer<br/>[events.js]"]
  node_eventpage["Events Page<br/>[events.html]"]
  node_resources["Resource Hub<br/>[resources.js]"]
  node_resourcespage["Resources Page<br/>[resources.html]"]
end

node_student(("Student"))
node_supabaseauth["Supabase Auth"]
node_postgres[("Supabase PostgreSQL")]
node_localstorage[("Browser Storage")]

node_student -->|"uses"| node_authui
node_authflows -->|"uses"| node_supabaseclient
node_supabaseclient -->|"creates client"| node_supabaseauth
node_authflows -->|"authenticates"| node_supabaseauth
node_authflows -->|"redirects reset"| node_resetpage
node_reset -.->|"uses"| node_supabaseclient
node_reset -.->|"recovers password"| node_supabaseauth
node_student -->|"views"| node_dashboard
node_home -.->|"presents"| node_dashboard
node_dashboard -->|"queries"| node_supabaseclient
node_dashboard -->|"reads overview data"| node_postgres
node_sessionguard -->|"checks session"| node_supabaseclient
node_sessionguard -->|"checks session"| node_supabaseauth
node_student -->|"manages deadlines"| node_deadlines
node_deadlinepage -.->|"presents"| node_deadlines
node_deadlines -->|"reads and writes"| node_postgres
node_student -->|"plans sessions"| node_study
node_studypage -.->|"presents"| node_study
node_study -->|"reads and writes"| node_postgres
node_student -->|"explores events"| node_events
node_eventpage -.->|"presents"| node_events
node_events -->|"stores bookmarks"| node_localstorage
node_student -->|"browses resources"| node_resources
node_resourcespage -.->|"presents"| node_resources
node_resources -.->|"stores resources"| node_localstorage
node_student -->|"edits profile"| node_profile
node_profile -->|"uses"| node_supabaseclient
node_profile -->|"updates account metadata"| node_supabaseauth
node_profile -->|"reads and updates profile"| node_postgres

click node_authui "https://github.com/pixelpioneersbu/campuscompass/blob/main/auth.html"
click node_authflows "https://github.com/pixelpioneersbu/campuscompass/blob/main/auth.js"
click node_sessionguard "https://github.com/pixelpioneersbu/campuscompass/blob/main/auth-guard.js"
click node_profile "https://github.com/pixelpioneersbu/campuscompass/blob/main/profile.js"
click node_dashboard "https://github.com/pixelpioneersbu/campuscompass/blob/main/script.js"
click node_home "https://github.com/pixelpioneersbu/campuscompass/blob/main/index.html"
click node_deadlines "https://github.com/pixelpioneersbu/campuscompass/blob/main/deadlines.js"
click node_deadlinepage "https://github.com/pixelpioneersbu/campuscompass/blob/main/deadlines.html"
click node_study "https://github.com/pixelpioneersbu/campuscompass/blob/main/study.js"
click node_studypage "https://github.com/pixelpioneersbu/campuscompass/blob/main/study.html"
click node_events "https://github.com/pixelpioneersbu/campuscompass/blob/main/events.js"
click node_eventpage "https://github.com/pixelpioneersbu/campuscompass/blob/main/events.html"
click node_resources "https://github.com/pixelpioneersbu/campuscompass/blob/main/resources.js"
click node_resourcespage "https://github.com/pixelpioneersbu/campuscompass/blob/main/resources.html"
click node_reset "https://github.com/pixelpioneersbu/campuscompass/blob/main/reset-password.js"
click node_resetpage "https://github.com/pixelpioneersbu/campuscompass/blob/main/reset-password.html"
click node_supabaseclient "https://github.com/pixelpioneersbu/campuscompass/blob/main/supabase.js"

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_authui,node_authflows,node_sessionguard,node_profile,node_reset,node_resetpage,node_supabaseclient toneBlue
class node_dashboard,node_home,node_postgres,node_localstorage toneAmber
class node_deadlines,node_deadlinepage,node_study,node_studypage toneMint
class node_events,node_eventpage,node_resources,node_resourcespage toneRose
class node_student,node_supabaseauth toneIndigo
```

## Components

### Account & Profile

- [Authentication](https://github.com/pixelpioneersbu/campuscompass/blob/main/auth.html): `auth.html`
- [Sign-up & Recovery](https://github.com/pixelpioneersbu/campuscompass/blob/main/auth.js): `auth.js`
- [Session Guard](https://github.com/pixelpioneersbu/campuscompass/blob/main/auth-guard.js): `auth-guard.js`
- [Profile Management](https://github.com/pixelpioneersbu/campuscompass/blob/main/profile.js): `profile.js`
- [Password Reset](https://github.com/pixelpioneersbu/campuscompass/blob/main/reset-password.js): `reset-password.js`
- [Reset Page](https://github.com/pixelpioneersbu/campuscompass/blob/main/reset-password.html): `reset-password.html`
- [Supabase Client](https://github.com/pixelpioneersbu/campuscompass/blob/main/supabase.js): `supabase.js`

### Student Dashboard

- [Dashboard](https://github.com/pixelpioneersbu/campuscompass/blob/main/script.js): `script.js`
- [Dashboard Page](https://github.com/pixelpioneersbu/campuscompass/blob/main/index.html): `index.html`

### Academic Planning

- [Deadline Tracker](https://github.com/pixelpioneersbu/campuscompass/blob/main/deadlines.js): `deadlines.js`
- [Deadlines Page](https://github.com/pixelpioneersbu/campuscompass/blob/main/deadlines.html): `deadlines.html`
- [Study Planner](https://github.com/pixelpioneersbu/campuscompass/blob/main/study.js): `study.js`
- [Study Page](https://github.com/pixelpioneersbu/campuscompass/blob/main/study.html): `study.html`

### Campus & Learning

- [Events Explorer](https://github.com/pixelpioneersbu/campuscompass/blob/main/events.js): `events.js`
- [Events Page](https://github.com/pixelpioneersbu/campuscompass/blob/main/events.html): `events.html`
- [Resource Hub](https://github.com/pixelpioneersbu/campuscompass/blob/main/resources.js): `resources.js`
- [Resources Page](https://github.com/pixelpioneersbu/campuscompass/blob/main/resources.html): `resources.html`

### Other components

- **Student**
- **Supabase Auth**
- **Supabase PostgreSQL**
- **Browser Storage**

## Connections

- Student → Authentication: uses (evidence: `README.md`)
- Sign-up & Recovery → Supabase Client: uses (evidence: `auth.js`)
- Supabase Client → Supabase Auth: creates client (evidence: `supabase.js`)
- Sign-up & Recovery → Supabase Auth: authenticates (evidence: `auth.js`)
- Sign-up & Recovery → Reset Page: redirects reset (evidence: `auth.js`)
- Password Reset → Supabase Client: uses
- Password Reset → Supabase Auth: recovers password
- Student → Dashboard: views (evidence: `README.md`)
- Dashboard Page → Dashboard: presents
- Dashboard → Supabase Client: queries (evidence: `script.js`)
- Dashboard → Supabase PostgreSQL: reads overview data (evidence: `script.js`)
- Session Guard → Supabase Client: checks session (evidence: `auth-guard.js`)
- Session Guard → Supabase Auth: checks session (evidence: `auth-guard.js`)
- Student → Deadline Tracker: manages deadlines (evidence: `README.md`)
- Deadlines Page → Deadline Tracker: presents
- Deadline Tracker → Supabase PostgreSQL: reads and writes (evidence: `deadlines.js`)
- Student → Study Planner: plans sessions (evidence: `README.md`)
- Study Page → Study Planner: presents
- Study Planner → Supabase PostgreSQL: reads and writes (evidence: `study.js`)
- Student → Events Explorer: explores events (evidence: `README.md`)
- Events Page → Events Explorer: presents
- Events Explorer → Browser Storage: stores bookmarks (evidence: `events.js`)
- Student → Resource Hub: browses resources (evidence: `README.md`)
- Resources Page → Resource Hub: presents
- Resource Hub → Browser Storage: stores resources
- Student → Profile Management: edits profile (evidence: `README.md`)
- Profile Management → Supabase Client: uses (evidence: `profile.js`)
- Profile Management → Supabase Auth: updates account metadata (evidence: `profile.js`)
- Profile Management → Supabase PostgreSQL: reads and updates profile (evidence: `profile.js`)
