# abhinavj2705/cu-now architecture

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

- Interactive diagram: https://gitdiagram.com/abhinavj2705/cu-now
- Repository: https://github.com/abhinavj2705/cu-now

## Overview

CU Now is a campus events and announcements app, with group-aware schedules, venue guidance, user onboarding and profiles, and administrative tools for managing events, groups, announcements, feedback, and admin approvals. The main workflow is route selection through the app, authentication and profile-based access, then viewing schedule or announcements; admins use protected routes to manage content. Firebase-backed contexts provide shared auth, event, and group state. The README is only a Vite template and documents no product capabilities; unsampled routes are represented from the source index, so their internal behavior is not inferred.

Main entry points: [`src/App.jsx`](https://github.com/abhinavj2705/cu-now/blob/main/src/App.jsx) (App Router), [`src/firebase.js`](https://github.com/abhinavj2705/cu-now/blob/main/src/firebase.js) (Firebase Setup), [`src/context/GroupConfigContext.jsx`](https://github.com/abhinavj2705/cu-now/blob/main/src/context/GroupConfigContext.jsx) (Group Config), [`src/pages/user/Dashboard.jsx`](https://github.com/abhinavj2705/cu-now/blob/main/src/pages/user/Dashboard.jsx) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and Access"]
  node_app["App Router<br/>[App.jsx]"]
  node_authguard["Route Guards<br/>[ProtectedRoute.jsx]"]
  node_admin_guard["Admin Guard<br/>[AdminRoute.jsx]"]
  node_login["Login<br/>[Login.jsx]"]
  node_onboarding["User Onboarding<br/>[Onboarding.jsx]"]
end

subgraph group_user["User Experience"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_schedule["Schedule<br/>[Schedule.jsx]"]
  node_announcements["Announcements<br/>[Announcements.jsx]"]
  node_profile["Profile<br/>[Profile.jsx]"]
  node_about["About<br/>[About.jsx]"]
  node_feedback_popup["Feedback Popup<br/>[FeedbackPopup.jsx]"]
  node_install_banner["Install Banner<br/>[InstallBanner.jsx]"]
end

subgraph group_admin["Administration"]
  node_admin_onboarding["Admin Onboarding"]
  node_admin_dashboard["Admin Dashboard<br/>[AdminDashboard.jsx]"]
  node_event_create["Create Event<br/>[CreateEvent.jsx]"]
  node_event_edit["Edit Event<br/>[EditEvent.jsx]"]
  node_announcement_create["Create Announcement"]
  node_manage_groups["Manage Groups<br/>[ManageGroups.jsx]"]
  node_admin_feedback["Feedback Management<br/>[AdminFeedbacks.jsx]"]
end

subgraph group_shared["Shared Services"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_auth["Auth Context<br/>[AuthContext.jsx]"]
  node_events["Events Context<br/>[EventsContext.jsx]"]
  node_group_config["Group Config"]
  node_theme["Theme Context<br/>[ThemeContext.jsx]"]
  node_firebase["Firebase Setup<br/>[firebase.js]"]
  node_group_data["Group Definitions<br/>[groups.js]"]
  node_venue_data["Venue Registry<br/>[venues.js]"]
  node_formatters["Formatters<br/>[formatters.js]"]
  node_unread["Unread Tracker"]
  node_venue_directions["Venue Directions"]
  node_input_controls["Date and Time Inputs"]
  node_confirm_modal["Confirm Modal<br/>[ConfirmModal.jsx]"]
end

node_visitor(("User"))
node_firebase_service[("Firebase Services")]

node_visitor -->|"opens"| node_app
node_app -->|"provides"| node_auth
node_app -->|"provides"| node_events
node_app -->|"provides"| node_group_config
node_app -->|"provides"| node_theme
node_app -->|"routes through"| node_authguard
node_app -->|"routes through"| node_admin_guard
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_onboarding
node_app -->|"routes to"| node_admin_onboarding
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_schedule
node_app -->|"routes to"| node_announcements
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_about
node_app -->|"routes to"| node_admin_dashboard
node_app -->|"routes to"| node_event_create
node_app -->|"routes to"| node_event_edit
node_app -->|"routes to"| node_announcement_create
node_app -->|"routes to"| node_manage_groups
node_app -->|"routes to"| node_admin_feedback
node_app -->|"renders"| node_feedback_popup
node_app -->|"renders"| node_install_banner
node_authguard -->|"reads auth"| node_auth
node_admin_guard -->|"checks role"| node_auth
node_auth -->|"uses client"| node_firebase
node_events -->|"reads profile"| node_auth
node_events -->|"subscribes events"| node_firebase
node_group_config -->|"loads config"| node_firebase
node_group_config -->|"uses defaults"| node_group_data
node_firebase -->|"initializes"| node_firebase_service
node_dashboard -->|"reads events"| node_events
node_schedule -->|"reads events"| node_events
node_dashboard -->|"reads groups"| node_group_config
node_schedule -->|"reads groups"| node_group_config
node_dashboard -->|"renders"| node_venue_directions
node_schedule -->|"renders"| node_venue_directions
node_venue_directions -->|"looks up venue"| node_venue_data
node_about -->|"reads venues"| node_venue_data
node_dashboard -->|"formats values"| node_formatters
node_schedule -->|"formats values"| node_formatters
node_announcements -->|"loads announcements"| node_firebase
node_announcements -->|"formats dates"| node_formatters
node_navbar -->|"tracks unread"| node_unread
node_unread -->|"subscribes latest"| node_firebase
node_event_create -->|"writes events"| node_firebase
node_event_edit -->|"updates events"| node_firebase
node_event_create -->|"uses config"| node_group_config

click node_app "https://github.com/abhinavj2705/cu-now/blob/main/src/App.jsx"
click node_authguard "https://github.com/abhinavj2705/cu-now/blob/main/src/components/ProtectedRoute.jsx"
click node_admin_guard "https://github.com/abhinavj2705/cu-now/blob/main/src/components/AdminRoute.jsx"
click node_login "https://github.com/abhinavj2705/cu-now/blob/main/src/pages/auth/Login.jsx"
click node_onboarding "https://github.com/abhinavj2705/cu-now/blob/main/src/pages/auth/Onboarding.jsx"
click node_admin_onboarding "https://github.com/abhinavj2705/cu-now/blob/main/src/pages/auth/AdminOnboarding.jsx"
click node_dashboard "https://github.com/abhinavj2705/cu-now/blob/main/src/pages/user/Dashboard.jsx"
click node_schedule "https://github.com/abhinavj2705/cu-now/blob/main/src/pages/user/Schedule.jsx"
click node_announcements "https://github.com/abhinavj2705/cu-now/blob/main/src/pages/user/Announcements.jsx"
click node_profile "https://github.com/abhinavj2705/cu-now/blob/main/src/pages/user/Profile.jsx"
click node_about "https://github.com/abhinavj2705/cu-now/blob/main/src/pages/user/About.jsx"
click node_navbar "https://github.com/abhinavj2705/cu-now/blob/main/src/components/Navbar.jsx"
click node_auth "https://github.com/abhinavj2705/cu-now/blob/main/src/context/AuthContext.jsx"
click node_events "https://github.com/abhinavj2705/cu-now/blob/main/src/context/EventsContext.jsx"
click node_group_config "https://github.com/abhinavj2705/cu-now/blob/main/src/context/GroupConfigContext.jsx"
click node_theme "https://github.com/abhinavj2705/cu-now/blob/main/src/context/ThemeContext.jsx"
click node_firebase "https://github.com/abhinavj2705/cu-now/blob/main/src/firebase.js"
click node_group_data "https://github.com/abhinavj2705/cu-now/blob/main/src/data/groups.js"
click node_venue_data "https://github.com/abhinavj2705/cu-now/blob/main/src/data/venues.js"
click node_formatters "https://github.com/abhinavj2705/cu-now/blob/main/src/utils/formatters.js"
click node_unread "https://github.com/abhinavj2705/cu-now/blob/main/src/hooks/useUnreadAnnouncements.js"
click node_venue_directions "https://github.com/abhinavj2705/cu-now/blob/main/src/components/VenueDirections.jsx"
click node_input_controls "https://github.com/abhinavj2705/cu-now/blob/main/src/components/CustomDatePicker.jsx"
click node_confirm_modal "https://github.com/abhinavj2705/cu-now/blob/main/src/components/ConfirmModal.jsx"
click node_admin_dashboard "https://github.com/abhinavj2705/cu-now/blob/main/src/pages/admin/AdminDashboard.jsx"
click node_event_create "https://github.com/abhinavj2705/cu-now/blob/main/src/pages/admin/CreateEvent.jsx"
click node_event_edit "https://github.com/abhinavj2705/cu-now/blob/main/src/pages/admin/EditEvent.jsx"
click node_announcement_create "https://github.com/abhinavj2705/cu-now/blob/main/src/pages/admin/CreateAnnouncement.jsx"
click node_manage_groups "https://github.com/abhinavj2705/cu-now/blob/main/src/pages/admin/ManageGroups.jsx"
click node_admin_feedback "https://github.com/abhinavj2705/cu-now/blob/main/src/pages/admin/AdminFeedbacks.jsx"
click node_feedback_popup "https://github.com/abhinavj2705/cu-now/blob/main/src/components/FeedbackPopup.jsx"
click node_install_banner "https://github.com/abhinavj2705/cu-now/blob/main/src/components/InstallBanner.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_app,node_authguard,node_admin_guard,node_login,node_onboarding,node_visitor toneBlue
class node_dashboard,node_schedule,node_announcements,node_profile,node_about,node_feedback_popup,node_install_banner,node_firebase_service toneAmber
class node_admin_onboarding,node_admin_dashboard,node_event_create,node_event_edit,node_announcement_create,node_manage_groups,node_admin_feedback toneMint
class node_navbar,node_auth,node_events,node_group_config,node_theme,node_firebase,node_group_data,node_venue_data,node_formatters,node_unread,node_venue_directions,node_input_controls,node_confirm_modal toneRose
```

## Components

### App and Access

- [App Router](https://github.com/abhinavj2705/cu-now/blob/main/src/App.jsx): `src/App.jsx`
- [Route Guards](https://github.com/abhinavj2705/cu-now/blob/main/src/components/ProtectedRoute.jsx): `src/components/ProtectedRoute.jsx`
- [Admin Guard](https://github.com/abhinavj2705/cu-now/blob/main/src/components/AdminRoute.jsx): `src/components/AdminRoute.jsx`
- [Login](https://github.com/abhinavj2705/cu-now/blob/main/src/pages/auth/Login.jsx): `src/pages/auth/Login.jsx`
- [User Onboarding](https://github.com/abhinavj2705/cu-now/blob/main/src/pages/auth/Onboarding.jsx): `src/pages/auth/Onboarding.jsx`

### User Experience

- [Dashboard](https://github.com/abhinavj2705/cu-now/blob/main/src/pages/user/Dashboard.jsx): `src/pages/user/Dashboard.jsx`
- [Schedule](https://github.com/abhinavj2705/cu-now/blob/main/src/pages/user/Schedule.jsx): `src/pages/user/Schedule.jsx`
- [Announcements](https://github.com/abhinavj2705/cu-now/blob/main/src/pages/user/Announcements.jsx): `src/pages/user/Announcements.jsx`
- [Profile](https://github.com/abhinavj2705/cu-now/blob/main/src/pages/user/Profile.jsx): `src/pages/user/Profile.jsx`
- [About](https://github.com/abhinavj2705/cu-now/blob/main/src/pages/user/About.jsx): `src/pages/user/About.jsx`
- [Feedback Popup](https://github.com/abhinavj2705/cu-now/blob/main/src/components/FeedbackPopup.jsx): `src/components/FeedbackPopup.jsx`
- [Install Banner](https://github.com/abhinavj2705/cu-now/blob/main/src/components/InstallBanner.jsx): `src/components/InstallBanner.jsx`

### Administration

- [Admin Onboarding](https://github.com/abhinavj2705/cu-now/blob/main/src/pages/auth/AdminOnboarding.jsx): `src/pages/auth/AdminOnboarding.jsx`
- [Admin Dashboard](https://github.com/abhinavj2705/cu-now/blob/main/src/pages/admin/AdminDashboard.jsx): `src/pages/admin/AdminDashboard.jsx`
- [Create Event](https://github.com/abhinavj2705/cu-now/blob/main/src/pages/admin/CreateEvent.jsx): `src/pages/admin/CreateEvent.jsx`
- [Edit Event](https://github.com/abhinavj2705/cu-now/blob/main/src/pages/admin/EditEvent.jsx): `src/pages/admin/EditEvent.jsx`
- [Create Announcement](https://github.com/abhinavj2705/cu-now/blob/main/src/pages/admin/CreateAnnouncement.jsx): `src/pages/admin/CreateAnnouncement.jsx`
- [Manage Groups](https://github.com/abhinavj2705/cu-now/blob/main/src/pages/admin/ManageGroups.jsx): `src/pages/admin/ManageGroups.jsx`
- [Feedback Management](https://github.com/abhinavj2705/cu-now/blob/main/src/pages/admin/AdminFeedbacks.jsx): `src/pages/admin/AdminFeedbacks.jsx`

### Shared Services

- [Navigation](https://github.com/abhinavj2705/cu-now/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`
- [Auth Context](https://github.com/abhinavj2705/cu-now/blob/main/src/context/AuthContext.jsx): `src/context/AuthContext.jsx`
- [Events Context](https://github.com/abhinavj2705/cu-now/blob/main/src/context/EventsContext.jsx): `src/context/EventsContext.jsx`
- [Group Config](https://github.com/abhinavj2705/cu-now/blob/main/src/context/GroupConfigContext.jsx): `src/context/GroupConfigContext.jsx`
- [Theme Context](https://github.com/abhinavj2705/cu-now/blob/main/src/context/ThemeContext.jsx): `src/context/ThemeContext.jsx`
- [Firebase Setup](https://github.com/abhinavj2705/cu-now/blob/main/src/firebase.js): `src/firebase.js`
- [Group Definitions](https://github.com/abhinavj2705/cu-now/blob/main/src/data/groups.js): `src/data/groups.js`
- [Venue Registry](https://github.com/abhinavj2705/cu-now/blob/main/src/data/venues.js): `src/data/venues.js`
- [Formatters](https://github.com/abhinavj2705/cu-now/blob/main/src/utils/formatters.js): `src/utils/formatters.js`
- [Unread Tracker](https://github.com/abhinavj2705/cu-now/blob/main/src/hooks/useUnreadAnnouncements.js): `src/hooks/useUnreadAnnouncements.js`
- [Venue Directions](https://github.com/abhinavj2705/cu-now/blob/main/src/components/VenueDirections.jsx): `src/components/VenueDirections.jsx`
- [Date and Time Inputs](https://github.com/abhinavj2705/cu-now/blob/main/src/components/CustomDatePicker.jsx): `src/components/CustomDatePicker.jsx`
- [Confirm Modal](https://github.com/abhinavj2705/cu-now/blob/main/src/components/ConfirmModal.jsx): `src/components/ConfirmModal.jsx`

### Other components

- **User**
- **Firebase Services**

## Connections

- User → App Router: opens (evidence: `src/App.jsx`)
- App Router → Auth Context: provides (evidence: `src/App.jsx`)
- App Router → Events Context: provides (evidence: `src/App.jsx`)
- App Router → Group Config: provides (evidence: `src/App.jsx`)
- App Router → Theme Context: provides (evidence: `src/App.jsx`)
- App Router → Route Guards: routes through (evidence: `src/App.jsx`)
- App Router → Admin Guard: routes through (evidence: `src/App.jsx`)
- App Router → Login: routes to (evidence: `src/App.jsx`)
- App Router → User Onboarding: routes to (evidence: `src/App.jsx`)
- App Router → Admin Onboarding: routes to (evidence: `src/App.jsx`)
- App Router → Dashboard: routes to (evidence: `src/App.jsx`)
- App Router → Schedule: routes to (evidence: `src/App.jsx`)
- App Router → Announcements: routes to (evidence: `src/App.jsx`)
- App Router → Profile: routes to (evidence: `src/App.jsx`)
- App Router → About: routes to (evidence: `src/App.jsx`)
- App Router → Admin Dashboard: routes to (evidence: `src/App.jsx`)
- App Router → Create Event: routes to (evidence: `src/App.jsx`)
- App Router → Edit Event: routes to (evidence: `src/App.jsx`)
- App Router → Create Announcement: routes to (evidence: `src/App.jsx`)
- App Router → Manage Groups: routes to (evidence: `src/App.jsx`)
- App Router → Feedback Management: routes to (evidence: `src/App.jsx`)
- App Router → Feedback Popup: renders (evidence: `src/App.jsx`)
- App Router → Install Banner: renders (evidence: `src/App.jsx`)
- Route Guards → Auth Context: reads auth (evidence: `src/components/ProtectedRoute.jsx`)
- Admin Guard → Auth Context: checks role (evidence: `src/components/AdminRoute.jsx`)
- Auth Context → Firebase Setup: uses client (evidence: `src/context/AuthContext.jsx`)
- Events Context → Auth Context: reads profile (evidence: `src/context/EventsContext.jsx`)
- Events Context → Firebase Setup: subscribes events (evidence: `src/context/EventsContext.jsx`)
- Group Config → Firebase Setup: loads config (evidence: `src/context/GroupConfigContext.jsx`)
- Group Config → Group Definitions: uses defaults (evidence: `src/context/GroupConfigContext.jsx`)
- Firebase Setup → Firebase Services: initializes (evidence: `src/firebase.js`)
- Dashboard → Events Context: reads events (evidence: `src/pages/user/Dashboard.jsx`)
- Schedule → Events Context: reads events (evidence: `src/pages/user/Schedule.jsx`)
- Dashboard → Group Config: reads groups (evidence: `src/pages/user/Dashboard.jsx`)
- Schedule → Group Config: reads groups (evidence: `src/pages/user/Schedule.jsx`)
- Dashboard → Venue Directions: renders (evidence: `src/pages/user/Dashboard.jsx`)
- Schedule → Venue Directions: renders (evidence: `src/pages/user/Schedule.jsx`)
- Venue Directions → Venue Registry: looks up venue (evidence: `src/pages/user/Dashboard.jsx`)
- About → Venue Registry: reads venues (evidence: `src/pages/user/About.jsx`)
- Dashboard → Formatters: formats values (evidence: `src/pages/user/Dashboard.jsx`)
- Schedule → Formatters: formats values (evidence: `src/pages/user/Schedule.jsx`)
- Announcements → Firebase Setup: loads announcements (evidence: `src/pages/user/Announcements.jsx`)
- Announcements → Formatters: formats dates (evidence: `src/pages/user/Announcements.jsx`)
- Navigation → Unread Tracker: tracks unread (evidence: `src/components/Navbar.jsx`)
- Unread Tracker → Firebase Setup: subscribes latest (evidence: `src/hooks/useUnreadAnnouncements.js`)
- Create Event → Firebase Setup: writes events (evidence: `src/pages/admin/CreateEvent.jsx`)
- Edit Event → Firebase Setup: updates events (evidence: `src/pages/admin/EditEvent.jsx`)
- Create Event → Group Config: uses config (evidence: `src/pages/admin/CreateEvent.jsx`)
