# dreilol/classroom-app architecture

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

- Interactive diagram: https://gitdiagram.com/dreilol/classroom-app
- Repository: https://github.com/dreilol/classroom-app

## Overview

Classroom.space is a teacher workspace for attendance, recitation, student seating, and subject setup, with a read-only class view. Teachers sign in, reach the dashboard, and use its tools to manage classroom data; the guest view reads saved records by date. Supabase is the shared authentication and data backend. Source excerpts show page-level Supabase calls and shared UI usage; database policies and unsampled routes are not inspected.

Main entry points: [`app/page.tsx`](https://github.com/dreilol/classroom-app/blob/main/app/page.tsx) (Dashboard), [`lib/supabase.ts`](https://github.com/dreilol/classroom-app/blob/main/lib/supabase.ts) (Supabase client), [`app/components/AppHeader.tsx`](https://github.com/dreilol/classroom-app/blob/main/app/components/AppHeader.tsx) (App navigation), [`app/login/page.tsx`](https://github.com/dreilol/classroom-app/blob/main/app/login/page.tsx) (Sign in)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspace and access"]
  node_login["Sign in<br/>[page.tsx]"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_guest["Read-only view<br/>[page.tsx]"]
end

subgraph group_classroom["Classroom operations"]
  node_attendance["Attendance log<br/>[page.tsx]"]
  node_recitation["Recitation log<br/>[page.tsx]"]
  node_students["Student seating<br/>[page.tsx]"]
  node_subjects["Subject setup<br/>[page.tsx]"]
end

subgraph group_shared["Shared services"]
  node_header["App navigation<br/>[AppHeader.tsx]"]
  node_theme["Theme state<br/>[ThemeProvider.tsx]"]
  node_supabase["Supabase client<br/>[supabase.ts]"]
end

node_teacher(("Teacher"))
node_backend[("Supabase backend")]

node_teacher -->|"signs in"| node_login
node_login -->|"authenticates with"| node_supabase
node_login -->|"navigates to"| node_dashboard
node_teacher -->|"opens"| node_dashboard
node_dashboard -->|"checks session"| node_supabase
node_dashboard -->|"redirects unauthenticated"| node_login
node_dashboard -->|"links to"| node_attendance
node_dashboard -->|"links to"| node_recitation
node_dashboard -->|"links to"| node_students
node_dashboard -->|"links to"| node_subjects
node_dashboard -->|"copies view link"| node_guest
node_attendance -->|"reads and saves records"| node_supabase
node_recitation -->|"reads and saves tallies"| node_supabase
node_students -->|"manages roster"| node_supabase
node_subjects -->|"manages subjects"| node_supabase
node_guest -->|"reads class records"| node_supabase
node_supabase -->|"connects to"| node_backend
node_dashboard -->|"renders"| node_header
node_attendance -->|"renders"| node_header
node_recitation -->|"renders"| node_header
node_students -->|"renders"| node_header
node_subjects -->|"renders"| node_header
node_header -->|"uses theme"| node_theme
node_teacher -->|"records attendance"| node_attendance
node_teacher -->|"logs participation"| node_recitation
node_teacher -->|"organizes seats"| node_students
node_teacher -->|"organizes subjects"| node_subjects

click node_login "https://github.com/dreilol/classroom-app/blob/main/app/login/page.tsx"
click node_dashboard "https://github.com/dreilol/classroom-app/blob/main/app/page.tsx"
click node_guest "https://github.com/dreilol/classroom-app/blob/main/app/view/%5Busername%5D/page.tsx"
click node_attendance "https://github.com/dreilol/classroom-app/blob/main/app/attendance/page.tsx"
click node_recitation "https://github.com/dreilol/classroom-app/blob/main/app/recitation/page.tsx"
click node_students "https://github.com/dreilol/classroom-app/blob/main/app/manage/students/page.tsx"
click node_subjects "https://github.com/dreilol/classroom-app/blob/main/app/manage/subjects/page.tsx"
click node_header "https://github.com/dreilol/classroom-app/blob/main/app/components/AppHeader.tsx"
click node_theme "https://github.com/dreilol/classroom-app/blob/main/app/components/ThemeProvider.tsx"
click node_supabase "https://github.com/dreilol/classroom-app/blob/main/lib/supabase.ts"

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_login,node_dashboard,node_guest toneBlue
class node_attendance,node_recitation,node_students,node_subjects,node_backend toneAmber
class node_header,node_theme,node_supabase toneMint
class node_teacher toneIndigo
```

## Components

### Workspace and access

- [Sign in](https://github.com/dreilol/classroom-app/blob/main/app/login/page.tsx): `app/login/page.tsx`
- [Dashboard](https://github.com/dreilol/classroom-app/blob/main/app/page.tsx): `app/page.tsx`
- [Read-only view](https://github.com/dreilol/classroom-app/blob/main/app/view/%5Busername%5D/page.tsx): `app/view/[username]/page.tsx`

### Classroom operations

- [Attendance log](https://github.com/dreilol/classroom-app/blob/main/app/attendance/page.tsx): `app/attendance/page.tsx`
- [Recitation log](https://github.com/dreilol/classroom-app/blob/main/app/recitation/page.tsx): `app/recitation/page.tsx`
- [Student seating](https://github.com/dreilol/classroom-app/blob/main/app/manage/students/page.tsx): `app/manage/students/page.tsx`
- [Subject setup](https://github.com/dreilol/classroom-app/blob/main/app/manage/subjects/page.tsx): `app/manage/subjects/page.tsx`

### Shared services

- [App navigation](https://github.com/dreilol/classroom-app/blob/main/app/components/AppHeader.tsx): `app/components/AppHeader.tsx`
- [Theme state](https://github.com/dreilol/classroom-app/blob/main/app/components/ThemeProvider.tsx): `app/components/ThemeProvider.tsx`
- [Supabase client](https://github.com/dreilol/classroom-app/blob/main/lib/supabase.ts): `lib/supabase.ts`

### Other components

- **Teacher**
- **Supabase backend**

## Connections

- Teacher → Sign in: signs in (evidence: `app/login/page.tsx`)
- Sign in → Supabase client: authenticates with (evidence: `app/login/page.tsx`)
- Sign in → Dashboard: navigates to (evidence: `app/login/page.tsx`)
- Teacher → Dashboard: opens (evidence: `app/page.tsx`)
- Dashboard → Supabase client: checks session (evidence: `app/page.tsx`)
- Dashboard → Sign in: redirects unauthenticated (evidence: `app/page.tsx`)
- Dashboard → Attendance log: links to (evidence: `app/page.tsx`)
- Dashboard → Recitation log: links to (evidence: `app/page.tsx`)
- Dashboard → Student seating: links to (evidence: `app/page.tsx`)
- Dashboard → Subject setup: links to (evidence: `app/page.tsx`)
- Dashboard → Read-only view: copies view link (evidence: `app/page.tsx`)
- Attendance log → Supabase client: reads and saves records (evidence: `app/attendance/page.tsx`)
- Recitation log → Supabase client: reads and saves tallies (evidence: `app/recitation/page.tsx`)
- Student seating → Supabase client: manages roster (evidence: `app/manage/students/page.tsx`)
- Subject setup → Supabase client: manages subjects (evidence: `app/manage/subjects/page.tsx`)
- Read-only view → Supabase client: reads class records (evidence: `app/view/[username]/page.tsx`)
- Supabase client → Supabase backend: connects to (evidence: `lib/supabase.ts`)
- Dashboard → App navigation: renders (evidence: `app/page.tsx`)
- Attendance log → App navigation: renders (evidence: `app/attendance/page.tsx`)
- Recitation log → App navigation: renders (evidence: `app/recitation/page.tsx`)
- Student seating → App navigation: renders (evidence: `app/manage/students/page.tsx`)
- Subject setup → App navigation: renders (evidence: `app/manage/subjects/page.tsx`)
- App navigation → Theme state: uses theme (evidence: `app/components/AppHeader.tsx`)
- Teacher → Attendance log: records attendance (evidence: `app/attendance/page.tsx`)
- Teacher → Recitation log: logs participation (evidence: `app/recitation/page.tsx`)
- Teacher → Student seating: organizes seats (evidence: `app/manage/students/page.tsx`)
- Teacher → Subject setup: organizes subjects (evidence: `app/manage/subjects/page.tsx`)
