# sampath-8985/mbuacm architecture

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

## Overview

MBU ACM is a student-chapter website combining public chapter information, event discovery and registration, student profiles, and an administrator portal. Visitors browse events and chapter content; students authenticate, complete profiles, register, and access their event passes; administrators manage events, crew, gallery albums, rosters, and inquiries. The React app routes these experiences to domain services, which use Firebase when configured and browser localStorage in demo mode. The graph follows documented routes and indexed imports; unsampled service internals are not assumed.

Main entry points: [`src/App.tsx`](https://github.com/sampath-8985/mbuacm/blob/main/src/App.tsx) (Application router), [`src/services/events.ts`](https://github.com/sampath-8985/mbuacm/blob/main/src/services/events.ts) (Event service), [`src/services/registrations.ts`](https://github.com/sampath-8985/mbuacm/blob/main/src/services/registrations.ts) (Registration service), [`src/services/crew.ts`](https://github.com/sampath-8985/mbuacm/blob/main/src/services/crew.ts) (Crew service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and identity"]
  node_app["Application router<br/>[App.tsx]"]
  node_auth["Authentication context<br/>[AuthContext.tsx]"]
  node_login["Sign-in and signup<br/>[LoginPage.tsx]"]
end

subgraph group_public["Public chapter site"]
  node_home["Chapter home<br/>[HomePage.tsx]"]
  node_events["Event discovery<br/>[EventsPage.tsx]"]
  node_eventdetail["Event details"]
  node_crew["Crew roster<br/>[CrewPage.tsx]"]
  node_gallery["Event gallery<br/>[GalleryPage.tsx]"]
  node_contact["Contact inquiries<br/>[ContactPage.tsx]"]
end

subgraph group_student["Student hub"]
  node_profile["Profile onboarding"]
  node_dashboard["Student dashboard"]
  node_profileedit["Profile management"]
end

subgraph group_admin["Admin portal"]
  node_adminlayout["Admin access gate<br/>[AdminLayout.tsx]"]
  node_admindash["Admin overview"]
  node_adminevents["Event management"]
  node_eventform["Event editor"]
  node_admincrew["Crew management<br/>[AdminCrewPage.tsx]"]
  node_admingallery["Gallery management"]
  node_adminregs["Roster management"]
  node_admincontacts["Inquiry review"]
end

subgraph group_data["Domain data and storage"]
  node_eventservice["Event service<br/>[events.ts]"]
  node_crewservice["Crew service<br/>[crew.ts]"]
  node_regservice["Registration service<br/>[registrations.ts]"]
  node_profileservice["Profile service<br/>[profiles.ts]"]
  node_galleryservice["Gallery service<br/>[gallery.ts]"]
  node_contactservice["Contact service<br/>[contact.ts]"]
  node_upload["Image upload<br/>[storage.ts]"]
  node_localstore[("Demo local store<br/>[store.ts]")]
  node_mockdata["Demo seed data<br/>[mockData.ts]"]
  node_firebase["Firebase clients<br/>[firebase.ts]"]
end

node_visitor(("Visitor or student"))
node_firestore[("Cloud Firestore")]
node_cloudstorage[("Firebase Storage")]

node_visitor -->|"opens site"| node_app
node_app -->|"provides identity"| node_auth
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_events
node_app -->|"routes to"| node_eventdetail
node_app -->|"routes to"| node_crew
node_app -->|"routes to"| node_gallery
node_app -->|"routes to"| node_contact
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_profileedit
node_app -->|"routes admin"| node_adminlayout
node_home -->|"loads events"| node_eventservice
node_home -->|"loads crew"| node_crewservice
node_events -->|"loads events"| node_eventservice
node_eventdetail -->|"loads event"| node_eventservice
node_eventdetail -->|"registers attendee"| node_regservice
node_crew -->|"loads roster"| node_crewservice
node_gallery -->|"loads albums"| node_galleryservice
node_contact -->|"submits inquiry"| node_contactservice
node_auth -->|"reads profile"| node_profileservice
node_profile -->|"saves profile"| node_profileservice
node_dashboard -->|"loads registrations"| node_regservice
node_profileedit -->|"updates profile"| node_profileservice
node_adminlayout -->|"checks role"| node_auth
node_admindash -->|"counts events"| node_eventservice
node_admindash -->|"counts crew"| node_crewservice
node_admindash -->|"loads activity"| node_regservice
node_admindash -->|"counts inquiries"| node_contactservice
node_adminevents -->|"manages events"| node_eventservice
node_eventform -->|"saves event"| node_eventservice
node_eventform -->|"uploads poster"| node_upload
node_admincrew -->|"manages crew"| node_crewservice
node_admincrew -->|"uploads photos"| node_upload
node_admingallery -->|"saves albums"| node_galleryservice
node_admingallery -->|"uploads images"| node_upload
node_admingallery -->|"links event"| node_eventservice
node_adminregs -->|"filters rosters"| node_regservice
node_admincontacts -->|"reviews inquiries"| node_contactservice
node_regservice -->|"validates event"| node_eventservice
node_regservice -->|"checks profile"| node_profileservice
node_eventservice -->|"reads or writes"| node_localstore
node_crewservice -->|"reads or writes"| node_localstore
node_localstore -->|"seeds defaults"| node_mockdata
node_eventservice -->|"checks configuration"| node_firebase
node_crewservice -->|"checks configuration"| node_firebase
node_regservice -->|"uses client"| node_firebase

click node_app "https://github.com/sampath-8985/mbuacm/blob/main/src/App.tsx"
click node_auth "https://github.com/sampath-8985/mbuacm/blob/main/src/context/AuthContext.tsx"
click node_login "https://github.com/sampath-8985/mbuacm/blob/main/src/pages/LoginPage.tsx"
click node_home "https://github.com/sampath-8985/mbuacm/blob/main/src/pages/HomePage.tsx"
click node_events "https://github.com/sampath-8985/mbuacm/blob/main/src/pages/EventsPage.tsx"
click node_eventdetail "https://github.com/sampath-8985/mbuacm/blob/main/src/pages/EventDetailsPage.tsx"
click node_crew "https://github.com/sampath-8985/mbuacm/blob/main/src/pages/CrewPage.tsx"
click node_gallery "https://github.com/sampath-8985/mbuacm/blob/main/src/pages/GalleryPage.tsx"
click node_contact "https://github.com/sampath-8985/mbuacm/blob/main/src/pages/ContactPage.tsx"
click node_profile "https://github.com/sampath-8985/mbuacm/blob/main/src/pages/CompleteProfilePage.tsx"
click node_dashboard "https://github.com/sampath-8985/mbuacm/blob/main/src/pages/user/UserDashboardPage.tsx"
click node_profileedit "https://github.com/sampath-8985/mbuacm/blob/main/src/pages/user/UserProfilePage.tsx"
click node_adminlayout "https://github.com/sampath-8985/mbuacm/blob/main/src/components/layout/AdminLayout.tsx"
click node_admindash "https://github.com/sampath-8985/mbuacm/blob/main/src/pages/admin/AdminDashboardPage.tsx"
click node_adminevents "https://github.com/sampath-8985/mbuacm/blob/main/src/pages/admin/AdminEventsPage.tsx"
click node_eventform "https://github.com/sampath-8985/mbuacm/blob/main/src/pages/admin/AdminEventFormPage.tsx"
click node_admincrew "https://github.com/sampath-8985/mbuacm/blob/main/src/pages/admin/AdminCrewPage.tsx"
click node_admingallery "https://github.com/sampath-8985/mbuacm/blob/main/src/pages/admin/AdminGalleryPage.tsx"
click node_adminregs "https://github.com/sampath-8985/mbuacm/blob/main/src/pages/admin/AdminRegistrationsPage.tsx"
click node_admincontacts "https://github.com/sampath-8985/mbuacm/blob/main/src/pages/admin/AdminContactSubmissionsPage.tsx"
click node_eventservice "https://github.com/sampath-8985/mbuacm/blob/main/src/services/events.ts"
click node_crewservice "https://github.com/sampath-8985/mbuacm/blob/main/src/services/crew.ts"
click node_regservice "https://github.com/sampath-8985/mbuacm/blob/main/src/services/registrations.ts"
click node_profileservice "https://github.com/sampath-8985/mbuacm/blob/main/src/services/profiles.ts"
click node_galleryservice "https://github.com/sampath-8985/mbuacm/blob/main/src/services/gallery.ts"
click node_contactservice "https://github.com/sampath-8985/mbuacm/blob/main/src/services/contact.ts"
click node_upload "https://github.com/sampath-8985/mbuacm/blob/main/src/services/storage.ts"
click node_localstore "https://github.com/sampath-8985/mbuacm/blob/main/src/services/store.ts"
click node_mockdata "https://github.com/sampath-8985/mbuacm/blob/main/src/lib/mockData.ts"
click node_firebase "https://github.com/sampath-8985/mbuacm/blob/main/src/lib/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_auth,node_login toneBlue
class node_home,node_events,node_eventdetail,node_crew,node_gallery,node_contact,node_firestore,node_cloudstorage toneAmber
class node_profile,node_dashboard,node_profileedit toneMint
class node_adminlayout,node_admindash,node_adminevents,node_eventform,node_admincrew,node_admingallery,node_adminregs,node_admincontacts toneRose
class node_eventservice,node_crewservice,node_regservice,node_profileservice,node_galleryservice,node_contactservice,node_upload,node_localstore,node_mockdata,node_firebase,node_visitor toneIndigo
```

## Components

### App and identity

- [Application router](https://github.com/sampath-8985/mbuacm/blob/main/src/App.tsx): `src/App.tsx`
- [Authentication context](https://github.com/sampath-8985/mbuacm/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Sign-in and signup](https://github.com/sampath-8985/mbuacm/blob/main/src/pages/LoginPage.tsx): `src/pages/LoginPage.tsx`

### Public chapter site

- [Chapter home](https://github.com/sampath-8985/mbuacm/blob/main/src/pages/HomePage.tsx): `src/pages/HomePage.tsx`
- [Event discovery](https://github.com/sampath-8985/mbuacm/blob/main/src/pages/EventsPage.tsx): `src/pages/EventsPage.tsx`
- [Event details](https://github.com/sampath-8985/mbuacm/blob/main/src/pages/EventDetailsPage.tsx): `src/pages/EventDetailsPage.tsx`
- [Crew roster](https://github.com/sampath-8985/mbuacm/blob/main/src/pages/CrewPage.tsx): `src/pages/CrewPage.tsx`
- [Event gallery](https://github.com/sampath-8985/mbuacm/blob/main/src/pages/GalleryPage.tsx): `src/pages/GalleryPage.tsx`
- [Contact inquiries](https://github.com/sampath-8985/mbuacm/blob/main/src/pages/ContactPage.tsx): `src/pages/ContactPage.tsx`

### Student hub

- [Profile onboarding](https://github.com/sampath-8985/mbuacm/blob/main/src/pages/CompleteProfilePage.tsx): `src/pages/CompleteProfilePage.tsx`
- [Student dashboard](https://github.com/sampath-8985/mbuacm/blob/main/src/pages/user/UserDashboardPage.tsx): `src/pages/user/UserDashboardPage.tsx`
- [Profile management](https://github.com/sampath-8985/mbuacm/blob/main/src/pages/user/UserProfilePage.tsx): `src/pages/user/UserProfilePage.tsx`

### Admin portal

- [Admin access gate](https://github.com/sampath-8985/mbuacm/blob/main/src/components/layout/AdminLayout.tsx): `src/components/layout/AdminLayout.tsx`
- [Admin overview](https://github.com/sampath-8985/mbuacm/blob/main/src/pages/admin/AdminDashboardPage.tsx): `src/pages/admin/AdminDashboardPage.tsx`
- [Event management](https://github.com/sampath-8985/mbuacm/blob/main/src/pages/admin/AdminEventsPage.tsx): `src/pages/admin/AdminEventsPage.tsx`
- [Event editor](https://github.com/sampath-8985/mbuacm/blob/main/src/pages/admin/AdminEventFormPage.tsx): `src/pages/admin/AdminEventFormPage.tsx`
- [Crew management](https://github.com/sampath-8985/mbuacm/blob/main/src/pages/admin/AdminCrewPage.tsx): `src/pages/admin/AdminCrewPage.tsx`
- [Gallery management](https://github.com/sampath-8985/mbuacm/blob/main/src/pages/admin/AdminGalleryPage.tsx): `src/pages/admin/AdminGalleryPage.tsx`
- [Roster management](https://github.com/sampath-8985/mbuacm/blob/main/src/pages/admin/AdminRegistrationsPage.tsx): `src/pages/admin/AdminRegistrationsPage.tsx`
- [Inquiry review](https://github.com/sampath-8985/mbuacm/blob/main/src/pages/admin/AdminContactSubmissionsPage.tsx): `src/pages/admin/AdminContactSubmissionsPage.tsx`

### Domain data and storage

- [Event service](https://github.com/sampath-8985/mbuacm/blob/main/src/services/events.ts): `src/services/events.ts`
- [Crew service](https://github.com/sampath-8985/mbuacm/blob/main/src/services/crew.ts): `src/services/crew.ts`
- [Registration service](https://github.com/sampath-8985/mbuacm/blob/main/src/services/registrations.ts): `src/services/registrations.ts`
- [Profile service](https://github.com/sampath-8985/mbuacm/blob/main/src/services/profiles.ts): `src/services/profiles.ts`
- [Gallery service](https://github.com/sampath-8985/mbuacm/blob/main/src/services/gallery.ts): `src/services/gallery.ts`
- [Contact service](https://github.com/sampath-8985/mbuacm/blob/main/src/services/contact.ts): `src/services/contact.ts`
- [Image upload](https://github.com/sampath-8985/mbuacm/blob/main/src/services/storage.ts): `src/services/storage.ts`
- [Demo local store](https://github.com/sampath-8985/mbuacm/blob/main/src/services/store.ts): `src/services/store.ts`
- [Demo seed data](https://github.com/sampath-8985/mbuacm/blob/main/src/lib/mockData.ts): `src/lib/mockData.ts`
- [Firebase clients](https://github.com/sampath-8985/mbuacm/blob/main/src/lib/firebase.ts): `src/lib/firebase.ts`

### Other components

- **Visitor or student**
- **Cloud Firestore**
- **Firebase Storage**

## Connections

- Visitor or student → Application router: opens site (evidence: `README.md`)
- Application router → Authentication context: provides identity (evidence: `src/App.tsx`)
- Application router → Chapter home: routes to (evidence: `src/App.tsx`)
- Application router → Event discovery: routes to (evidence: `src/App.tsx`)
- Application router → Event details: routes to (evidence: `src/App.tsx`)
- Application router → Crew roster: routes to (evidence: `src/App.tsx`)
- Application router → Event gallery: routes to (evidence: `src/App.tsx`)
- Application router → Contact inquiries: routes to (evidence: `src/App.tsx`)
- Application router → Sign-in and signup: routes to (evidence: `src/App.tsx`)
- Application router → Profile onboarding: routes to (evidence: `src/App.tsx`)
- Application router → Student dashboard: routes to (evidence: `src/App.tsx`)
- Application router → Profile management: routes to (evidence: `src/App.tsx`)
- Application router → Admin access gate: routes admin (evidence: `src/App.tsx`)
- Chapter home → Event service: loads events (evidence: `src/pages/HomePage.tsx`)
- Chapter home → Crew service: loads crew (evidence: `src/pages/HomePage.tsx`)
- Event discovery → Event service: loads events (evidence: `src/pages/EventsPage.tsx`)
- Event details → Event service: loads event (evidence: `src/pages/EventDetailsPage.tsx`)
- Event details → Registration service: registers attendee (evidence: `src/pages/EventDetailsPage.tsx`)
- Crew roster → Crew service: loads roster (evidence: `src/pages/CrewPage.tsx`)
- Event gallery → Gallery service: loads albums (evidence: `src/pages/GalleryPage.tsx`)
- Contact inquiries → Contact service: submits inquiry (evidence: `src/pages/ContactPage.tsx`)
- Authentication context → Profile service: reads profile (evidence: `src/context/AuthContext.tsx`)
- Profile onboarding → Profile service: saves profile (evidence: `src/pages/CompleteProfilePage.tsx`)
- Student dashboard → Registration service: loads registrations (evidence: `src/pages/user/UserDashboardPage.tsx`)
- Profile management → Profile service: updates profile (evidence: `src/pages/user/UserProfilePage.tsx`)
- Admin access gate → Authentication context: checks role (evidence: `src/components/layout/AdminLayout.tsx`)
- Admin overview → Event service: counts events (evidence: `src/pages/admin/AdminDashboardPage.tsx`)
- Admin overview → Crew service: counts crew (evidence: `src/pages/admin/AdminDashboardPage.tsx`)
- Admin overview → Registration service: loads activity (evidence: `src/pages/admin/AdminDashboardPage.tsx`)
- Admin overview → Contact service: counts inquiries (evidence: `src/pages/admin/AdminDashboardPage.tsx`)
- Event management → Event service: manages events (evidence: `src/pages/admin/AdminEventsPage.tsx`)
- Event editor → Event service: saves event (evidence: `src/pages/admin/AdminEventFormPage.tsx`)
- Event editor → Image upload: uploads poster (evidence: `src/pages/admin/AdminEventFormPage.tsx`)
- Crew management → Crew service: manages crew (evidence: `src/pages/admin/AdminCrewPage.tsx`)
- Crew management → Image upload: uploads photos (evidence: `src/pages/admin/AdminCrewPage.tsx`)
- Gallery management → Gallery service: saves albums (evidence: `src/pages/admin/AdminGalleryPage.tsx`)
- Gallery management → Image upload: uploads images (evidence: `src/pages/admin/AdminGalleryPage.tsx`)
- Gallery management → Event service: links event (evidence: `src/pages/admin/AdminGalleryPage.tsx`)
- Roster management → Registration service: filters rosters
- Inquiry review → Contact service: reviews inquiries (evidence: `README.md`)
- Registration service → Event service: validates event (evidence: `src/services/registrations.ts`)
- Registration service → Profile service: checks profile (evidence: `src/services/registrations.ts`)
- Event service → Demo local store: reads or writes (evidence: `src/services/events.ts`)
- Crew service → Demo local store: reads or writes (evidence: `src/services/crew.ts`)
- Demo local store → Demo seed data: seeds defaults (evidence: `src/services/store.ts`)
- Event service → Firebase clients: checks configuration (evidence: `src/services/events.ts`)
- Crew service → Firebase clients: checks configuration (evidence: `src/services/crew.ts`)
- Registration service → Firebase clients: uses client (evidence: `src/services/registrations.ts`)
