# nandhuj1721/slotsync-portal architecture

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

- Interactive diagram: https://gitdiagram.com/nandhuj1721/slotsync-portal
- Repository: https://github.com/nandhuj1721/slotsync-portal

## Overview

SlotSync is a faculty–student consultation portal: users sign in, students find providers and book available appointments, faculty manage availability and attendance, and administrators manage accounts and review notification logs. The React dashboard sends authenticated API requests to an Express backend; booking rules and role checks run server-side, with MongoDB models holding users, schedules, overrides, bookings, and audit logs. The README excerpt documents setup rather than product behavior, so feature coverage and relationships here rely mainly on the sampled source; the frontend-to-backend HTTP connection is shown as unverified.

Main entry points: [`slotsync-backend/server.js`](https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-backend/server.js) (API routes and workflows), [`slotsync-frontend/src/App.jsx`](https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-frontend/src/App.jsx) (Role dashboards), [`slotsync-backend/models/index.js`](https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-backend/models/index.js) (Domain models and indexes), [`slotsync-frontend/src/api.js`](https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-frontend/src/api.js) (Authenticated API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Portal"]
  node_dashboard["Role dashboards<br/>[App.jsx]"]
  node_http_client["Authenticated API client<br/>[api.js]"]
end

subgraph group_backend["API and workflows"]
  node_api_routes["API routes and workflows<br/>[server.js]"]
  node_auth["Authentication and roles<br/>[auth.js]"]
  node_booking["Slot and booking rules"]
  node_provider_discovery["Provider discovery<br/>[server.js]"]
  node_availability["Schedules and overrides<br/>[server.js]"]
  node_appointment_ops["Appointment operations<br/>[server.js]"]
  node_admin_ops["Account and audit admin<br/>[server.js]"]
end

subgraph group_data["Persistent domain"]
  node_mongo[("MongoDB")]
  node_domain_models["Domain models and indexes<br/>[index.js]"]
end

node_student(("Student"))
node_faculty(("Faculty or HOD"))
node_admin(("Administrator"))

node_student -->|"uses"| node_dashboard
node_faculty -->|"uses"| node_dashboard
node_admin -->|"uses"| node_dashboard
node_dashboard -->|"sends requests"| node_http_client
node_http_client -.->|"HTTP requests"| node_api_routes
node_api_routes -->|"guards routes"| node_auth
node_api_routes -->|"dispatches booking"| node_booking
node_api_routes -->|"serves search"| node_provider_discovery
node_api_routes -->|"manages availability"| node_availability
node_api_routes -->|"handles appointments"| node_appointment_ops
node_api_routes -->|"serves admin"| node_admin_ops
node_api_routes -->|"reads and writes"| node_domain_models
node_auth -->|"looks up users"| node_domain_models
node_booking -->|"reads and writes"| node_domain_models
node_domain_models -.->|"stores records"| node_mongo

click node_dashboard "https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-frontend/src/App.jsx"
click node_http_client "https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-frontend/src/api.js"
click node_api_routes "https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-backend/server.js"
click node_auth "https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-backend/middleware/auth.js"
click node_booking "https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-backend/controllers/bookingController.js"
click node_provider_discovery "https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-backend/server.js"
click node_availability "https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-backend/server.js"
click node_appointment_ops "https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-backend/server.js"
click node_admin_ops "https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-backend/server.js"
click node_domain_models "https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-backend/models/index.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_dashboard,node_http_client toneBlue
class node_api_routes,node_auth,node_booking,node_provider_discovery,node_availability,node_appointment_ops,node_admin_ops toneAmber
class node_mongo,node_domain_models toneMint
class node_student,node_faculty,node_admin toneIndigo
```

## Components

### Portal

- [Role dashboards](https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-frontend/src/App.jsx): `slotsync-frontend/src/App.jsx`
- [Authenticated API client](https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-frontend/src/api.js): `slotsync-frontend/src/api.js`

### API and workflows

- [API routes and workflows](https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-backend/server.js): `slotsync-backend/server.js`
- [Authentication and roles](https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-backend/middleware/auth.js): `slotsync-backend/middleware/auth.js`
- [Slot and booking rules](https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-backend/controllers/bookingController.js): `slotsync-backend/controllers/bookingController.js`
- [Provider discovery](https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-backend/server.js): `slotsync-backend/server.js`
- [Schedules and overrides](https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-backend/server.js): `slotsync-backend/server.js`
- [Appointment operations](https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-backend/server.js): `slotsync-backend/server.js`
- [Account and audit admin](https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-backend/server.js): `slotsync-backend/server.js`

### Persistent domain

- **MongoDB**
- [Domain models and indexes](https://github.com/nandhuj1721/slotsync-portal/blob/main/slotsync-backend/models/index.js): `slotsync-backend/models/index.js`

### Other components

- **Student**
- **Faculty or HOD**
- **Administrator**

## Connections

- Student → Role dashboards: uses (evidence: `slotsync-frontend/src/App.jsx`)
- Faculty or HOD → Role dashboards: uses (evidence: `slotsync-frontend/src/App.jsx`)
- Administrator → Role dashboards: uses (evidence: `slotsync-frontend/src/App.jsx`)
- Role dashboards → Authenticated API client: sends requests (evidence: `slotsync-frontend/src/App.jsx`)
- Authenticated API client → API routes and workflows: HTTP requests
- API routes and workflows → Authentication and roles: guards routes (evidence: `slotsync-backend/server.js`)
- API routes and workflows → Slot and booking rules: dispatches booking (evidence: `slotsync-backend/server.js`)
- API routes and workflows → Provider discovery: serves search (evidence: `slotsync-backend/server.js`)
- API routes and workflows → Schedules and overrides: manages availability (evidence: `slotsync-backend/server.js`)
- API routes and workflows → Appointment operations: handles appointments (evidence: `slotsync-backend/server.js`)
- API routes and workflows → Account and audit admin: serves admin (evidence: `slotsync-backend/server.js`)
- API routes and workflows → Domain models and indexes: reads and writes (evidence: `slotsync-backend/server.js`)
- Authentication and roles → Domain models and indexes: looks up users (evidence: `slotsync-backend/middleware/auth.js`)
- Slot and booking rules → Domain models and indexes: reads and writes (evidence: `slotsync-backend/controllers/bookingController.js`)
- Domain models and indexes → MongoDB: stores records
