# manavsharma2707/noclash architecture

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

- Interactive diagram: https://gitdiagram.com/manavsharma2707/noclash
- Repository: https://github.com/manavsharma2707/noclash

## Overview

NoClash is a role-based timetable conflict checker with a React single-page app, an Express API, and MySQL persistence. Users register and await administrator approval; after login, administrators manage users and academic resources, professors view schedules and book extra classes, and students view schedules and profile details. The README documents transactional SQL conflict checks across room, professor, and batch, plus base-versus-extra schedule rules. The backend excerpt is incomplete, so API capabilities beyond the sampled handlers follow README documentation; internal route wiring is represented at the documented endpoint level.

Main entry points: [`Frontend/src/App.jsx`](https://github.com/manavsharma2707/noclash/blob/main/Frontend/src/App.jsx) (Route shell), [`Backend/lib/db.js`](https://github.com/manavsharma2707/noclash/blob/main/Backend/lib/db.js) (MySQL pool), [`Backend/server.js`](https://github.com/manavsharma2707/noclash/blob/main/Backend/server.js) (Authentication and users), [`Frontend/src/pages/AdminDashboard.jsx`](https://github.com/manavsharma2707/noclash/blob/main/Frontend/src/pages/AdminDashboard.jsx) (Admin dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web app"]
  node_app["Route shell<br/>[App.jsx]"]
  node_login["Login<br/>[LoginPage.jsx]"]
  node_register["Registration<br/>[RegisterPage.jsx]"]
  node_adminui["Admin dashboard<br/>[AdminDashboard.jsx]"]
  node_profui["Professor dashboard"]
  node_studentui["Student dashboard"]
end

subgraph group_api["API and domain"]
  node_authapi["Authentication and users<br/>[server.js]"]
  node_adminapi["Admin resources<br/>[server.js]"]
  node_profapi["Professor scheduling<br/>[server.js]"]
  node_studentapi["Student views<br/>[server.js]"]
end

subgraph group_data["Persistence"]
  node_pool["MySQL pool<br/>[db.js]"]
  node_mysql[("Academic database")]
end

node_visitor(("User"))

node_visitor -->|"opens"| node_app
node_app -->|"routes"| node_login
node_app -->|"routes"| node_register
node_app -->|"routes"| node_adminui
node_app -->|"routes"| node_profui
node_app -->|"routes"| node_studentui
node_login -->|"submits credentials"| node_authapi
node_register -->|"submits registration"| node_authapi
node_adminui -->|"manages users"| node_authapi
node_adminui -->|"manages resources"| node_adminapi
node_profui -->|"loads and books"| node_profapi
node_studentui -->|"loads schedule and profile"| node_studentapi
node_authapi -->|"queries users"| node_pool
node_adminapi -->|"queries resources"| node_pool
node_profapi -->|"checks and writes schedule"| node_pool
node_studentapi -->|"queries schedules"| node_pool
node_pool -->|"executes SQL"| node_mysql

click node_app "https://github.com/manavsharma2707/noclash/blob/main/Frontend/src/App.jsx"
click node_login "https://github.com/manavsharma2707/noclash/blob/main/Frontend/src/pages/LoginPage.jsx"
click node_register "https://github.com/manavsharma2707/noclash/blob/main/Frontend/src/pages/RegisterPage.jsx"
click node_adminui "https://github.com/manavsharma2707/noclash/blob/main/Frontend/src/pages/AdminDashboard.jsx"
click node_profui "https://github.com/manavsharma2707/noclash/blob/main/Frontend/src/pages/ProfessorDashboard.jsx"
click node_studentui "https://github.com/manavsharma2707/noclash/blob/main/Frontend/src/pages/StudentDashboard.jsx"
click node_authapi "https://github.com/manavsharma2707/noclash/blob/main/Backend/server.js"
click node_adminapi "https://github.com/manavsharma2707/noclash/blob/main/Backend/server.js"
click node_profapi "https://github.com/manavsharma2707/noclash/blob/main/Backend/server.js"
click node_studentapi "https://github.com/manavsharma2707/noclash/blob/main/Backend/server.js"
click node_pool "https://github.com/manavsharma2707/noclash/blob/main/Backend/lib/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_login,node_register,node_adminui,node_profui,node_studentui,node_visitor toneBlue
class node_authapi,node_adminapi,node_profapi,node_studentapi toneAmber
class node_pool,node_mysql toneMint
```

## Components

### Web app

- [Route shell](https://github.com/manavsharma2707/noclash/blob/main/Frontend/src/App.jsx): `Frontend/src/App.jsx`
- [Login](https://github.com/manavsharma2707/noclash/blob/main/Frontend/src/pages/LoginPage.jsx): `Frontend/src/pages/LoginPage.jsx`
- [Registration](https://github.com/manavsharma2707/noclash/blob/main/Frontend/src/pages/RegisterPage.jsx): `Frontend/src/pages/RegisterPage.jsx`
- [Admin dashboard](https://github.com/manavsharma2707/noclash/blob/main/Frontend/src/pages/AdminDashboard.jsx): `Frontend/src/pages/AdminDashboard.jsx`
- [Professor dashboard](https://github.com/manavsharma2707/noclash/blob/main/Frontend/src/pages/ProfessorDashboard.jsx): `Frontend/src/pages/ProfessorDashboard.jsx`
- [Student dashboard](https://github.com/manavsharma2707/noclash/blob/main/Frontend/src/pages/StudentDashboard.jsx): `Frontend/src/pages/StudentDashboard.jsx`

### API and domain

- [Authentication and users](https://github.com/manavsharma2707/noclash/blob/main/Backend/server.js): `Backend/server.js`
- [Admin resources](https://github.com/manavsharma2707/noclash/blob/main/Backend/server.js): `Backend/server.js`
- [Professor scheduling](https://github.com/manavsharma2707/noclash/blob/main/Backend/server.js): `Backend/server.js`
- [Student views](https://github.com/manavsharma2707/noclash/blob/main/Backend/server.js): `Backend/server.js`

### Persistence

- [MySQL pool](https://github.com/manavsharma2707/noclash/blob/main/Backend/lib/db.js): `Backend/lib/db.js`
- **Academic database**

### Other components

- **User**

## Connections

- User → Route shell: opens
- Route shell → Login: routes
- Route shell → Registration: routes
- Route shell → Admin dashboard: routes
- Route shell → Professor dashboard: routes
- Route shell → Student dashboard: routes
- Login → Authentication and users: submits credentials
- Registration → Authentication and users: submits registration
- Admin dashboard → Authentication and users: manages users
- Admin dashboard → Admin resources: manages resources
- Professor dashboard → Professor scheduling: loads and books
- Student dashboard → Student views: loads schedule and profile
- Authentication and users → MySQL pool: queries users
- Admin resources → MySQL pool: queries resources
- Professor scheduling → MySQL pool: checks and writes schedule
- Student views → MySQL pool: queries schedules
- MySQL pool → Academic database: executes SQL
