# myy542/hirayacopstone architecture

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

- Interactive diagram: https://gitdiagram.com/myy542/hirayacopstone
- Repository: https://github.com/myy542/hirayacopstone

## Overview

Hiraya Enrollment System is a multi-role school portal for applicants and students, registrars, administrators, teachers, and parents. Its central workflow lets a student submit an enrollment application, which staff review and approve before provisioning an account; students then use role-specific portals for academic and school services. The graph also captures attendance, announcements, reporting, profiles, and shared services. Evidence is limited to the README (empty), source index, and supplied excerpts; unsampled capabilities are represented only where their paths are supported, without speculative connections.

Main entry points: [`supabase/config.js`](https://github.com/myy542/hirayacopstone/blob/master/supabase/config.js) (Supabase client), [`registrar/js/enrollments.js`](https://github.com/myy542/hirayacopstone/blob/master/registrar/js/enrollments.js) (Review enrollment), [`js/email_service.js`](https://github.com/myy542/hirayacopstone/blob/master/js/email_service.js) (Email notifications), [`student/js/enrollment.js`](https://github.com/myy542/hirayacopstone/blob/master/student/js/enrollment.js) (Submit enrollment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_enroll["Enrollment"]
  node_student_enroll["Submit enrollment<br/>[enrollment.js]"]
  node_registrar_enroll["Review enrollment<br/>[enrollments.js]"]
  node_admin_enroll["Admin enrollment<br/>[enrollments.js]"]
  node_enrollment_detail["Enrollment details<br/>[view_enrollment.js]"]
  node_history["Enrollment history"]
end

subgraph group_academics["Academic services"]
  node_attendance["Attendance"]
  node_student_academics["Student academics<br/>[grades.js]"]
  node_teacher_classes["Class management<br/>[view-section.js]"]
  node_parent_academics["Parent academics<br/>[grades.js]"]
end

subgraph group_community["Communications"]
  node_admin_announcements["Manage announcements<br/>[announcements.js]"]
  node_announcements_service["Announcements service"]
  node_parent_announcements["Parent announcements<br/>[announcements.js]"]
  node_email_service["Email notifications<br/>[email_service.js]"]
end

subgraph group_platform["Shared platform"]
  node_auth["Sign-in<br/>[login.js]"]
  node_profiles["Role profiles<br/>[profile.js]"]
  node_chatbot["Chatbot<br/>[chatbot.js]"]
  node_supabase_client["Supabase client<br/>[config.js]"]
end

node_student_actor(("Student / applicant"))
node_registrar_actor(("Registrar"))
node_admin_actor(("Administrator"))
node_teacher_actor(("Teacher"))
node_parent_actor(("Parent"))
node_supabase_db[("Supabase data store")]
node_gmail["Gmail compose"]

node_student_actor -->|"submits"| node_student_enroll
node_student_enroll -->|"writes application"| node_supabase_client
node_student_enroll -->|"notifies registrar"| node_registrar_enroll
node_registrar_actor -->|"reviews"| node_registrar_enroll
node_registrar_enroll -->|"reads and updates"| node_supabase_client
node_registrar_enroll -->|"uses notifications"| node_email_service
node_registrar_enroll -.->|"opens details"| node_enrollment_detail
node_admin_actor -.->|"manages"| node_admin_enroll
node_admin_enroll -->|"reads and updates"| node_supabase_client
node_admin_enroll -->|"uses notifications"| node_email_service
node_enrollment_detail -->|"loads records"| node_supabase_client
node_enrollment_detail -->|"sends notice"| node_email_service
node_student_actor -.->|"views history"| node_history
node_history -->|"loads history"| node_supabase_client
node_teacher_actor -.->|"records attendance"| node_attendance
node_attendance -->|"reads and writes"| node_supabase_client
node_student_actor -.->|"views grades"| node_student_academics
node_parent_actor -.->|"views grades"| node_parent_academics
node_teacher_actor -.->|"manages classes"| node_teacher_classes
node_admin_actor -.->|"publishes"| node_admin_announcements
node_admin_announcements -->|"uses service"| node_announcements_service
node_admin_announcements -->|"uses notifications"| node_email_service
node_parent_actor -.->|"views notices"| node_parent_announcements
node_parent_announcements -->|"uses service"| node_announcements_service
node_announcements_service -->|"syncs announcements"| node_supabase_client
node_registrar_enroll -.->|"opens compose"| node_gmail
node_student_actor -.->|"signs in"| node_auth
node_auth -->|"authenticates"| node_supabase_client
node_teacher_actor -.->|"manages profile"| node_profiles
node_profiles -->|"reads and updates"| node_supabase_client
node_supabase_client -->|"connects"| node_supabase_db

click node_student_enroll "https://github.com/myy542/hirayacopstone/blob/master/student/js/enrollment.js"
click node_registrar_enroll "https://github.com/myy542/hirayacopstone/blob/master/registrar/js/enrollments.js"
click node_admin_enroll "https://github.com/myy542/hirayacopstone/blob/master/admin/js/enrollments.js"
click node_enrollment_detail "https://github.com/myy542/hirayacopstone/blob/master/registrar/js/view_enrollment.js"
click node_history "https://github.com/myy542/hirayacopstone/blob/master/student/js/enrollment_history.js"
click node_attendance "https://github.com/myy542/hirayacopstone/blob/master/teacher/js/student-attendance.js"
click node_student_academics "https://github.com/myy542/hirayacopstone/blob/master/student/js/grades.js"
click node_teacher_classes "https://github.com/myy542/hirayacopstone/blob/master/teacher/js/view-section.js"
click node_parent_academics "https://github.com/myy542/hirayacopstone/blob/master/parents/js/grades.js"
click node_admin_announcements "https://github.com/myy542/hirayacopstone/blob/master/admin/js/announcements.js"
click node_announcements_service "https://github.com/myy542/hirayacopstone/blob/master/js/announcements_service.js"
click node_parent_announcements "https://github.com/myy542/hirayacopstone/blob/master/parents/js/announcements.js"
click node_email_service "https://github.com/myy542/hirayacopstone/blob/master/js/email_service.js"
click node_auth "https://github.com/myy542/hirayacopstone/blob/master/auth/js/login.js"
click node_profiles "https://github.com/myy542/hirayacopstone/blob/master/teacher/js/profile.js"
click node_chatbot "https://github.com/myy542/hirayacopstone/blob/master/js/chatbot.js"
click node_supabase_client "https://github.com/myy542/hirayacopstone/blob/master/supabase/config.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_student_enroll,node_registrar_enroll,node_admin_enroll,node_enrollment_detail,node_history toneBlue
class node_attendance,node_student_academics,node_teacher_classes,node_parent_academics,node_supabase_db toneAmber
class node_admin_announcements,node_announcements_service,node_parent_announcements,node_email_service toneMint
class node_auth,node_profiles,node_chatbot,node_supabase_client toneRose
class node_student_actor,node_registrar_actor,node_admin_actor,node_teacher_actor,node_parent_actor,node_gmail toneIndigo
```

## Components

### Enrollment

- [Submit enrollment](https://github.com/myy542/hirayacopstone/blob/master/student/js/enrollment.js): `student/js/enrollment.js`
- [Review enrollment](https://github.com/myy542/hirayacopstone/blob/master/registrar/js/enrollments.js): `registrar/js/enrollments.js`
- [Admin enrollment](https://github.com/myy542/hirayacopstone/blob/master/admin/js/enrollments.js): `admin/js/enrollments.js`
- [Enrollment details](https://github.com/myy542/hirayacopstone/blob/master/registrar/js/view_enrollment.js): `registrar/js/view_enrollment.js`
- [Enrollment history](https://github.com/myy542/hirayacopstone/blob/master/student/js/enrollment_history.js): `student/js/enrollment_history.js`

### Academic services

- [Attendance](https://github.com/myy542/hirayacopstone/blob/master/teacher/js/student-attendance.js): `teacher/js/student-attendance.js`
- [Student academics](https://github.com/myy542/hirayacopstone/blob/master/student/js/grades.js): `student/js/grades.js`
- [Class management](https://github.com/myy542/hirayacopstone/blob/master/teacher/js/view-section.js): `teacher/js/view-section.js`
- [Parent academics](https://github.com/myy542/hirayacopstone/blob/master/parents/js/grades.js): `parents/js/grades.js`

### Communications

- [Manage announcements](https://github.com/myy542/hirayacopstone/blob/master/admin/js/announcements.js): `admin/js/announcements.js`
- [Announcements service](https://github.com/myy542/hirayacopstone/blob/master/js/announcements_service.js): `js/announcements_service.js`
- [Parent announcements](https://github.com/myy542/hirayacopstone/blob/master/parents/js/announcements.js): `parents/js/announcements.js`
- [Email notifications](https://github.com/myy542/hirayacopstone/blob/master/js/email_service.js): `js/email_service.js`

### Shared platform

- [Sign-in](https://github.com/myy542/hirayacopstone/blob/master/auth/js/login.js): `auth/js/login.js`
- [Role profiles](https://github.com/myy542/hirayacopstone/blob/master/teacher/js/profile.js): `teacher/js/profile.js`
- [Chatbot](https://github.com/myy542/hirayacopstone/blob/master/js/chatbot.js): `js/chatbot.js`
- [Supabase client](https://github.com/myy542/hirayacopstone/blob/master/supabase/config.js): `supabase/config.js`

### Other components

- **Student / applicant**
- **Registrar**
- **Administrator**
- **Teacher**
- **Parent**
- **Supabase data store**
- **Gmail compose**

## Connections

- Student / applicant → Submit enrollment: submits (evidence: `student/js/enrollment.js`)
- Submit enrollment → Supabase client: writes application (evidence: `student/js/enrollment.js`)
- Submit enrollment → Review enrollment: notifies registrar (evidence: `student/js/enrollment.js`)
- Registrar → Review enrollment: reviews (evidence: `registrar/js/enrollments.js`)
- Review enrollment → Supabase client: reads and updates (evidence: `registrar/js/enrollments.js`)
- Review enrollment → Email notifications: uses notifications (evidence: `registrar/js/enrollments.js`)
- Review enrollment → Enrollment details: opens details
- Administrator → Admin enrollment: manages
- Admin enrollment → Supabase client: reads and updates (evidence: `admin/js/enrollments.js`)
- Admin enrollment → Email notifications: uses notifications (evidence: `admin/js/enrollments.js`)
- Enrollment details → Supabase client: loads records (evidence: `registrar/js/view_enrollment.js`)
- Enrollment details → Email notifications: sends notice (evidence: `registrar/js/view_enrollment.js`)
- Student / applicant → Enrollment history: views history
- Enrollment history → Supabase client: loads history (evidence: `student/js/enrollment_history.js`)
- Teacher → Attendance: records attendance
- Attendance → Supabase client: reads and writes (evidence: `teacher/js/student-attendance.js`)
- Student / applicant → Student academics: views grades
- Parent → Parent academics: views grades
- Teacher → Class management: manages classes
- Administrator → Manage announcements: publishes
- Manage announcements → Announcements service: uses service (evidence: `admin/js/announcements.js`)
- Manage announcements → Email notifications: uses notifications (evidence: `admin/js/announcements.js`)
- Parent → Parent announcements: views notices
- Parent announcements → Announcements service: uses service (evidence: `parents/js/announcements.js`)
- Announcements service → Supabase client: syncs announcements (evidence: `js/announcements_service.js`)
- Review enrollment → Gmail compose: opens compose
- Student / applicant → Sign-in: signs in
- Sign-in → Supabase client: authenticates (evidence: `auth/js/login.js`)
- Teacher → Role profiles: manages profile
- Role profiles → Supabase client: reads and updates (evidence: `teacher/js/profile.js`)
- Supabase client → Supabase data store: connects (evidence: `supabase/config.js`)
