# eskinder-tk/eagles-uni architecture

> Architecture diagram of the GitHub repository eskinder-tk/eagles-uni, 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/eskinder-tk/eagles-uni
- Repository: https://github.com/eskinder-tk/eagles-uni

## Overview

This is a Next.js university admissions and student portal. Applicants submit admission details and can check application status; students and instructors sign in to access role-specific portal areas. Student workflows include course registration, enrolled-course review, grades/transcripts, and profile management. The sampled registration action shows eligibility checks and writes to enrollment/course records. Source excerpts and index references support the major routes and service relationships; several unsampled components are included as capabilities indicated by the file tree, with uncertain links omitted.

Main entry points: [`app/actions/index.ts`](https://github.com/eskinder-tk/eagles-uni/blob/main/app/actions/index.ts) (Server Actions), [`lib/session.ts`](https://github.com/eskinder-tk/eagles-uni/blob/main/lib/session.ts) (Session Service), [`db/index.ts`](https://github.com/eskinder-tk/eagles-uni/blob/main/db/index.ts) (Database Client), [`db/schema/index.ts`](https://github.com/eskinder-tk/eagles-uni/blob/main/db/schema/index.ts) (Academic Schema)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public Admissions"]
  node_admission_form["Admission Form<br/>[page.tsx]"]
  node_admission_status["Admission Status<br/>[page.tsx]"]
  node_admission_success["Admission Success<br/>[page.tsx]"]
end

subgraph group_portal["Student Portal"]
  node_login["Portal Login<br/>[page.tsx]"]
  node_dashboard["Role Dashboard<br/>[page.tsx]"]
  node_registration_page["Registration Page<br/>[page.tsx]"]
  node_registration_content["Course Registration"]
  node_enrolled_page["Enrolled Courses Page<br/>[page.tsx]"]
  node_enrolled_client["Enrolled Courses View"]
  node_grades_page["Grades Page<br/>[page.tsx]"]
  node_transcript["Transcript View"]
  node_profile_page["Profile Page<br/>[page.tsx]"]
  node_profile_overview["Student Overview"]
  node_profile_editor["Profile Editor"]
  node_instructor_view["Instructor Dashboard"]
  node_register_component["Portal Registration"]
end

subgraph group_services["Actions And Identity"]
  node_actions_index["Server Actions<br/>[index.ts]"]
  node_admissions_action["Admission Actions<br/>[admissions.ts]"]
  node_registration_action["Registration Logic"]
  node_student_action["Student Creation<br/>[createStudent.ts]"]
  node_instructor_action["Instructor Creation"]
  node_profile_action["Profile Updates"]
  node_blob_action["Image Upload"]
  node_session["Session Service<br/>[session.ts]"]
end

subgraph group_data["Academic Data"]
  node_db_client["Database Client<br/>[index.ts]"]
  node_schema["Academic Schema<br/>[index.ts]"]
  node_enrollment_schema[("Enrollment Records<br/>[enrollments.ts]")]
  node_student_schema[("Student Records<br/>[students.ts]")]
  node_instructor_schema[("Instructor Records<br/>[instructors.ts]")]
  node_student_courses_schema[("Student Courses<br/>[studentCourses.ts]")]
end

node_applicant(("Applicant"))
node_student(("Student"))

node_applicant -->|"submits application"| node_admission_form
node_admission_form -->|"uploads image"| node_actions_index
node_admission_form -->|"creates application"| node_actions_index
node_admission_form -->|"shows result"| node_admission_success
node_admission_status -->|"checks status"| node_actions_index
node_student -->|"signs in"| node_login
node_login -->|"authenticates"| node_actions_index
node_dashboard -->|"verifies account"| node_session
node_dashboard -->|"renders overview"| node_profile_overview
node_dashboard -->|"renders instructor view"| node_instructor_view
node_registration_page -->|"verifies account"| node_session
node_registration_page -->|"renders courses"| node_registration_content
node_registration_content -->|"submits selection"| node_actions_index
node_actions_index -->|"exports action"| node_registration_action
node_registration_action -->|"checks and writes"| node_db_client
node_registration_action -->|"uses records"| node_schema
node_enrolled_page -->|"verifies account"| node_session
node_enrolled_page -->|"renders courses"| node_enrolled_client
node_enrolled_page -->|"loads course data"| node_db_client
node_grades_page -->|"verifies account"| node_session
node_grades_page -->|"renders transcript"| node_transcript
node_grades_page -->|"loads grade data"| node_db_client
node_profile_page -->|"verifies account"| node_session
node_profile_page -->|"renders editor"| node_profile_editor
node_profile_editor -->|"updates details"| node_actions_index
node_actions_index -->|"exports action"| node_profile_action
node_profile_action -->|"updates records"| node_db_client
node_profile_action -->|"uploads image"| node_blob_action
node_instructor_action -->|"creates instructor"| node_db_client
node_instructor_action -->|"uses session service"| node_session
node_student_action -->|"creates student"| node_db_client
node_db_client -->|"configures schema"| node_schema
node_session -->|"reads and writes"| node_db_client
node_session -->|"uses session records"| node_schema
node_schema -->|"exports records"| node_enrollment_schema
node_schema -->|"exports records"| node_student_schema
node_schema -->|"exports records"| node_instructor_schema
node_schema -->|"exports records"| node_student_courses_schema
node_enrollment_schema -->|"references students"| node_student_schema
node_student_schema -->|"references courses"| node_student_courses_schema

click node_admission_form "https://github.com/eskinder-tk/eagles-uni/blob/main/app/Admission/page.tsx"
click node_admission_status "https://github.com/eskinder-tk/eagles-uni/blob/main/app/Admission/Status/page.tsx"
click node_admission_success "https://github.com/eskinder-tk/eagles-uni/blob/main/app/Admission/AdmissionSuccess/page.tsx"
click node_login "https://github.com/eskinder-tk/eagles-uni/blob/main/app/Portal/page.tsx"
click node_dashboard "https://github.com/eskinder-tk/eagles-uni/blob/main/app/Portal/Dashboard/page.tsx"
click node_registration_page "https://github.com/eskinder-tk/eagles-uni/blob/main/app/Portal/Register/Courses/page.tsx"
click node_registration_content "https://github.com/eskinder-tk/eagles-uni/blob/main/app/Components/CourseRegistrationContent.tsx"
click node_enrolled_page "https://github.com/eskinder-tk/eagles-uni/blob/main/app/Portal/Enrolled_Courses/page.tsx"
click node_enrolled_client "https://github.com/eskinder-tk/eagles-uni/blob/main/app/Components/EnrolledCoursesClient.tsx"
click node_grades_page "https://github.com/eskinder-tk/eagles-uni/blob/main/app/Portal/Grades/page.tsx"
click node_transcript "https://github.com/eskinder-tk/eagles-uni/blob/main/app/Components/TransciptClient.tsx"
click node_profile_page "https://github.com/eskinder-tk/eagles-uni/blob/main/app/Portal/Profile/page.tsx"
click node_profile_overview "https://github.com/eskinder-tk/eagles-uni/blob/main/app/Components/StudentProfileOverview.tsx"
click node_profile_editor "https://github.com/eskinder-tk/eagles-uni/blob/main/app/Components/StudentProfileSettingEditor.tsx"
click node_instructor_view "https://github.com/eskinder-tk/eagles-uni/blob/main/app/Components/InstructorDashboardClient.tsx"
click node_register_component "https://github.com/eskinder-tk/eagles-uni/blob/main/app/Components/RegisterComponent.tsx"
click node_actions_index "https://github.com/eskinder-tk/eagles-uni/blob/main/app/actions/index.ts"
click node_admissions_action "https://github.com/eskinder-tk/eagles-uni/blob/main/app/actions/admissions.ts"
click node_registration_action "https://github.com/eskinder-tk/eagles-uni/blob/main/app/actions/handleRegistration.ts"
click node_student_action "https://github.com/eskinder-tk/eagles-uni/blob/main/app/actions/createStudent.ts"
click node_instructor_action "https://github.com/eskinder-tk/eagles-uni/blob/main/app/actions/createInstructor.ts"
click node_profile_action "https://github.com/eskinder-tk/eagles-uni/blob/main/app/actions/updateStudentProfile.ts"
click node_blob_action "https://github.com/eskinder-tk/eagles-uni/blob/main/app/actions/uploadToVercelBlob.ts"
click node_session "https://github.com/eskinder-tk/eagles-uni/blob/main/lib/session.ts"
click node_db_client "https://github.com/eskinder-tk/eagles-uni/blob/main/db/index.ts"
click node_schema "https://github.com/eskinder-tk/eagles-uni/blob/main/db/schema/index.ts"
click node_enrollment_schema "https://github.com/eskinder-tk/eagles-uni/blob/main/db/schema/enrollments.ts"
click node_student_schema "https://github.com/eskinder-tk/eagles-uni/blob/main/db/schema/students.ts"
click node_instructor_schema "https://github.com/eskinder-tk/eagles-uni/blob/main/db/schema/instructors.ts"
click node_student_courses_schema "https://github.com/eskinder-tk/eagles-uni/blob/main/db/schema/studentCourses.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_admission_form,node_admission_status,node_admission_success toneBlue
class node_login,node_dashboard,node_registration_page,node_registration_content,node_enrolled_page,node_enrolled_client,node_grades_page,node_transcript,node_profile_page,node_profile_overview,node_profile_editor,node_instructor_view,node_register_component toneAmber
class node_actions_index,node_admissions_action,node_registration_action,node_student_action,node_instructor_action,node_profile_action,node_blob_action,node_session toneMint
class node_db_client,node_schema,node_enrollment_schema,node_student_schema,node_instructor_schema,node_student_courses_schema toneRose
class node_applicant,node_student toneIndigo
```

## Components

### Public Admissions

- [Admission Form](https://github.com/eskinder-tk/eagles-uni/blob/main/app/Admission/page.tsx): `app/Admission/page.tsx`
- [Admission Status](https://github.com/eskinder-tk/eagles-uni/blob/main/app/Admission/Status/page.tsx): `app/Admission/Status/page.tsx`
- [Admission Success](https://github.com/eskinder-tk/eagles-uni/blob/main/app/Admission/AdmissionSuccess/page.tsx): `app/Admission/AdmissionSuccess/page.tsx`

### Student Portal

- [Portal Login](https://github.com/eskinder-tk/eagles-uni/blob/main/app/Portal/page.tsx): `app/Portal/page.tsx`
- [Role Dashboard](https://github.com/eskinder-tk/eagles-uni/blob/main/app/Portal/Dashboard/page.tsx): `app/Portal/Dashboard/page.tsx`
- [Registration Page](https://github.com/eskinder-tk/eagles-uni/blob/main/app/Portal/Register/Courses/page.tsx): `app/Portal/Register/Courses/page.tsx`
- [Course Registration](https://github.com/eskinder-tk/eagles-uni/blob/main/app/Components/CourseRegistrationContent.tsx): `app/Components/CourseRegistrationContent.tsx`
- [Enrolled Courses Page](https://github.com/eskinder-tk/eagles-uni/blob/main/app/Portal/Enrolled_Courses/page.tsx): `app/Portal/Enrolled_Courses/page.tsx`
- [Enrolled Courses View](https://github.com/eskinder-tk/eagles-uni/blob/main/app/Components/EnrolledCoursesClient.tsx): `app/Components/EnrolledCoursesClient.tsx`
- [Grades Page](https://github.com/eskinder-tk/eagles-uni/blob/main/app/Portal/Grades/page.tsx): `app/Portal/Grades/page.tsx`
- [Transcript View](https://github.com/eskinder-tk/eagles-uni/blob/main/app/Components/TransciptClient.tsx): `app/Components/TransciptClient.tsx`
- [Profile Page](https://github.com/eskinder-tk/eagles-uni/blob/main/app/Portal/Profile/page.tsx): `app/Portal/Profile/page.tsx`
- [Student Overview](https://github.com/eskinder-tk/eagles-uni/blob/main/app/Components/StudentProfileOverview.tsx): `app/Components/StudentProfileOverview.tsx`
- [Profile Editor](https://github.com/eskinder-tk/eagles-uni/blob/main/app/Components/StudentProfileSettingEditor.tsx): `app/Components/StudentProfileSettingEditor.tsx`
- [Instructor Dashboard](https://github.com/eskinder-tk/eagles-uni/blob/main/app/Components/InstructorDashboardClient.tsx): `app/Components/InstructorDashboardClient.tsx`
- [Portal Registration](https://github.com/eskinder-tk/eagles-uni/blob/main/app/Components/RegisterComponent.tsx): `app/Components/RegisterComponent.tsx`

### Actions And Identity

- [Server Actions](https://github.com/eskinder-tk/eagles-uni/blob/main/app/actions/index.ts): `app/actions/index.ts`
- [Admission Actions](https://github.com/eskinder-tk/eagles-uni/blob/main/app/actions/admissions.ts): `app/actions/admissions.ts`
- [Registration Logic](https://github.com/eskinder-tk/eagles-uni/blob/main/app/actions/handleRegistration.ts): `app/actions/handleRegistration.ts`
- [Student Creation](https://github.com/eskinder-tk/eagles-uni/blob/main/app/actions/createStudent.ts): `app/actions/createStudent.ts`
- [Instructor Creation](https://github.com/eskinder-tk/eagles-uni/blob/main/app/actions/createInstructor.ts): `app/actions/createInstructor.ts`
- [Profile Updates](https://github.com/eskinder-tk/eagles-uni/blob/main/app/actions/updateStudentProfile.ts): `app/actions/updateStudentProfile.ts`
- [Image Upload](https://github.com/eskinder-tk/eagles-uni/blob/main/app/actions/uploadToVercelBlob.ts): `app/actions/uploadToVercelBlob.ts`
- [Session Service](https://github.com/eskinder-tk/eagles-uni/blob/main/lib/session.ts): `lib/session.ts`

### Academic Data

- [Database Client](https://github.com/eskinder-tk/eagles-uni/blob/main/db/index.ts): `db/index.ts`
- [Academic Schema](https://github.com/eskinder-tk/eagles-uni/blob/main/db/schema/index.ts): `db/schema/index.ts`
- [Enrollment Records](https://github.com/eskinder-tk/eagles-uni/blob/main/db/schema/enrollments.ts): `db/schema/enrollments.ts`
- [Student Records](https://github.com/eskinder-tk/eagles-uni/blob/main/db/schema/students.ts): `db/schema/students.ts`
- [Instructor Records](https://github.com/eskinder-tk/eagles-uni/blob/main/db/schema/instructors.ts): `db/schema/instructors.ts`
- [Student Courses](https://github.com/eskinder-tk/eagles-uni/blob/main/db/schema/studentCourses.ts): `db/schema/studentCourses.ts`

### Other components

- **Applicant**
- **Student**

## Connections

- Applicant → Admission Form: submits application (evidence: `app/Admission/page.tsx`)
- Admission Form → Server Actions: uploads image (evidence: `app/Admission/page.tsx`)
- Admission Form → Server Actions: creates application (evidence: `app/Admission/page.tsx`)
- Admission Form → Admission Success: shows result (evidence: `app/Admission/page.tsx`)
- Admission Status → Server Actions: checks status (evidence: `app/Admission/Status/page.tsx`)
- Student → Portal Login: signs in (evidence: `app/Portal/page.tsx`)
- Portal Login → Server Actions: authenticates (evidence: `app/Portal/page.tsx`)
- Role Dashboard → Session Service: verifies account (evidence: `app/Portal/Dashboard/page.tsx`)
- Role Dashboard → Student Overview: renders overview (evidence: `app/Portal/Dashboard/page.tsx`)
- Role Dashboard → Instructor Dashboard: renders instructor view (evidence: `app/Portal/Dashboard/page.tsx`)
- Registration Page → Session Service: verifies account (evidence: `app/Portal/Register/Courses/page.tsx`)
- Registration Page → Course Registration: renders courses (evidence: `app/Portal/Register/Courses/page.tsx`)
- Course Registration → Server Actions: submits selection (evidence: `app/Components/CourseRegistrationContent.tsx`)
- Server Actions → Registration Logic: exports action (evidence: `app/actions/index.ts`)
- Registration Logic → Database Client: checks and writes (evidence: `app/actions/handleRegistration.ts`)
- Registration Logic → Academic Schema: uses records (evidence: `app/actions/handleRegistration.ts`)
- Enrolled Courses Page → Session Service: verifies account (evidence: `app/Portal/Enrolled_Courses/page.tsx`)
- Enrolled Courses Page → Enrolled Courses View: renders courses (evidence: `app/Portal/Enrolled_Courses/page.tsx`)
- Enrolled Courses Page → Database Client: loads course data (evidence: `app/Portal/Enrolled_Courses/page.tsx`)
- Grades Page → Session Service: verifies account (evidence: `app/Portal/Grades/page.tsx`)
- Grades Page → Transcript View: renders transcript (evidence: `app/Portal/Grades/page.tsx`)
- Grades Page → Database Client: loads grade data (evidence: `app/Portal/Grades/page.tsx`)
- Profile Page → Session Service: verifies account (evidence: `app/Portal/Profile/page.tsx`)
- Profile Page → Profile Editor: renders editor (evidence: `app/Portal/Profile/page.tsx`)
- Profile Editor → Server Actions: updates details (evidence: `app/Portal/Profile/page.tsx`)
- Server Actions → Profile Updates: exports action (evidence: `app/actions/index.ts`)
- Profile Updates → Database Client: updates records (evidence: `app/actions/updateStudentProfile.ts`)
- Profile Updates → Image Upload: uploads image (evidence: `app/actions/updateStudentProfile.ts`)
- Instructor Creation → Database Client: creates instructor (evidence: `app/actions/createInstructor.ts`)
- Instructor Creation → Session Service: uses session service (evidence: `app/actions/createInstructor.ts`)
- Student Creation → Database Client: creates student (evidence: `app/actions/createStudent.ts`)
- Database Client → Academic Schema: configures schema (evidence: `db/index.ts`)
- Session Service → Database Client: reads and writes (evidence: `lib/session.ts`)
- Session Service → Academic Schema: uses session records (evidence: `lib/session.ts`)
- Academic Schema → Enrollment Records: exports records (evidence: `db/schema/index.ts`)
- Academic Schema → Student Records: exports records (evidence: `db/schema/index.ts`)
- Academic Schema → Instructor Records: exports records (evidence: `db/schema/index.ts`)
- Academic Schema → Student Courses: exports records (evidence: `db/schema/index.ts`)
- Enrollment Records → Student Records: references students (evidence: `db/schema/enrollments.ts`)
- Student Records → Student Courses: references courses (evidence: `db/schema/students.ts`)
