# aakarsh15/college-event-management-system architecture

> Architecture diagram of the GitHub repository aakarsh15/college-event-management-system, 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/aakarsh15/college-event-management-system
- Repository: https://github.com/aakarsh15/college-event-management-system

## Overview

CEMS is a role-based college event management web application. Users enter through the Express app to browse approved events, create events, register as participants, and access role-specific management; administrators approve events and assign faculty, while faculty can notify participants. Registration also includes email OTP verification, and a contact form sends email. The sampled code shows several routes and controller behaviors, but app.js is only partially excerpted, so some feature relationships are represented from README documentation rather than verified implementation details.

Main entry points: [`app.js`](https://github.com/aakarsh15/college-event-management-system/blob/master/app.js) (Express application), [`Controllers/otpController.js`](https://github.com/aakarsh15/college-event-management-system/blob/master/Controllers/otpController.js) (OTP verification), [`Controllers/adminControllers.js`](https://github.com/aakarsh15/college-event-management-system/blob/master/Controllers/adminControllers.js) (Approval and assignment), [`views`](https://github.com/aakarsh15/college-event-management-system/tree/master/views) (Role dashboards)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry and interface"]
  node_app["Express application<br/>[app.js]"]
  node_site["Event and account pages"]
  node_views["Role dashboards"]
end

subgraph group_events["Event operations"]
  node_admin_routes["Admin routes<br/>[admin.js]"]
  node_admin["Approval and assignment"]
  node_event_ops["Event and registration handling<br/>[app.js]"]
end

subgraph group_identity["Identity and messaging"]
  node_auth_routes["Signup route<br/>[auth.js]"]
  node_auth["Signup page handler<br/>[authController.js]"]
  node_otp_routes["OTP routes<br/>[otp.js]"]
  node_otp["OTP verification<br/>[otpController.js]"]
  node_email_routes["Contact email route<br/>[emailRoutes.js]"]
  node_email["Contact email handler<br/>[emailController.js]"]
  node_mailer["Gmail transport<br/>[mailer.js]"]
end

subgraph group_data["Persistence"]
  node_database[("MySQL event and user data<br/>[db.js]")]
end

node_users(("Students, faculty, organizers, admins"))

node_users -->|"uses"| node_app
node_app -->|"serves pages"| node_site
node_app -->|"renders views"| node_views
node_app -->|"mounts routes"| node_admin_routes
node_admin_routes -->|"dispatches to"| node_admin
node_admin -->|"queries"| node_database
node_admin -->|"renders admin"| node_views
node_app -->|"handles requests"| node_event_ops
node_event_ops -->|"reads and writes"| node_database
node_app -->|"mounts routes"| node_auth_routes
node_auth_routes -->|"dispatches to"| node_auth
node_app -->|"mounts routes"| node_otp_routes
node_otp_routes -->|"dispatches to"| node_otp
node_otp -->|"checks email"| node_database
node_otp -->|"sends OTP"| node_mailer
node_otp -->|"renders verification"| node_views
node_app -->|"mounts routes"| node_email_routes
node_email_routes -->|"dispatches to"| node_email
node_email -->|"sends contact mail"| node_mailer

click node_app "https://github.com/aakarsh15/college-event-management-system/blob/master/app.js"
click node_site "https://github.com/aakarsh15/college-event-management-system/tree/master/templates"
click node_views "https://github.com/aakarsh15/college-event-management-system/tree/master/views"
click node_admin_routes "https://github.com/aakarsh15/college-event-management-system/blob/master/routes/admin.js"
click node_admin "https://github.com/aakarsh15/college-event-management-system/blob/master/Controllers/adminControllers.js"
click node_event_ops "https://github.com/aakarsh15/college-event-management-system/blob/master/app.js"
click node_auth_routes "https://github.com/aakarsh15/college-event-management-system/blob/master/routes/auth.js"
click node_auth "https://github.com/aakarsh15/college-event-management-system/blob/master/Controllers/authController.js"
click node_otp_routes "https://github.com/aakarsh15/college-event-management-system/blob/master/routes/otp.js"
click node_otp "https://github.com/aakarsh15/college-event-management-system/blob/master/Controllers/otpController.js"
click node_email_routes "https://github.com/aakarsh15/college-event-management-system/blob/master/routes/emailRoutes.js"
click node_email "https://github.com/aakarsh15/college-event-management-system/blob/master/Controllers/emailController.js"
click node_mailer "https://github.com/aakarsh15/college-event-management-system/blob/master/config/mailer.js"
click node_database "https://github.com/aakarsh15/college-event-management-system/blob/master/db.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_site,node_views toneBlue
class node_admin_routes,node_admin,node_event_ops toneAmber
class node_auth_routes,node_auth,node_otp_routes,node_otp,node_email_routes,node_email,node_mailer toneMint
class node_database toneRose
class node_users toneIndigo
```

## Components

### Web entry and interface

- [Express application](https://github.com/aakarsh15/college-event-management-system/blob/master/app.js): `app.js`
- [Event and account pages](https://github.com/aakarsh15/college-event-management-system/tree/master/templates): `templates`
- [Role dashboards](https://github.com/aakarsh15/college-event-management-system/tree/master/views): `views`

### Event operations

- [Admin routes](https://github.com/aakarsh15/college-event-management-system/blob/master/routes/admin.js): `routes/admin.js`
- [Approval and assignment](https://github.com/aakarsh15/college-event-management-system/blob/master/Controllers/adminControllers.js): `Controllers/adminControllers.js`
- [Event and registration handling](https://github.com/aakarsh15/college-event-management-system/blob/master/app.js): `app.js`

### Identity and messaging

- [Signup route](https://github.com/aakarsh15/college-event-management-system/blob/master/routes/auth.js): `routes/auth.js`
- [Signup page handler](https://github.com/aakarsh15/college-event-management-system/blob/master/Controllers/authController.js): `Controllers/authController.js`
- [OTP routes](https://github.com/aakarsh15/college-event-management-system/blob/master/routes/otp.js): `routes/otp.js`
- [OTP verification](https://github.com/aakarsh15/college-event-management-system/blob/master/Controllers/otpController.js): `Controllers/otpController.js`
- [Contact email route](https://github.com/aakarsh15/college-event-management-system/blob/master/routes/emailRoutes.js): `routes/emailRoutes.js`
- [Contact email handler](https://github.com/aakarsh15/college-event-management-system/blob/master/Controllers/emailController.js): `Controllers/emailController.js`
- [Gmail transport](https://github.com/aakarsh15/college-event-management-system/blob/master/config/mailer.js): `config/mailer.js`

### Persistence

- [MySQL event and user data](https://github.com/aakarsh15/college-event-management-system/blob/master/db.js): `db.js`

### Other components

- **Students, faculty, organizers, admins**

## Connections

- Students, faculty, organizers, admins → Express application: uses (evidence: `README.md`)
- Express application → Event and account pages: serves pages (evidence: `app.js`)
- Express application → Role dashboards: renders views (evidence: `app.js`)
- Express application → Admin routes: mounts routes (evidence: `app.js`)
- Admin routes → Approval and assignment: dispatches to (evidence: `routes/admin.js`)
- Approval and assignment → MySQL event and user data: queries (evidence: `Controllers/adminControllers.js`)
- Approval and assignment → Role dashboards: renders admin (evidence: `Controllers/adminControllers.js`)
- Express application → Event and registration handling: handles requests (evidence: `app.js`)
- Event and registration handling → MySQL event and user data: reads and writes (evidence: `app.js`)
- Express application → Signup route: mounts routes (evidence: `app.js`)
- Signup route → Signup page handler: dispatches to (evidence: `routes/auth.js`)
- Express application → OTP routes: mounts routes (evidence: `app.js`)
- OTP routes → OTP verification: dispatches to (evidence: `routes/otp.js`)
- OTP verification → MySQL event and user data: checks email (evidence: `Controllers/otpController.js`)
- OTP verification → Gmail transport: sends OTP (evidence: `Controllers/otpController.js`)
- OTP verification → Role dashboards: renders verification (evidence: `Controllers/otpController.js`)
- Express application → Contact email route: mounts routes (evidence: `app.js`)
- Contact email route → Contact email handler: dispatches to (evidence: `routes/emailRoutes.js`)
- Contact email handler → Gmail transport: sends contact mail (evidence: `Controllers/emailController.js`)
