# pichchanthorn/eduschedule-system architecture

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

- Interactive diagram: https://gitdiagram.com/pichchanthorn/eduschedule-system
- Repository: https://github.com/pichchanthorn/eduschedule-system

## Overview

EduSchedule is a bilingual course-registration and class-scheduling system. Its main workflow is: students browse published sections, register or cancel, and view their registrations and timetable; administrators manage the catalog and students, oversee rosters, and review reports. The graph also includes authentication, notifications and announcements, poster uploads, and email delivery. Edges use README statements or SOURCE INDEX references; unsampled implementation details are represented at their enclosing subsystem paths rather than inferred call chains.

Main entry points: [`src/app/api/admin/course-posters/route.ts`](https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/app/api/admin/course-posters/route.ts) (Poster upload endpoint), [`src/server/session.ts`](https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/server/session.ts) (Session and roles), [`src/features/registration/actions.ts`](https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/features/registration/actions.ts) (Registration actions), [`src/features/reports/reports.ts`](https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/features/reports/reports.ts) (Reports and analytics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_student_pages["Student pages"]
  node_admin_pages["Admin pages"]
end

subgraph group_registration["Registration and scheduling"]
  node_registration_pages["Registration pages"]
  node_registration_actions["Registration actions<br/>[actions.ts]"]
  node_registration_rules["Registration rules<br/>[registration.ts]"]
  node_schedule["Schedule and conflicts<br/>[schedule.ts]"]
  node_timetable["Student timetable<br/>[timetable.ts]"]
end

subgraph group_administration["Administration"]
  node_catalog["Course catalog"]
  node_catalog_rules["Catalog authorization<br/>[authorization.ts]"]
  node_students["Student management"]
  node_reports["Reports and analytics<br/>[reports.ts]"]
  node_report_filters["Report filters<br/>[filters.ts]"]
  node_poster_upload["Poster upload<br/>[posters.ts]"]
  node_poster_api["Poster upload endpoint<br/>[route.ts]"]
end

subgraph group_platform["Platform services"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_session["Session and roles<br/>[session.ts]"]
  node_database[("Application database<br/>[db.ts]")]
  node_notifications["Notifications"]
  node_announcements["Announcements"]
  node_email["Email delivery<br/>[service.ts]"]
  node_jobs["Scheduled jobs endpoint<br/>[route.ts]"]
  node_i18n["Locale routing<br/>[routing.ts]"]
  node_environment["Environment configuration<br/>[env.ts]"]
end

node_student(("Student"))
node_admin(("Administrator"))

node_student -->|"uses"| node_student_pages
node_admin -->|"manages"| node_admin_pages
node_student -->|"browses"| node_registration_pages
node_registration_pages -.->|"registers"| node_registration_actions
node_registration_actions -.->|"checks rules"| node_registration_rules
node_registration_actions -.->|"checks conflicts"| node_schedule
node_student -->|"views"| node_timetable
node_admin -->|"maintains"| node_catalog
node_admin -->|"manages"| node_students
node_admin -->|"reviews"| node_reports
node_reports -->|"uses filters"| node_report_filters
node_reports -->|"queries"| node_database
node_admin -->|"uploads"| node_poster_api
node_poster_api -->|"checks user"| node_session
node_poster_api -->|"checks admin"| node_catalog_rules
node_poster_api -->|"creates upload"| node_poster_upload
node_session -->|"reads session"| node_auth
node_session -->|"loads user"| node_database
node_session -->|"checks eligibility"| node_registration_rules
node_jobs -->|"runs jobs"| node_announcements
node_student_pages -->|"uses locales"| node_i18n
node_auth -->|"loads settings"| node_environment
node_database -->|"loads settings"| node_environment
node_email -->|"loads settings"| node_environment

click node_student_pages "https://github.com/pichchanthorn/eduschedule-system/tree/claude/friendly-bardeen-m4unwt/src/app/%5Blocale%5D"
click node_admin_pages "https://github.com/pichchanthorn/eduschedule-system/tree/claude/friendly-bardeen-m4unwt/src/app/%5Blocale%5D/admin"
click node_auth "https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/server/auth.ts"
click node_session "https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/server/session.ts"
click node_database "https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/server/db.ts"
click node_catalog "https://github.com/pichchanthorn/eduschedule-system/tree/claude/friendly-bardeen-m4unwt/src/features/catalog"
click node_catalog_rules "https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/features/catalog/authorization.ts"
click node_registration_pages "https://github.com/pichchanthorn/eduschedule-system/tree/claude/friendly-bardeen-m4unwt/src/app/%5Blocale%5D/sections"
click node_registration_actions "https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/features/registration/actions.ts"
click node_registration_rules "https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/domain/registration.ts"
click node_schedule "https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/domain/schedule.ts"
click node_timetable "https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/features/registration/timetable.ts"
click node_students "https://github.com/pichchanthorn/eduschedule-system/tree/claude/friendly-bardeen-m4unwt/src/features/students"
click node_reports "https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/features/reports/reports.ts"
click node_report_filters "https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/features/reports/filters.ts"
click node_notifications "https://github.com/pichchanthorn/eduschedule-system/tree/claude/friendly-bardeen-m4unwt/src/features/notifications"
click node_announcements "https://github.com/pichchanthorn/eduschedule-system/tree/claude/friendly-bardeen-m4unwt/src/features/announcements"
click node_email "https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/server/email/service.ts"
click node_jobs "https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/app/api/jobs/run/route.ts"
click node_poster_upload "https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/features/catalog/poster-upload/posters.ts"
click node_poster_api "https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/app/api/admin/course-posters/route.ts"
click node_i18n "https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/i18n/routing.ts"
click node_environment "https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/lib/env.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_student_pages,node_admin_pages toneBlue
class node_registration_pages,node_registration_actions,node_registration_rules,node_schedule,node_timetable toneAmber
class node_catalog,node_catalog_rules,node_students,node_reports,node_report_filters,node_poster_upload,node_poster_api toneMint
class node_auth,node_session,node_database,node_notifications,node_announcements,node_email,node_jobs,node_i18n,node_environment toneRose
class node_student,node_admin toneIndigo
```

## Components

### User experience

- [Student pages](https://github.com/pichchanthorn/eduschedule-system/tree/claude/friendly-bardeen-m4unwt/src/app/%5Blocale%5D): `src/app/[locale]`
- [Admin pages](https://github.com/pichchanthorn/eduschedule-system/tree/claude/friendly-bardeen-m4unwt/src/app/%5Blocale%5D/admin): `src/app/[locale]/admin`

### Registration and scheduling

- [Registration pages](https://github.com/pichchanthorn/eduschedule-system/tree/claude/friendly-bardeen-m4unwt/src/app/%5Blocale%5D/sections): `src/app/[locale]/sections`
- [Registration actions](https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/features/registration/actions.ts): `src/features/registration/actions.ts`
- [Registration rules](https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/domain/registration.ts): `src/domain/registration.ts`
- [Schedule and conflicts](https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/domain/schedule.ts): `src/domain/schedule.ts`
- [Student timetable](https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/features/registration/timetable.ts): `src/features/registration/timetable.ts`

### Administration

- [Course catalog](https://github.com/pichchanthorn/eduschedule-system/tree/claude/friendly-bardeen-m4unwt/src/features/catalog): `src/features/catalog`
- [Catalog authorization](https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/features/catalog/authorization.ts): `src/features/catalog/authorization.ts`
- [Student management](https://github.com/pichchanthorn/eduschedule-system/tree/claude/friendly-bardeen-m4unwt/src/features/students): `src/features/students`
- [Reports and analytics](https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/features/reports/reports.ts): `src/features/reports/reports.ts`
- [Report filters](https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/features/reports/filters.ts): `src/features/reports/filters.ts`
- [Poster upload](https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/features/catalog/poster-upload/posters.ts): `src/features/catalog/poster-upload/posters.ts`
- [Poster upload endpoint](https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/app/api/admin/course-posters/route.ts): `src/app/api/admin/course-posters/route.ts`

### Platform services

- [Authentication](https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/server/auth.ts): `src/server/auth.ts`
- [Session and roles](https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/server/session.ts): `src/server/session.ts`
- [Application database](https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/server/db.ts): `src/server/db.ts`
- [Notifications](https://github.com/pichchanthorn/eduschedule-system/tree/claude/friendly-bardeen-m4unwt/src/features/notifications): `src/features/notifications`
- [Announcements](https://github.com/pichchanthorn/eduschedule-system/tree/claude/friendly-bardeen-m4unwt/src/features/announcements): `src/features/announcements`
- [Email delivery](https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/server/email/service.ts): `src/server/email/service.ts`
- [Scheduled jobs endpoint](https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/app/api/jobs/run/route.ts): `src/app/api/jobs/run/route.ts`
- [Locale routing](https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/i18n/routing.ts): `src/i18n/routing.ts`
- [Environment configuration](https://github.com/pichchanthorn/eduschedule-system/blob/claude/friendly-bardeen-m4unwt/src/lib/env.ts): `src/lib/env.ts`

### Other components

- **Student**
- **Administrator**

## Connections

- Student → Student pages: uses
- Administrator → Admin pages: manages
- Student → Registration pages: browses
- Registration pages → Registration actions: registers
- Registration actions → Registration rules: checks rules
- Registration actions → Schedule and conflicts: checks conflicts
- Student → Student timetable: views
- Administrator → Course catalog: maintains
- Administrator → Student management: manages
- Administrator → Reports and analytics: reviews
- Reports and analytics → Report filters: uses filters (evidence: `src/features/reports/reports.ts`)
- Reports and analytics → Application database: queries (evidence: `src/features/reports/reports.ts`)
- Administrator → Poster upload endpoint: uploads
- Poster upload endpoint → Session and roles: checks user (evidence: `src/app/api/admin/course-posters/route.ts`)
- Poster upload endpoint → Catalog authorization: checks admin (evidence: `src/app/api/admin/course-posters/route.ts`)
- Poster upload endpoint → Poster upload: creates upload (evidence: `src/app/api/admin/course-posters/route.ts`)
- Session and roles → Authentication: reads session (evidence: `src/server/session.ts`)
- Session and roles → Application database: loads user (evidence: `src/server/session.ts`)
- Session and roles → Registration rules: checks eligibility (evidence: `src/server/session.ts`)
- Scheduled jobs endpoint → Announcements: runs jobs (evidence: `src/app/api/jobs/run/route.ts`)
- Student pages → Locale routing: uses locales (evidence: `src/i18n/routing.ts`)
- Authentication → Environment configuration: loads settings (evidence: `src/server/auth.ts`)
- Application database → Environment configuration: loads settings (evidence: `src/server/db.ts`)
- Email delivery → Environment configuration: loads settings (evidence: `src/server/email/service.ts`)
