# atmikanayak/inspirante-atmika architecture

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

- Interactive diagram: https://gitdiagram.com/atmikanayak/inspirante-atmika
- Repository: https://github.com/atmikanayak/inspirante-atmika

## Overview

College Event Registration Portal serves two workflows: administrators authenticate, create events, inspect capacity and attendee lists; students authenticate, browse events, register subject to capacity and duplicate checks, and review their registrations. Browser scripts call an Express API, whose route modules apply authentication and admin authorization before controllers query MySQL. The README documents the main capabilities and endpoints; the edges from unsampled login and admin screens rely on that documentation, while source-level wiring is shown where excerpts are available.

Main entry points: [`server/routes/eventRoutes.js`](https://github.com/atmikanayak/inspirante-atmika/blob/main/server/routes/eventRoutes.js) (Event routes), [`server/routes/authRoutes.js`](https://github.com/atmikanayak/inspirante-atmika/blob/main/server/routes/authRoutes.js) (Auth routes), [`server/routes/registrationRoutes.js`](https://github.com/atmikanayak/inspirante-atmika/blob/main/server/routes/registrationRoutes.js) (Registration routes), [`server/config/db.js`](https://github.com/atmikanayak/inspirante-atmika/blob/main/server/config/db.js) (MySQL connection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Browser experience"]
  node_student["Student dashboard<br/>[student.js]"]
  node_admin["Admin dashboard<br/>[admin.js]"]
  node_login["Login page<br/>[login.js]"]
  node_studentpage["Student page<br/>[student.html]"]
  node_adminpage["Admin page<br/>[admin.html]"]
  node_loginpage["Login page HTML<br/>[index.html]"]
end

subgraph group_api["API and access"]
  node_apiapp["Express app<br/>[server.js]"]
  node_authroutes["Auth routes<br/>[authRoutes.js]"]
  node_eventroutes["Event routes<br/>[eventRoutes.js]"]
  node_regroutes["Registration routes"]
  node_authmw["Token verification<br/>[authMiddleware.js]"]
  node_adminmw["Admin authorization<br/>[adminMiddleware.js]"]
end

subgraph group_domain["Event workflows"]
  node_auth["Login and profile<br/>[authController.js]"]
  node_events["Event management<br/>[eventController.js]"]
  node_registrations["Event registration"]
end

subgraph group_persistence["Persistence"]
  node_dbconn["MySQL connection<br/>[db.js]"]
  node_mysqldb[("College events database<br/>[schema.sql]")]
end

node_studentactor(("Student"))
node_adminactor(("Administrator"))
node_mysql[("MySQL or MariaDB")]

node_studentactor -->|"uses"| node_studentpage
node_adminactor -->|"uses"| node_adminpage
node_studentpage -.->|"loads"| node_student
node_adminpage -.->|"loads"| node_admin
node_loginpage -.->|"loads"| node_login
node_student -->|"requests registrations"| node_regroutes
node_student -->|"requests events"| node_eventroutes
node_login -->|"authenticates"| node_authroutes
node_admin -->|"manages events"| node_eventroutes
node_apiapp -->|"mounts"| node_authroutes
node_apiapp -->|"mounts"| node_eventroutes
node_apiapp -->|"mounts"| node_regroutes
node_authroutes -->|"dispatches"| node_auth
node_authroutes -->|"verifies profile"| node_authmw
node_eventroutes -->|"dispatches"| node_events
node_eventroutes -->|"verifies token"| node_authmw
node_eventroutes -->|"checks admin"| node_adminmw
node_regroutes -->|"dispatches"| node_registrations
node_regroutes -->|"verifies token"| node_authmw
node_auth -->|"queries users"| node_dbconn
node_events -->|"queries events"| node_dbconn
node_registrations -->|"queries registrations"| node_dbconn
node_dbconn -->|"connects"| node_mysql
node_mysqldb -->|"defines schema"| node_mysql

click node_student "https://github.com/atmikanayak/inspirante-atmika/blob/main/client/js/student.js"
click node_admin "https://github.com/atmikanayak/inspirante-atmika/blob/main/client/js/admin.js"
click node_login "https://github.com/atmikanayak/inspirante-atmika/blob/main/client/js/login.js"
click node_studentpage "https://github.com/atmikanayak/inspirante-atmika/blob/main/client/student.html"
click node_adminpage "https://github.com/atmikanayak/inspirante-atmika/blob/main/client/admin.html"
click node_loginpage "https://github.com/atmikanayak/inspirante-atmika/blob/main/client/index.html"
click node_apiapp "https://github.com/atmikanayak/inspirante-atmika/blob/main/server/server.js"
click node_authroutes "https://github.com/atmikanayak/inspirante-atmika/blob/main/server/routes/authRoutes.js"
click node_eventroutes "https://github.com/atmikanayak/inspirante-atmika/blob/main/server/routes/eventRoutes.js"
click node_regroutes "https://github.com/atmikanayak/inspirante-atmika/blob/main/server/routes/registrationRoutes.js"
click node_authmw "https://github.com/atmikanayak/inspirante-atmika/blob/main/server/middleware/authMiddleware.js"
click node_adminmw "https://github.com/atmikanayak/inspirante-atmika/blob/main/server/middleware/adminMiddleware.js"
click node_auth "https://github.com/atmikanayak/inspirante-atmika/blob/main/server/controllers/authController.js"
click node_events "https://github.com/atmikanayak/inspirante-atmika/blob/main/server/controllers/eventController.js"
click node_registrations "https://github.com/atmikanayak/inspirante-atmika/blob/main/server/controllers/registrationController.js"
click node_dbconn "https://github.com/atmikanayak/inspirante-atmika/blob/main/server/config/db.js"
click node_mysqldb "https://github.com/atmikanayak/inspirante-atmika/blob/main/server/migrations/schema.sql"

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_student,node_admin,node_login,node_studentpage,node_adminpage,node_loginpage toneBlue
class node_apiapp,node_authroutes,node_eventroutes,node_regroutes,node_authmw,node_adminmw,node_mysql toneAmber
class node_auth,node_events,node_registrations toneMint
class node_dbconn,node_mysqldb toneRose
class node_studentactor,node_adminactor toneIndigo
```

## Components

### Browser experience

- [Student dashboard](https://github.com/atmikanayak/inspirante-atmika/blob/main/client/js/student.js): `client/js/student.js`
- [Admin dashboard](https://github.com/atmikanayak/inspirante-atmika/blob/main/client/js/admin.js): `client/js/admin.js`
- [Login page](https://github.com/atmikanayak/inspirante-atmika/blob/main/client/js/login.js): `client/js/login.js`
- [Student page](https://github.com/atmikanayak/inspirante-atmika/blob/main/client/student.html): `client/student.html`
- [Admin page](https://github.com/atmikanayak/inspirante-atmika/blob/main/client/admin.html): `client/admin.html`
- [Login page HTML](https://github.com/atmikanayak/inspirante-atmika/blob/main/client/index.html): `client/index.html`

### API and access

- [Express app](https://github.com/atmikanayak/inspirante-atmika/blob/main/server/server.js): `server/server.js`
- [Auth routes](https://github.com/atmikanayak/inspirante-atmika/blob/main/server/routes/authRoutes.js): `server/routes/authRoutes.js`
- [Event routes](https://github.com/atmikanayak/inspirante-atmika/blob/main/server/routes/eventRoutes.js): `server/routes/eventRoutes.js`
- [Registration routes](https://github.com/atmikanayak/inspirante-atmika/blob/main/server/routes/registrationRoutes.js): `server/routes/registrationRoutes.js`
- [Token verification](https://github.com/atmikanayak/inspirante-atmika/blob/main/server/middleware/authMiddleware.js): `server/middleware/authMiddleware.js`
- [Admin authorization](https://github.com/atmikanayak/inspirante-atmika/blob/main/server/middleware/adminMiddleware.js): `server/middleware/adminMiddleware.js`

### Event workflows

- [Login and profile](https://github.com/atmikanayak/inspirante-atmika/blob/main/server/controllers/authController.js): `server/controllers/authController.js`
- [Event management](https://github.com/atmikanayak/inspirante-atmika/blob/main/server/controllers/eventController.js): `server/controllers/eventController.js`
- [Event registration](https://github.com/atmikanayak/inspirante-atmika/blob/main/server/controllers/registrationController.js): `server/controllers/registrationController.js`

### Persistence

- [MySQL connection](https://github.com/atmikanayak/inspirante-atmika/blob/main/server/config/db.js): `server/config/db.js`
- [College events database](https://github.com/atmikanayak/inspirante-atmika/blob/main/server/migrations/schema.sql): `server/migrations/schema.sql`

### Other components

- **Student**
- **Administrator**
- **MySQL or MariaDB**

## Connections

- Student → Student page: uses (evidence: `README.md`)
- Administrator → Admin page: uses (evidence: `README.md`)
- Student page → Student dashboard: loads
- Admin page → Admin dashboard: loads
- Login page HTML → Login page: loads
- Student dashboard → Registration routes: requests registrations (evidence: `client/js/student.js`)
- Student dashboard → Event routes: requests events (evidence: `client/js/student.js`)
- Login page → Auth routes: authenticates (evidence: `README.md`)
- Admin dashboard → Event routes: manages events (evidence: `README.md`)
- Express app → Auth routes: mounts (evidence: `server/server.js`)
- Express app → Event routes: mounts (evidence: `server/server.js`)
- Express app → Registration routes: mounts (evidence: `server/server.js`)
- Auth routes → Login and profile: dispatches (evidence: `server/routes/authRoutes.js`)
- Auth routes → Token verification: verifies profile (evidence: `server/routes/authRoutes.js`)
- Event routes → Event management: dispatches (evidence: `server/routes/eventRoutes.js`)
- Event routes → Token verification: verifies token (evidence: `server/routes/eventRoutes.js`)
- Event routes → Admin authorization: checks admin (evidence: `server/routes/eventRoutes.js`)
- Registration routes → Event registration: dispatches (evidence: `server/routes/registrationRoutes.js`)
- Registration routes → Token verification: verifies token (evidence: `server/routes/registrationRoutes.js`)
- Login and profile → MySQL connection: queries users (evidence: `server/controllers/authController.js`)
- Event management → MySQL connection: queries events (evidence: `server/controllers/eventController.js`)
- Event registration → MySQL connection: queries registrations (evidence: `server/controllers/registrationController.js`)
- MySQL connection → MySQL or MariaDB: connects (evidence: `server/config/db.js`)
- College events database → MySQL or MariaDB: defines schema (evidence: `README.md`)
