# abhinavj2705/cu-nav architecture

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

## Overview

CU Now is a campus events and navigation app: users authenticate, browse events and campus information, and find venues; administrators manage events and notifications. The graph follows the evidenced routing, authentication, event-data, and map workflows, while retaining major page modules named in the source index. Several pages and components were not sampled, so their internal behavior and connections are omitted rather than inferred.

Main entry points: [`src/App.tsx`](https://github.com/abhinavj2705/cu-nav/blob/main/src/App.tsx) (Application router), [`src/firebase.ts`](https://github.com/abhinavj2705/cu-nav/blob/main/src/firebase.ts) (Firebase setup), [`src/pages/admin/EditEvent.tsx`](https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/admin/EditEvent.tsx) (Edit event), [`src/components/CampusMap.tsx`](https://github.com/abhinavj2705/cu-nav/blob/main/src/components/CampusMap.tsx) (Interactive campus map)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and access"]
  node_app["Application router<br/>[App.tsx]"]
  node_login["Login<br/>[Login.tsx]"]
  node_onboarding["User onboarding<br/>[Onboarding.tsx]"]
  node_admin_onboarding["Admin onboarding"]
  node_dashboard["User dashboard<br/>[Dashboard.tsx]"]
  node_profile["User profile<br/>[Profile.tsx]"]
end

subgraph group_events["Events and administration"]
  node_schedule["Event schedule<br/>[Schedule.tsx]"]
  node_admin_dashboard["Admin dashboard<br/>[AdminDashboard.tsx]"]
  node_create_event["Create event<br/>[CreateEvent.tsx]"]
  node_edit_event["Edit event<br/>[EditEvent.tsx]"]
  node_create_notification["Create notification"]
  node_events_context["Event data context<br/>[EventsContext.tsx]"]
  node_formatters["Event formatters<br/>[formatters.ts]"]
end

subgraph group_campus["Campus discovery"]
  node_about["Campus information<br/>[About.tsx]"]
  node_map_navigation["Map navigation<br/>[MapNavigation.tsx]"]
  node_campus_map["Interactive campus map<br/>[CampusMap.tsx]"]
  node_map_data["Map and venue data<br/>[mapConfig.ts]"]
  node_venues["Venue directory<br/>[venues.ts]"]
  node_route_finding["Route finding<br/>[pathfinding.ts]"]
  node_map_controls["Pan and zoom<br/>[useMapPanZoom.ts]"]
end

subgraph group_platform["Identity and state"]
  node_auth_context["Authentication context<br/>[AuthContext.tsx]"]
  node_theme["Theme state<br/>[ThemeContext.tsx]"]
  node_firebase["Firebase setup<br/>[firebase.ts]"]
end

node_visitor(("Visitor"))
node_firebase_services[("Firebase services")]

node_visitor -->|"opens"| node_app
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_profile
node_app -->|"routes to"| node_about
node_app -->|"routes to"| node_schedule
node_app -->|"routes to"| node_map_navigation
node_app -->|"routes to"| node_admin_dashboard
node_app -->|"routes to"| node_create_event
node_app -->|"routes to"| node_edit_event
node_app -->|"routes to"| node_create_notification
node_app -->|"provides auth"| node_auth_context
node_app -->|"provides events"| node_events_context
node_app -->|"provides theme"| node_theme
node_login -->|"uses auth"| node_firebase
node_login -->|"reads session"| node_auth_context
node_login -->|"reads theme"| node_theme
node_auth_context -->|"uses services"| node_firebase
node_auth_context -->|"watches user profile"| node_firebase_services
node_events_context -->|"reads user group"| node_auth_context
node_events_context -->|"uses database"| node_firebase
node_events_context -->|"watches events"| node_firebase_services
node_firebase -->|"initializes"| node_firebase_services
node_schedule -->|"reads events"| node_events_context
node_schedule -->|"formats times"| node_formatters
node_schedule -->|"looks up venues"| node_venues
node_about -->|"groups venues"| node_venues
node_map_navigation -.->|"renders map"| node_campus_map
node_campus_map -->|"reads map data"| node_map_data
node_campus_map -->|"reads venues"| node_venues
node_campus_map -->|"finds routes"| node_route_finding
node_campus_map -->|"uses controls"| node_map_controls
node_admin_dashboard -->|"uses database"| node_firebase
node_admin_dashboard -->|"manages events and users"| node_firebase_services
node_admin_dashboard -->|"formats times"| node_formatters
node_edit_event -->|"uses database"| node_firebase
node_edit_event -->|"loads and updates event"| node_firebase_services
node_edit_event -->|"gets directions"| node_venues
node_edit_event -.->|"shares form workflow"| node_create_event

click node_app "https://github.com/abhinavj2705/cu-nav/blob/main/src/App.tsx"
click node_login "https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/auth/Login.tsx"
click node_onboarding "https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/auth/Onboarding.tsx"
click node_admin_onboarding "https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/auth/AdminOnboarding.tsx"
click node_dashboard "https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/user/Dashboard.tsx"
click node_profile "https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/user/Profile.tsx"
click node_about "https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/user/About.tsx"
click node_schedule "https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/user/Schedule.tsx"
click node_map_navigation "https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/user/MapNavigation.tsx"
click node_campus_map "https://github.com/abhinavj2705/cu-nav/blob/main/src/components/CampusMap.tsx"
click node_map_data "https://github.com/abhinavj2705/cu-nav/blob/main/src/data/mapConfig.ts"
click node_venues "https://github.com/abhinavj2705/cu-nav/blob/main/src/data/venues.ts"
click node_route_finding "https://github.com/abhinavj2705/cu-nav/blob/main/src/utils/pathfinding.ts"
click node_map_controls "https://github.com/abhinavj2705/cu-nav/blob/main/src/hooks/useMapPanZoom.ts"
click node_admin_dashboard "https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/admin/AdminDashboard.tsx"
click node_create_event "https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/admin/CreateEvent.tsx"
click node_edit_event "https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/admin/EditEvent.tsx"
click node_create_notification "https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/admin/CreateNotification.tsx"
click node_events_context "https://github.com/abhinavj2705/cu-nav/blob/main/src/context/EventsContext.tsx"
click node_formatters "https://github.com/abhinavj2705/cu-nav/blob/main/src/utils/formatters.ts"
click node_auth_context "https://github.com/abhinavj2705/cu-nav/blob/main/src/context/AuthContext.tsx"
click node_theme "https://github.com/abhinavj2705/cu-nav/blob/main/src/context/ThemeContext.tsx"
click node_firebase "https://github.com/abhinavj2705/cu-nav/blob/main/src/firebase.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_login,node_onboarding,node_admin_onboarding,node_dashboard,node_profile toneBlue
class node_schedule,node_admin_dashboard,node_create_event,node_edit_event,node_create_notification,node_events_context,node_formatters,node_firebase_services toneAmber
class node_about,node_map_navigation,node_campus_map,node_map_data,node_venues,node_route_finding,node_map_controls toneMint
class node_auth_context,node_theme,node_firebase toneRose
class node_visitor toneIndigo
```

## Components

### App and access

- [Application router](https://github.com/abhinavj2705/cu-nav/blob/main/src/App.tsx): `src/App.tsx`
- [Login](https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/auth/Login.tsx): `src/pages/auth/Login.tsx`
- [User onboarding](https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/auth/Onboarding.tsx): `src/pages/auth/Onboarding.tsx`
- [Admin onboarding](https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/auth/AdminOnboarding.tsx): `src/pages/auth/AdminOnboarding.tsx`
- [User dashboard](https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/user/Dashboard.tsx): `src/pages/user/Dashboard.tsx`
- [User profile](https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/user/Profile.tsx): `src/pages/user/Profile.tsx`

### Events and administration

- [Event schedule](https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/user/Schedule.tsx): `src/pages/user/Schedule.tsx`
- [Admin dashboard](https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/admin/AdminDashboard.tsx): `src/pages/admin/AdminDashboard.tsx`
- [Create event](https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/admin/CreateEvent.tsx): `src/pages/admin/CreateEvent.tsx`
- [Edit event](https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/admin/EditEvent.tsx): `src/pages/admin/EditEvent.tsx`
- [Create notification](https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/admin/CreateNotification.tsx): `src/pages/admin/CreateNotification.tsx`
- [Event data context](https://github.com/abhinavj2705/cu-nav/blob/main/src/context/EventsContext.tsx): `src/context/EventsContext.tsx`
- [Event formatters](https://github.com/abhinavj2705/cu-nav/blob/main/src/utils/formatters.ts): `src/utils/formatters.ts`

### Campus discovery

- [Campus information](https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/user/About.tsx): `src/pages/user/About.tsx`
- [Map navigation](https://github.com/abhinavj2705/cu-nav/blob/main/src/pages/user/MapNavigation.tsx): `src/pages/user/MapNavigation.tsx`
- [Interactive campus map](https://github.com/abhinavj2705/cu-nav/blob/main/src/components/CampusMap.tsx): `src/components/CampusMap.tsx`
- [Map and venue data](https://github.com/abhinavj2705/cu-nav/blob/main/src/data/mapConfig.ts): `src/data/mapConfig.ts`
- [Venue directory](https://github.com/abhinavj2705/cu-nav/blob/main/src/data/venues.ts): `src/data/venues.ts`
- [Route finding](https://github.com/abhinavj2705/cu-nav/blob/main/src/utils/pathfinding.ts): `src/utils/pathfinding.ts`
- [Pan and zoom](https://github.com/abhinavj2705/cu-nav/blob/main/src/hooks/useMapPanZoom.ts): `src/hooks/useMapPanZoom.ts`

### Identity and state

- [Authentication context](https://github.com/abhinavj2705/cu-nav/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Theme state](https://github.com/abhinavj2705/cu-nav/blob/main/src/context/ThemeContext.tsx): `src/context/ThemeContext.tsx`
- [Firebase setup](https://github.com/abhinavj2705/cu-nav/blob/main/src/firebase.ts): `src/firebase.ts`

### Other components

- **Visitor**
- **Firebase services**

## Connections

- Visitor → Application router: opens (evidence: `src/App.tsx`)
- Application router → Login: routes to (evidence: `src/App.tsx`)
- Application router → User onboarding: routes to (evidence: `src/App.tsx`)
- Application router → Admin onboarding: routes to (evidence: `src/App.tsx`)
- Application router → User dashboard: routes to (evidence: `src/App.tsx`)
- Application router → User profile: routes to (evidence: `src/App.tsx`)
- Application router → Campus information: routes to (evidence: `src/App.tsx`)
- Application router → Event schedule: routes to (evidence: `src/App.tsx`)
- Application router → Map navigation: routes to (evidence: `src/App.tsx`)
- Application router → Admin dashboard: routes to (evidence: `src/App.tsx`)
- Application router → Create event: routes to (evidence: `src/App.tsx`)
- Application router → Edit event: routes to (evidence: `src/App.tsx`)
- Application router → Create notification: routes to (evidence: `src/App.tsx`)
- Application router → Authentication context: provides auth (evidence: `src/App.tsx`)
- Application router → Event data context: provides events (evidence: `src/App.tsx`)
- Application router → Theme state: provides theme (evidence: `src/App.tsx`)
- Login → Firebase setup: uses auth (evidence: `src/pages/auth/Login.tsx`)
- Login → Authentication context: reads session (evidence: `src/pages/auth/Login.tsx`)
- Login → Theme state: reads theme (evidence: `src/pages/auth/Login.tsx`)
- Authentication context → Firebase setup: uses services (evidence: `src/context/AuthContext.tsx`)
- Authentication context → Firebase services: watches user profile (evidence: `src/context/AuthContext.tsx`)
- Event data context → Authentication context: reads user group (evidence: `src/context/EventsContext.tsx`)
- Event data context → Firebase setup: uses database (evidence: `src/context/EventsContext.tsx`)
- Event data context → Firebase services: watches events (evidence: `src/context/EventsContext.tsx`)
- Firebase setup → Firebase services: initializes (evidence: `src/firebase.ts`)
- Event schedule → Event data context: reads events (evidence: `src/pages/user/Schedule.tsx`)
- Event schedule → Event formatters: formats times (evidence: `src/pages/user/Schedule.tsx`)
- Event schedule → Venue directory: looks up venues (evidence: `src/pages/user/Schedule.tsx`)
- Campus information → Venue directory: groups venues (evidence: `src/pages/user/About.tsx`)
- Map navigation → Interactive campus map: renders map
- Interactive campus map → Map and venue data: reads map data (evidence: `src/components/CampusMap.tsx`)
- Interactive campus map → Venue directory: reads venues (evidence: `src/components/CampusMap.tsx`)
- Interactive campus map → Route finding: finds routes (evidence: `src/components/CampusMap.tsx`)
- Interactive campus map → Pan and zoom: uses controls (evidence: `src/components/CampusMap.tsx`)
- Admin dashboard → Firebase setup: uses database (evidence: `src/pages/admin/AdminDashboard.tsx`)
- Admin dashboard → Firebase services: manages events and users (evidence: `src/pages/admin/AdminDashboard.tsx`)
- Admin dashboard → Event formatters: formats times (evidence: `src/pages/admin/AdminDashboard.tsx`)
- Edit event → Firebase setup: uses database (evidence: `src/pages/admin/EditEvent.tsx`)
- Edit event → Firebase services: loads and updates event (evidence: `src/pages/admin/EditEvent.tsx`)
- Edit event → Venue directory: gets directions (evidence: `src/pages/admin/EditEvent.tsx`)
- Edit event → Create event: shares form workflow
