# seeramgiridhar/cem architecture

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

- Interactive diagram: https://gitdiagram.com/seeramgiridhar/cem
- Repository: https://github.com/seeramgiridhar/cem

## Overview

CampusEvents is a college event-management application for students, organizers, and administrators. Users discover and filter events, register, receive tickets, and access attendance certificates; organizers create events for approval and manage attendance, while administrators oversee users, venues, categories, and analytics. The React client routes role-protected pages through a shared API client and authentication context to an Express API, whose controllers implement domain operations against Supabase. README capabilities include feedback, notifications, poster uploads, and venue-clash prevention; some detailed wiring is not shown in the excerpts.

Main entry points: [`client/src/App.jsx`](https://github.com/seeramgiridhar/cem/blob/main/client/src/App.jsx) (Route shell), [`client/src/services/api.js`](https://github.com/seeramgiridhar/cem/blob/main/client/src/services/api.js) (API client), [`server/index.js`](https://github.com/seeramgiridhar/cem/blob/main/server/index.js) (Express API), [`server/middleware/auth.js`](https://github.com/seeramgiridhar/cem/blob/main/server/middleware/auth.js) (JWT authorization)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Route shell<br/>[App.jsx]"]
  node_authui["Auth state<br/>[AuthContext.jsx]"]
  node_apiclient["API client<br/>[api.js]"]
  node_eventbrowse["Event discovery<br/>[Events.jsx]"]
  node_eventdetail["Event details<br/>[EventDetail.jsx]"]
  node_eventcard["Event card<br/>[EventCard.jsx]"]
  node_organizerdash["Organizer dashboard<br/>[Dashboard.jsx]"]
  node_eventeditor["Event editor<br/>[CreateEvent.jsx]"]
  node_adminui["Admin dashboard<br/>[AdminDashboard.jsx]"]
  node_registrationsui["My registrations"]
  node_ticketui["Ticket view<br/>[Ticket.jsx]"]
  node_notificationsui["Notifications view<br/>[Notifications.jsx]"]
  node_authpages["Sign-in and signup<br/>[Register.jsx]"]
end

subgraph group_events["Event operations"]
  node_eventapi["Event operations"]
  node_adminapi["Administration<br/>[adminController.js]"]
end

subgraph group_identity["Identity and access"]
  node_authapi["Authentication<br/>[authController.js]"]
  node_authmiddleware["JWT authorization<br/>[auth.js]"]
end

subgraph group_participation["Participation services"]
  node_registrationapi["Registration services"]
  node_notificationapi["Notification services"]
end

subgraph group_platform["API and data"]
  node_apiroot["Express API<br/>[index.js]"]
  node_eventroutes["Event routes<br/>[events.js]"]
  node_authroutes["Auth routes<br/>[auth.js]"]
  node_registrationroutes["Registration routes<br/>[registrations.js]"]
  node_adminroutes["Admin routes<br/>[admin.js]"]
  node_notificationroutes["Notification routes<br/>[notifications.js]"]
  node_database[("Supabase database<br/>[supabase.js]")]
  node_cloudinary["Cloudinary<br/>[cloudinary.js]"]
  node_email["Email service<br/>[email.js]"]
end

node_student(("Student"))
node_organizer(("Organizer"))
node_administrator(("Administrator"))

node_app -->|"routes to"| node_eventbrowse
node_app -->|"routes to"| node_eventdetail
node_app -->|"routes to"| node_organizerdash
node_app -->|"routes to"| node_eventeditor
node_app -->|"routes to"| node_adminui
node_app -->|"routes to"| node_registrationsui
node_app -->|"routes to"| node_ticketui
node_app -->|"routes to"| node_notificationsui
node_app -->|"routes to"| node_authpages
node_eventbrowse -->|"renders"| node_eventcard
node_organizerdash -->|"renders"| node_eventcard
node_authpages -->|"uses"| node_authui
node_authui -->|"calls"| node_apiclient
node_eventbrowse -->|"requests data"| node_apiclient
node_eventdetail -->|"requests data"| node_apiclient
node_organizerdash -->|"requests data"| node_apiclient
node_eventeditor -->|"submits changes"| node_apiclient
node_adminui -->|"requests data"| node_apiclient
node_registrationsui -->|"requests data"| node_apiclient
node_notificationsui -->|"requests data"| node_apiclient
node_student -.->|"discovers events"| node_eventbrowse
node_student -.->|"views details"| node_eventdetail
node_organizer -.->|"manages events"| node_eventeditor
node_administrator -.->|"oversees system"| node_adminui
node_apiclient -.->|"sends API requests"| node_apiroot
node_apiroot -->|"mounts"| node_eventroutes
node_apiroot -->|"mounts"| node_authroutes
node_apiroot -->|"mounts"| node_registrationroutes
node_apiroot -->|"mounts"| node_adminroutes
node_apiroot -->|"mounts"| node_notificationroutes
node_eventroutes -->|"dispatches"| node_eventapi
node_authroutes -->|"dispatches"| node_authapi
node_registrationroutes -->|"dispatches"| node_registrationapi
node_adminroutes -->|"dispatches"| node_adminapi
node_notificationroutes -->|"dispatches"| node_notificationapi
node_eventroutes -->|"protects routes"| node_authmiddleware
node_authroutes -->|"protects routes"| node_authmiddleware
node_registrationroutes -->|"protects routes"| node_authmiddleware
node_adminroutes -->|"protects routes"| node_authmiddleware
node_notificationroutes -->|"protects routes"| node_authmiddleware
node_authmiddleware -->|"loads user"| node_database
node_authapi -->|"reads and writes"| node_database
node_eventapi -->|"reads and writes"| node_database
node_adminapi -->|"reads and writes"| node_database
node_registrationapi -->|"reads and writes"| node_database
node_notificationapi -->|"reads and writes"| node_database
node_eventapi -->|"uploads posters"| node_cloudinary
node_authapi -->|"sends reset email"| node_email

click node_app "https://github.com/seeramgiridhar/cem/blob/main/client/src/App.jsx"
click node_authui "https://github.com/seeramgiridhar/cem/blob/main/client/src/context/AuthContext.jsx"
click node_apiclient "https://github.com/seeramgiridhar/cem/blob/main/client/src/services/api.js"
click node_eventbrowse "https://github.com/seeramgiridhar/cem/blob/main/client/src/pages/Events.jsx"
click node_eventdetail "https://github.com/seeramgiridhar/cem/blob/main/client/src/pages/EventDetail.jsx"
click node_eventcard "https://github.com/seeramgiridhar/cem/blob/main/client/src/components/EventCard.jsx"
click node_organizerdash "https://github.com/seeramgiridhar/cem/blob/main/client/src/pages/Dashboard.jsx"
click node_eventeditor "https://github.com/seeramgiridhar/cem/blob/main/client/src/pages/CreateEvent.jsx"
click node_adminui "https://github.com/seeramgiridhar/cem/blob/main/client/src/pages/AdminDashboard.jsx"
click node_registrationsui "https://github.com/seeramgiridhar/cem/blob/main/client/src/pages/MyRegistrations.jsx"
click node_ticketui "https://github.com/seeramgiridhar/cem/blob/main/client/src/pages/Ticket.jsx"
click node_notificationsui "https://github.com/seeramgiridhar/cem/blob/main/client/src/pages/Notifications.jsx"
click node_authpages "https://github.com/seeramgiridhar/cem/blob/main/client/src/pages/Register.jsx"
click node_eventapi "https://github.com/seeramgiridhar/cem/blob/main/server/controllers/eventsController.js"
click node_adminapi "https://github.com/seeramgiridhar/cem/blob/main/server/controllers/adminController.js"
click node_authapi "https://github.com/seeramgiridhar/cem/blob/main/server/controllers/authController.js"
click node_authmiddleware "https://github.com/seeramgiridhar/cem/blob/main/server/middleware/auth.js"
click node_registrationapi "https://github.com/seeramgiridhar/cem/blob/main/server/controllers/registrationsController.js"
click node_notificationapi "https://github.com/seeramgiridhar/cem/blob/main/server/controllers/notificationsController.js"
click node_apiroot "https://github.com/seeramgiridhar/cem/blob/main/server/index.js"
click node_eventroutes "https://github.com/seeramgiridhar/cem/blob/main/server/routes/events.js"
click node_authroutes "https://github.com/seeramgiridhar/cem/blob/main/server/routes/auth.js"
click node_registrationroutes "https://github.com/seeramgiridhar/cem/blob/main/server/routes/registrations.js"
click node_adminroutes "https://github.com/seeramgiridhar/cem/blob/main/server/routes/admin.js"
click node_notificationroutes "https://github.com/seeramgiridhar/cem/blob/main/server/routes/notifications.js"
click node_database "https://github.com/seeramgiridhar/cem/blob/main/server/config/supabase.js"
click node_cloudinary "https://github.com/seeramgiridhar/cem/blob/main/server/config/cloudinary.js"
click node_email "https://github.com/seeramgiridhar/cem/blob/main/server/config/email.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_app,node_authui,node_apiclient,node_eventbrowse,node_eventdetail,node_eventcard,node_organizerdash,node_eventeditor,node_adminui,node_registrationsui,node_ticketui,node_notificationsui,node_authpages toneBlue
class node_eventapi,node_adminapi toneAmber
class node_authapi,node_authmiddleware toneMint
class node_registrationapi,node_notificationapi toneRose
class node_apiroot,node_eventroutes,node_authroutes,node_registrationroutes,node_adminroutes,node_notificationroutes,node_database,node_cloudinary,node_email,node_student,node_organizer,node_administrator toneIndigo
```

## Components

### Web client

- [Route shell](https://github.com/seeramgiridhar/cem/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Auth state](https://github.com/seeramgiridhar/cem/blob/main/client/src/context/AuthContext.jsx): `client/src/context/AuthContext.jsx`
- [API client](https://github.com/seeramgiridhar/cem/blob/main/client/src/services/api.js): `client/src/services/api.js`
- [Event discovery](https://github.com/seeramgiridhar/cem/blob/main/client/src/pages/Events.jsx): `client/src/pages/Events.jsx`
- [Event details](https://github.com/seeramgiridhar/cem/blob/main/client/src/pages/EventDetail.jsx): `client/src/pages/EventDetail.jsx`
- [Event card](https://github.com/seeramgiridhar/cem/blob/main/client/src/components/EventCard.jsx): `client/src/components/EventCard.jsx`
- [Organizer dashboard](https://github.com/seeramgiridhar/cem/blob/main/client/src/pages/Dashboard.jsx): `client/src/pages/Dashboard.jsx`
- [Event editor](https://github.com/seeramgiridhar/cem/blob/main/client/src/pages/CreateEvent.jsx): `client/src/pages/CreateEvent.jsx`
- [Admin dashboard](https://github.com/seeramgiridhar/cem/blob/main/client/src/pages/AdminDashboard.jsx): `client/src/pages/AdminDashboard.jsx`
- [My registrations](https://github.com/seeramgiridhar/cem/blob/main/client/src/pages/MyRegistrations.jsx): `client/src/pages/MyRegistrations.jsx`
- [Ticket view](https://github.com/seeramgiridhar/cem/blob/main/client/src/pages/Ticket.jsx): `client/src/pages/Ticket.jsx`
- [Notifications view](https://github.com/seeramgiridhar/cem/blob/main/client/src/pages/Notifications.jsx): `client/src/pages/Notifications.jsx`
- [Sign-in and signup](https://github.com/seeramgiridhar/cem/blob/main/client/src/pages/Register.jsx): `client/src/pages/Register.jsx`

### Event operations

- [Event operations](https://github.com/seeramgiridhar/cem/blob/main/server/controllers/eventsController.js): `server/controllers/eventsController.js`
- [Administration](https://github.com/seeramgiridhar/cem/blob/main/server/controllers/adminController.js): `server/controllers/adminController.js`

### Identity and access

- [Authentication](https://github.com/seeramgiridhar/cem/blob/main/server/controllers/authController.js): `server/controllers/authController.js`
- [JWT authorization](https://github.com/seeramgiridhar/cem/blob/main/server/middleware/auth.js): `server/middleware/auth.js`

### Participation services

- [Registration services](https://github.com/seeramgiridhar/cem/blob/main/server/controllers/registrationsController.js): `server/controllers/registrationsController.js`
- [Notification services](https://github.com/seeramgiridhar/cem/blob/main/server/controllers/notificationsController.js): `server/controllers/notificationsController.js`

### API and data

- [Express API](https://github.com/seeramgiridhar/cem/blob/main/server/index.js): `server/index.js`
- [Event routes](https://github.com/seeramgiridhar/cem/blob/main/server/routes/events.js): `server/routes/events.js`
- [Auth routes](https://github.com/seeramgiridhar/cem/blob/main/server/routes/auth.js): `server/routes/auth.js`
- [Registration routes](https://github.com/seeramgiridhar/cem/blob/main/server/routes/registrations.js): `server/routes/registrations.js`
- [Admin routes](https://github.com/seeramgiridhar/cem/blob/main/server/routes/admin.js): `server/routes/admin.js`
- [Notification routes](https://github.com/seeramgiridhar/cem/blob/main/server/routes/notifications.js): `server/routes/notifications.js`
- [Supabase database](https://github.com/seeramgiridhar/cem/blob/main/server/config/supabase.js): `server/config/supabase.js`
- [Cloudinary](https://github.com/seeramgiridhar/cem/blob/main/server/config/cloudinary.js): `server/config/cloudinary.js`
- [Email service](https://github.com/seeramgiridhar/cem/blob/main/server/config/email.js): `server/config/email.js`

### Other components

- **Student**
- **Organizer**
- **Administrator**

## Connections

- Route shell → Event discovery: routes to (evidence: `client/src/App.jsx`)
- Route shell → Event details: routes to (evidence: `client/src/App.jsx`)
- Route shell → Organizer dashboard: routes to (evidence: `client/src/App.jsx`)
- Route shell → Event editor: routes to (evidence: `client/src/App.jsx`)
- Route shell → Admin dashboard: routes to (evidence: `client/src/App.jsx`)
- Route shell → My registrations: routes to (evidence: `client/src/App.jsx`)
- Route shell → Ticket view: routes to (evidence: `client/src/App.jsx`)
- Route shell → Notifications view: routes to (evidence: `client/src/App.jsx`)
- Route shell → Sign-in and signup: routes to (evidence: `client/src/App.jsx`)
- Event discovery → Event card: renders (evidence: `client/src/pages/Events.jsx`)
- Organizer dashboard → Event card: renders (evidence: `client/src/pages/Dashboard.jsx`)
- Sign-in and signup → Auth state: uses (evidence: `client/src/pages/Register.jsx`)
- Auth state → API client: calls (evidence: `client/src/context/AuthContext.jsx`)
- Event discovery → API client: requests data (evidence: `client/src/pages/Events.jsx`)
- Event details → API client: requests data (evidence: `client/src/pages/EventDetail.jsx`)
- Organizer dashboard → API client: requests data (evidence: `client/src/pages/Dashboard.jsx`)
- Event editor → API client: submits changes (evidence: `client/src/pages/CreateEvent.jsx`)
- Admin dashboard → API client: requests data (evidence: `client/src/pages/AdminDashboard.jsx`)
- My registrations → API client: requests data (evidence: `client/src/pages/MyRegistrations.jsx`)
- Notifications view → API client: requests data (evidence: `client/src/pages/Notifications.jsx`)
- Student → Event discovery: discovers events (evidence: `README.md`)
- Student → Event details: views details (evidence: `README.md`)
- Organizer → Event editor: manages events (evidence: `README.md`)
- Administrator → Admin dashboard: oversees system (evidence: `README.md`)
- API client → Express API: sends API requests
- Express API → Event routes: mounts (evidence: `server/index.js`)
- Express API → Auth routes: mounts (evidence: `server/index.js`)
- Express API → Registration routes: mounts (evidence: `server/index.js`)
- Express API → Admin routes: mounts (evidence: `server/index.js`)
- Express API → Notification routes: mounts (evidence: `server/index.js`)
- Event routes → Event operations: dispatches (evidence: `server/routes/events.js`)
- Auth routes → Authentication: dispatches (evidence: `server/routes/auth.js`)
- Registration routes → Registration services: dispatches (evidence: `server/routes/registrations.js`)
- Admin routes → Administration: dispatches (evidence: `server/routes/admin.js`)
- Notification routes → Notification services: dispatches (evidence: `server/routes/notifications.js`)
- Event routes → JWT authorization: protects routes (evidence: `server/routes/events.js`)
- Auth routes → JWT authorization: protects routes (evidence: `server/routes/auth.js`)
- Registration routes → JWT authorization: protects routes (evidence: `server/routes/registrations.js`)
- Admin routes → JWT authorization: protects routes (evidence: `server/routes/admin.js`)
- Notification routes → JWT authorization: protects routes (evidence: `server/routes/notifications.js`)
- JWT authorization → Supabase database: loads user (evidence: `server/middleware/auth.js`)
- Authentication → Supabase database: reads and writes (evidence: `server/controllers/authController.js`)
- Event operations → Supabase database: reads and writes (evidence: `server/controllers/eventsController.js`)
- Administration → Supabase database: reads and writes (evidence: `server/controllers/adminController.js`)
- Registration services → Supabase database: reads and writes (evidence: `server/controllers/registrationsController.js`)
- Notification services → Supabase database: reads and writes (evidence: `server/controllers/notificationsController.js`)
- Event operations → Cloudinary: uploads posters (evidence: `server/controllers/eventsController.js`)
- Authentication → Email service: sends reset email (evidence: `server/controllers/authController.js`)
