# nicolasimhof/student-tutor-scheduling-system architecture

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

- Interactive diagram: https://gitdiagram.com/nicolasimhof/student-tutor-scheduling-system
- Repository: https://github.com/nicolasimhof/student-tutor-scheduling-system

## Overview

This is a browser-based student–tutor scheduling platform backed by Supabase. Users work through role-specific dashboards to find tutors, book sessions, manage availability, handle events and time off, and exchange reviews. The sampled JavaScript confirms direct Supabase queries and RPC use, and that the calendar fetches appointments, events, working hours, and time-off data. Other capabilities and database responsibilities are represented from the README; unsampled wiring between those subsystems is not inferred.

Main entry points: [`script.js`](https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/script.js) (Role dashboards), [`calendar.js`](https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/calendar.js) (Availability calendar), [`supabase/migrations`](https://github.com/nicolasimhof/student-tutor-scheduling-system/tree/master/supabase/migrations) (Database business logic), [`register.html`](https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/register.html) (Registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Role dashboards<br/>[script.js]"]
  node_registration["Registration<br/>[register.html]"]
end

subgraph group_schedule["Scheduling"]
  node_calendar["Availability calendar<br/>[calendar.js]"]
  node_booking["Appointment booking<br/>[script.js]"]
  node_availability["Tutor availability<br/>[script.js]"]
  node_timeoff["Time-off requests<br/>[script.js]"]
end

subgraph group_feedback["Feedback"]
  node_reviews["Reviews and replies<br/>[script.js]"]
end

subgraph group_admin["Administration"]
  node_events["Department events<br/>[script.js]"]
  node_moderation["Review moderation<br/>[script.js]"]
  node_adminmgmt["User administration<br/>[script.js]"]
end

subgraph group_platform["Supabase platform"]
  node_supabase{{"Supabase services"}}
  node_postgres[("PostgreSQL data")]
  node_migrations["Database business logic"]
end

node_users(("Students and staff"))

node_users -->|"uses dashboards"| node_app
node_users -->|"registers"| node_registration
node_app -->|"offers booking"| node_booking
node_app -->|"manages"| node_availability
node_app -->|"submits requests"| node_timeoff
node_app -->|"manages events"| node_events
node_app -->|"supports feedback"| node_reviews
node_app -->|"supports moderation"| node_moderation
node_app -->|"supports oversight"| node_adminmgmt
node_calendar -->|"fetches calendar data"| node_supabase
node_app -->|"queries and calls RPCs"| node_supabase
node_supabase -->|"accesses data"| node_postgres
node_migrations -->|"defines schema and logic"| node_postgres
node_booking -.->|"validates appointments"| node_postgres
node_timeoff -.->|"constrains availability"| node_postgres
node_events -.->|"cancels conflicts"| node_postgres
node_reviews -.->|"stores feedback"| node_postgres

click node_app "https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/script.js"
click node_registration "https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/register.html"
click node_calendar "https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/calendar.js"
click node_booking "https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/script.js"
click node_availability "https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/script.js"
click node_timeoff "https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/script.js"
click node_events "https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/script.js"
click node_reviews "https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/script.js"
click node_moderation "https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/script.js"
click node_adminmgmt "https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/script.js"
click node_migrations "https://github.com/nicolasimhof/student-tutor-scheduling-system/tree/master/supabase/migrations"

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_registration toneBlue
class node_calendar,node_booking,node_availability,node_timeoff toneAmber
class node_reviews toneMint
class node_events,node_moderation,node_adminmgmt toneRose
class node_supabase,node_postgres,node_migrations,node_users toneIndigo
```

## Components

### Web application

- [Role dashboards](https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/script.js): `script.js`
- [Registration](https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/register.html): `register.html`

### Scheduling

- [Availability calendar](https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/calendar.js): `calendar.js`
- [Appointment booking](https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/script.js): `script.js`
- [Tutor availability](https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/script.js): `script.js`
- [Time-off requests](https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/script.js): `script.js`

### Feedback

- [Reviews and replies](https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/script.js): `script.js`

### Administration

- [Department events](https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/script.js): `script.js`
- [Review moderation](https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/script.js): `script.js`
- [User administration](https://github.com/nicolasimhof/student-tutor-scheduling-system/blob/master/script.js): `script.js`

### Supabase platform

- **Supabase services**
- **PostgreSQL data**
- [Database business logic](https://github.com/nicolasimhof/student-tutor-scheduling-system/tree/master/supabase/migrations): `supabase/migrations`

### Other components

- **Students and staff**

## Connections

- Students and staff → Role dashboards: uses dashboards (evidence: `README.md`)
- Students and staff → Registration: registers (evidence: `README.md`)
- Role dashboards → Appointment booking: offers booking (evidence: `README.md`)
- Role dashboards → Tutor availability: manages (evidence: `README.md`)
- Role dashboards → Time-off requests: submits requests (evidence: `README.md`)
- Role dashboards → Department events: manages events (evidence: `README.md`)
- Role dashboards → Reviews and replies: supports feedback (evidence: `README.md`)
- Role dashboards → Review moderation: supports moderation (evidence: `README.md`)
- Role dashboards → User administration: supports oversight (evidence: `README.md`)
- Availability calendar → Supabase services: fetches calendar data (evidence: `calendar.js`)
- Role dashboards → Supabase services: queries and calls RPCs (evidence: `script.js`)
- Supabase services → PostgreSQL data: accesses data (evidence: `README.md`)
- Database business logic → PostgreSQL data: defines schema and logic (evidence: `README.md`)
- Appointment booking → PostgreSQL data: validates appointments (evidence: `README.md`)
- Time-off requests → PostgreSQL data: constrains availability (evidence: `README.md`)
- Department events → PostgreSQL data: cancels conflicts (evidence: `README.md`)
- Reviews and replies → PostgreSQL data: stores feedback (evidence: `README.md`)
