# divya94076/edumeet architecture

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

- Interactive diagram: https://gitdiagram.com/divya94076/edumeet
- Repository: https://github.com/divya94076/edumeet

## Overview

EduMeet is a role-based academic appointment scheduler. Students browse approved teachers and request available time slots; teachers manage availability and appointment decisions, while administrators approve accounts and monitor users and appointments. The sampled booking controller checks teacher approval and conflicting bookings, persists appointments, and attempts email notification. The graph also preserves documented ratings and recommendations, though their implementation was not sampled. Links between UI pages and the API are supported by the source index; unsampled route details are represented only where documented or wired in sampled files.

Main entry points: [`frontend/src/utils/api.js`](https://github.com/divya94076/edumeet/blob/main/frontend/src/utils/api.js) (API client), [`backend/server.js`](https://github.com/divya94076/edumeet/blob/main/backend/server.js) (HTTP server and routing), [`backend/controllers/studentController.js`](https://github.com/divya94076/edumeet/blob/main/backend/controllers/studentController.js) (Student booking logic), [`backend/models/User.js`](https://github.com/divya94076/edumeet/blob/main/backend/models/User.js) (User records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_webapp["Role dashboards<br/>[App.jsx]"]
  node_studentui["Browse and book"]
  node_studentappointments["My appointments<br/>[MyAppointments.jsx]"]
  node_teacherui["Teacher scheduling"]
  node_teacherappointments["Appointment management"]
  node_adminui["Admin operations"]
  node_authui["Registration and login<br/>[Register.jsx]"]
  node_authstate["Session state<br/>[AuthContext.jsx]"]
  node_http["API client<br/>[api.js]"]
end

subgraph group_api["API and access"]
  node_server["HTTP server and routing<br/>[server.js]"]
  node_authroutes["Authentication routes<br/>[authRoutes.js]"]
  node_teacheroutes["Teacher routes<br/>[teacherRoutes.js]"]
  node_studentroutes["Student routes<br/>[studentRoutes.js]"]
  node_adminroutes["Admin routes<br/>[adminRoutes.js]"]
  node_access["JWT and role checks<br/>[auth.js]"]
end

subgraph group_domain["Scheduling and roles"]
  node_studentlogic["Student booking logic"]
  node_teacherlogic["Teacher scheduling logic"]
  node_adminlogic["Approval and administration<br/>[adminController.js]"]
  node_authlogic["Account operations<br/>[authController.js]"]
  node_profilelogic["Profile operations"]
end

subgraph group_state["Persistence and integrations"]
  node_users[("User records<br/>[User.js]")]
  node_appointments[("Appointment records<br/>[Appointment.js]")]
  node_availability[("Availability records<br/>[Availability.js]")]
  node_email["Email notifications<br/>[email.js]"]
end

node_student(("Student"))
node_teacher(("Teacher"))
node_admin(("Administrator"))
node_mongo[("MongoDB")]
node_mailer["Email service"]

node_student -->|"browses and books"| node_studentui
node_teacher -->|"sets availability"| node_teacherui
node_teacher -->|"manages requests"| node_teacherappointments
node_admin -->|"manages platform"| node_adminui
node_studentui -->|"requests API"| node_http
node_studentappointments -->|"requests API"| node_http
node_teacherui -->|"requests API"| node_http
node_teacherappointments -->|"requests API"| node_http
node_adminui -->|"requests API"| node_http
node_authui -->|"requests API"| node_http
node_webapp -->|"provides session"| node_authstate
node_webapp -->|"routes to"| node_studentui
node_webapp -->|"routes to"| node_teacherui
node_webapp -->|"routes to"| node_adminui
node_http -.->|"sends requests"| node_server
node_server -->|"mounts routes"| node_authroutes
node_server -->|"mounts routes"| node_studentroutes
node_server -->|"mounts routes"| node_teacheroutes
node_server -->|"mounts routes"| node_adminroutes
node_authroutes -->|"protects profile"| node_access
node_teacheroutes -->|"checks roles"| node_access
node_studentroutes -->|"dispatches requests"| node_studentlogic
node_teacheroutes -->|"dispatches requests"| node_teacherlogic
node_adminroutes -->|"dispatches requests"| node_adminlogic
node_authroutes -->|"delegates profile update"| node_authlogic
node_studentlogic -->|"reads teachers"| node_users
node_studentlogic -->|"reads availability"| node_availability
node_studentlogic -->|"creates and checks"| node_appointments
node_studentlogic -->|"notifies teacher"| node_email
node_teacherlogic -->|"writes slots"| node_availability
node_teacherlogic -->|"updates bookings"| node_appointments
node_teacherlogic -->|"reads profile"| node_users
node_adminlogic -->|"manages accounts"| node_users
node_adminlogic -->|"monitors bookings"| node_appointments
node_authlogic -->|"updates accounts"| node_users
node_profilelogic -->|"updates profile"| node_users
node_server -->|"connects database"| node_mongo
node_email -->|"sends messages"| node_mailer
node_student -->|"reviews bookings"| node_studentappointments
node_admin -->|"registers"| node_authui
node_student -.->|"rates and gets suggestions"| node_studentui

click node_webapp "https://github.com/divya94076/edumeet/blob/main/frontend/src/App.jsx"
click node_studentui "https://github.com/divya94076/edumeet/blob/main/frontend/src/pages/student/BookAppointment.jsx"
click node_studentappointments "https://github.com/divya94076/edumeet/blob/main/frontend/src/pages/student/MyAppointments.jsx"
click node_teacherui "https://github.com/divya94076/edumeet/blob/main/frontend/src/pages/teacher/SetAvailability.jsx"
click node_teacherappointments "https://github.com/divya94076/edumeet/blob/main/frontend/src/pages/teacher/ManageAppointments.jsx"
click node_adminui "https://github.com/divya94076/edumeet/blob/main/frontend/src/pages/admin/AllAppointments.jsx"
click node_authui "https://github.com/divya94076/edumeet/blob/main/frontend/src/pages/Register.jsx"
click node_authstate "https://github.com/divya94076/edumeet/blob/main/frontend/src/context/AuthContext.jsx"
click node_http "https://github.com/divya94076/edumeet/blob/main/frontend/src/utils/api.js"
click node_server "https://github.com/divya94076/edumeet/blob/main/backend/server.js"
click node_authroutes "https://github.com/divya94076/edumeet/blob/main/backend/routes/authRoutes.js"
click node_teacheroutes "https://github.com/divya94076/edumeet/blob/main/backend/routes/teacherRoutes.js"
click node_studentroutes "https://github.com/divya94076/edumeet/blob/main/backend/routes/studentRoutes.js"
click node_adminroutes "https://github.com/divya94076/edumeet/blob/main/backend/routes/adminRoutes.js"
click node_access "https://github.com/divya94076/edumeet/blob/main/backend/middleware/auth.js"
click node_studentlogic "https://github.com/divya94076/edumeet/blob/main/backend/controllers/studentController.js"
click node_teacherlogic "https://github.com/divya94076/edumeet/blob/main/backend/controllers/teacherController.js"
click node_adminlogic "https://github.com/divya94076/edumeet/blob/main/backend/controllers/adminController.js"
click node_authlogic "https://github.com/divya94076/edumeet/blob/main/backend/controllers/authController.js"
click node_profilelogic "https://github.com/divya94076/edumeet/blob/main/backend/controllers/profileController.js"
click node_users "https://github.com/divya94076/edumeet/blob/main/backend/models/User.js"
click node_appointments "https://github.com/divya94076/edumeet/blob/main/backend/models/Appointment.js"
click node_availability "https://github.com/divya94076/edumeet/blob/main/backend/models/Availability.js"
click node_email "https://github.com/divya94076/edumeet/blob/main/backend/utils/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_webapp,node_studentui,node_studentappointments,node_teacherui,node_teacherappointments,node_adminui,node_authui,node_authstate,node_http toneBlue
class node_server,node_authroutes,node_teacheroutes,node_studentroutes,node_adminroutes,node_access,node_mongo toneAmber
class node_studentlogic,node_teacherlogic,node_adminlogic,node_authlogic,node_profilelogic toneMint
class node_users,node_appointments,node_availability,node_email toneRose
class node_student,node_teacher,node_admin,node_mailer toneIndigo
```

## Components

### Web client

- [Role dashboards](https://github.com/divya94076/edumeet/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Browse and book](https://github.com/divya94076/edumeet/blob/main/frontend/src/pages/student/BookAppointment.jsx): `frontend/src/pages/student/BookAppointment.jsx`
- [My appointments](https://github.com/divya94076/edumeet/blob/main/frontend/src/pages/student/MyAppointments.jsx): `frontend/src/pages/student/MyAppointments.jsx`
- [Teacher scheduling](https://github.com/divya94076/edumeet/blob/main/frontend/src/pages/teacher/SetAvailability.jsx): `frontend/src/pages/teacher/SetAvailability.jsx`
- [Appointment management](https://github.com/divya94076/edumeet/blob/main/frontend/src/pages/teacher/ManageAppointments.jsx): `frontend/src/pages/teacher/ManageAppointments.jsx`
- [Admin operations](https://github.com/divya94076/edumeet/blob/main/frontend/src/pages/admin/AllAppointments.jsx): `frontend/src/pages/admin/AllAppointments.jsx`
- [Registration and login](https://github.com/divya94076/edumeet/blob/main/frontend/src/pages/Register.jsx): `frontend/src/pages/Register.jsx`
- [Session state](https://github.com/divya94076/edumeet/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [API client](https://github.com/divya94076/edumeet/blob/main/frontend/src/utils/api.js): `frontend/src/utils/api.js`

### API and access

- [HTTP server and routing](https://github.com/divya94076/edumeet/blob/main/backend/server.js): `backend/server.js`
- [Authentication routes](https://github.com/divya94076/edumeet/blob/main/backend/routes/authRoutes.js): `backend/routes/authRoutes.js`
- [Teacher routes](https://github.com/divya94076/edumeet/blob/main/backend/routes/teacherRoutes.js): `backend/routes/teacherRoutes.js`
- [Student routes](https://github.com/divya94076/edumeet/blob/main/backend/routes/studentRoutes.js): `backend/routes/studentRoutes.js`
- [Admin routes](https://github.com/divya94076/edumeet/blob/main/backend/routes/adminRoutes.js): `backend/routes/adminRoutes.js`
- [JWT and role checks](https://github.com/divya94076/edumeet/blob/main/backend/middleware/auth.js): `backend/middleware/auth.js`

### Scheduling and roles

- [Student booking logic](https://github.com/divya94076/edumeet/blob/main/backend/controllers/studentController.js): `backend/controllers/studentController.js`
- [Teacher scheduling logic](https://github.com/divya94076/edumeet/blob/main/backend/controllers/teacherController.js): `backend/controllers/teacherController.js`
- [Approval and administration](https://github.com/divya94076/edumeet/blob/main/backend/controllers/adminController.js): `backend/controllers/adminController.js`
- [Account operations](https://github.com/divya94076/edumeet/blob/main/backend/controllers/authController.js): `backend/controllers/authController.js`
- [Profile operations](https://github.com/divya94076/edumeet/blob/main/backend/controllers/profileController.js): `backend/controllers/profileController.js`

### Persistence and integrations

- [User records](https://github.com/divya94076/edumeet/blob/main/backend/models/User.js): `backend/models/User.js`
- [Appointment records](https://github.com/divya94076/edumeet/blob/main/backend/models/Appointment.js): `backend/models/Appointment.js`
- [Availability records](https://github.com/divya94076/edumeet/blob/main/backend/models/Availability.js): `backend/models/Availability.js`
- [Email notifications](https://github.com/divya94076/edumeet/blob/main/backend/utils/email.js): `backend/utils/email.js`

### Other components

- **Student**
- **Teacher**
- **Administrator**
- **MongoDB**
- **Email service**

## Connections

- Student → Browse and book: browses and books
- Teacher → Teacher scheduling: sets availability
- Teacher → Appointment management: manages requests
- Administrator → Admin operations: manages platform
- Browse and book → API client: requests API (evidence: `frontend/src/pages/student/BookAppointment.jsx`)
- My appointments → API client: requests API (evidence: `frontend/src/pages/student/MyAppointments.jsx`)
- Teacher scheduling → API client: requests API (evidence: `frontend/src/pages/teacher/SetAvailability.jsx`)
- Appointment management → API client: requests API (evidence: `frontend/src/pages/teacher/ManageAppointments.jsx`)
- Admin operations → API client: requests API (evidence: `frontend/src/pages/admin/AllAppointments.jsx`)
- Registration and login → API client: requests API (evidence: `frontend/src/pages/Register.jsx`)
- Role dashboards → Session state: provides session (evidence: `frontend/src/App.jsx`)
- Role dashboards → Browse and book: routes to (evidence: `frontend/src/App.jsx`)
- Role dashboards → Teacher scheduling: routes to (evidence: `frontend/src/App.jsx`)
- Role dashboards → Admin operations: routes to (evidence: `frontend/src/App.jsx`)
- API client → HTTP server and routing: sends requests
- HTTP server and routing → Authentication routes: mounts routes (evidence: `backend/server.js`)
- HTTP server and routing → Student routes: mounts routes (evidence: `backend/server.js`)
- HTTP server and routing → Teacher routes: mounts routes (evidence: `backend/server.js`)
- HTTP server and routing → Admin routes: mounts routes (evidence: `backend/server.js`)
- Authentication routes → JWT and role checks: protects profile (evidence: `backend/routes/authRoutes.js`)
- Teacher routes → JWT and role checks: checks roles (evidence: `backend/routes/teacherRoutes.js`)
- Student routes → Student booking logic: dispatches requests (evidence: `backend/routes/studentRoutes.js`)
- Teacher routes → Teacher scheduling logic: dispatches requests (evidence: `backend/routes/teacherRoutes.js`)
- Admin routes → Approval and administration: dispatches requests (evidence: `backend/routes/adminRoutes.js`)
- Authentication routes → Account operations: delegates profile update (evidence: `backend/routes/authRoutes.js`)
- Student booking logic → User records: reads teachers (evidence: `backend/controllers/studentController.js`)
- Student booking logic → Availability records: reads availability (evidence: `backend/controllers/studentController.js`)
- Student booking logic → Appointment records: creates and checks (evidence: `backend/controllers/studentController.js`)
- Student booking logic → Email notifications: notifies teacher (evidence: `backend/controllers/studentController.js`)
- Teacher scheduling logic → Availability records: writes slots (evidence: `backend/controllers/teacherController.js`)
- Teacher scheduling logic → Appointment records: updates bookings (evidence: `backend/controllers/teacherController.js`)
- Teacher scheduling logic → User records: reads profile (evidence: `backend/controllers/teacherController.js`)
- Approval and administration → User records: manages accounts (evidence: `backend/controllers/adminController.js`)
- Approval and administration → Appointment records: monitors bookings (evidence: `backend/controllers/adminController.js`)
- Account operations → User records: updates accounts (evidence: `backend/controllers/authController.js`)
- Profile operations → User records: updates profile (evidence: `backend/controllers/profileController.js`)
- HTTP server and routing → MongoDB: connects database (evidence: `backend/server.js`)
- Email notifications → Email service: sends messages (evidence: `backend/utils/email.js`)
- Student → My appointments: reviews bookings
- Administrator → Registration and login: registers
- Student → Browse and book: rates and gets suggestions
