# mrchon0802/kienenglishcenter architecture

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

- Interactive diagram: https://gitdiagram.com/mrchon0802/kienenglishcenter
- Repository: https://github.com/mrchon0802/kienenglishcenter

## Overview

This is a Next.js learning-center management portal with admin, teacher, student, and parent areas. The visible workflows cover managing enrollment and schedules, authoring questions and assignments, student quiz attempts, and parent-facing progress and tuition summaries. The repository tree also shows class attendance, lesson planning, grading, reports, and tuition administration. Several domain routes and data modules were not sampled; those capabilities are represented at their existing route-directory paths, without asserting unverified calls or storage behavior.

Main entry points: [`src/app/admin/question-bank/actions.ts`](https://github.com/mrchon0802/kienenglishcenter/blob/main/src/app/admin/question-bank/actions.ts) (Question Actions), [`src/lib/action-auth.ts`](https://github.com/mrchon0802/kienenglishcenter/blob/main/src/lib/action-auth.ts) (Action Authorization), [`src/components/quiz/QuizRunner/QuizRunner.tsx`](https://github.com/mrchon0802/kienenglishcenter/blob/main/src/components/quiz/QuizRunner/QuizRunner.tsx) (Quiz Runner), [`src/app/admin/enrollments/actions.ts`](https://github.com/mrchon0802/kienenglishcenter/blob/main/src/app/admin/enrollments/actions.ts) (Enrollment Actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portals["Role Portals"]
  node_admin["Admin Portal"]
  node_teacher["Teacher Portal"]
  node_student["Student Portal"]
  node_parent["Parent Portal"]
  node_parent_home["Parent Dashboard<br/>[page.tsx]"]
end

subgraph group_academics["Teaching and Assessment"]
  node_curriculum["Curriculum and Courses"]
  node_lesson_plans["Lesson Plans"]
  node_question_bank["Question Bank"]
  node_question_editor["Question Editor<br/>[QuestionEditor.tsx]"]
  node_assignments["Assignments"]
  node_quiz_runner["Quiz Runner<br/>[QuizRunner.tsx]"]
  node_grading["Grading<br/>[grading.ts]"]
  node_assessment["Assessments"]
end

subgraph group_operations["Center Operations"]
  node_enrollments["Enrollments"]
  node_schedule["Schedule Management"]
  node_classes["Classes and Attendance"]
  node_tuition["Tuition Management"]
  node_student_records["Student Records"]
  node_reports["Reports"]
end

subgraph group_shared["Shared Runtime"]
  node_auth["Action Authorization<br/>[action-auth.ts]"]
  node_identity["Demo Identity<br/>[current-user.ts]"]
  node_enrollment_action["Enrollment Actions<br/>[actions.ts]"]
  node_schedule_action["Schedule Actions<br/>[actions.ts]"]
  node_question_action["Question Actions<br/>[actions.ts]"]
  node_student_action["Student Assignment Actions<br/>[actions.ts]"]
end

node_enrollments -->|"invokes"| node_enrollment_action
node_enrollment_action -->|"checks access"| node_auth
node_schedule -->|"invokes"| node_schedule_action
node_question_editor -->|"saves questions"| node_question_action
node_question_action -->|"checks access"| node_auth
node_quiz_runner -->|"submits attempt"| node_student_action
node_quiz_runner -.-> node_grading
node_auth -->|"gets current user"| node_identity
node_parent_home -->|"gets student ID"| node_identity
node_question_action -.-> node_question_bank

click node_admin "https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/admin"
click node_teacher "https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/teacher"
click node_student "https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/student"
click node_parent "https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/parent"
click node_enrollments "https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/admin/enrollments"
click node_schedule "https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/admin/schedule"
click node_classes "https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/admin/classes"
click node_tuition "https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/admin/tuition"
click node_student_records "https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/admin/students"
click node_reports "https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/admin/reports"
click node_curriculum "https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/admin/curriculum"
click node_lesson_plans "https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/admin/lesson-plans"
click node_question_bank "https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/admin/question-bank"
click node_question_editor "https://github.com/mrchon0802/kienenglishcenter/blob/main/src/components/question-editor/QuestionEditor/QuestionEditor.tsx"
click node_assignments "https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/teacher/assignments"
click node_quiz_runner "https://github.com/mrchon0802/kienenglishcenter/blob/main/src/components/quiz/QuizRunner/QuizRunner.tsx"
click node_grading "https://github.com/mrchon0802/kienenglishcenter/blob/main/src/lib/grading.ts"
click node_assessment "https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/teacher/assessments"
click node_auth "https://github.com/mrchon0802/kienenglishcenter/blob/main/src/lib/action-auth.ts"
click node_identity "https://github.com/mrchon0802/kienenglishcenter/blob/main/src/lib/current-user.ts"
click node_enrollment_action "https://github.com/mrchon0802/kienenglishcenter/blob/main/src/app/admin/enrollments/actions.ts"
click node_schedule_action "https://github.com/mrchon0802/kienenglishcenter/blob/main/src/app/admin/schedule/actions.ts"
click node_question_action "https://github.com/mrchon0802/kienenglishcenter/blob/main/src/app/admin/question-bank/actions.ts"
click node_student_action "https://github.com/mrchon0802/kienenglishcenter/blob/main/src/app/student/assignments/actions.ts"
click node_parent_home "https://github.com/mrchon0802/kienenglishcenter/blob/main/src/app/parent/page.tsx"

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_admin,node_teacher,node_student,node_parent,node_parent_home toneBlue
class node_curriculum,node_lesson_plans,node_question_bank,node_question_editor,node_assignments,node_quiz_runner,node_grading,node_assessment toneAmber
class node_enrollments,node_schedule,node_classes,node_tuition,node_student_records,node_reports toneMint
class node_auth,node_identity,node_enrollment_action,node_schedule_action,node_question_action,node_student_action toneRose
```

## Components

### Role Portals

- [Admin Portal](https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/admin): `src/app/admin`
- [Teacher Portal](https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/teacher): `src/app/teacher`
- [Student Portal](https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/student): `src/app/student`
- [Parent Portal](https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/parent): `src/app/parent`
- [Parent Dashboard](https://github.com/mrchon0802/kienenglishcenter/blob/main/src/app/parent/page.tsx): `src/app/parent/page.tsx`

### Teaching and Assessment

- [Curriculum and Courses](https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/admin/curriculum): `src/app/admin/curriculum`
- [Lesson Plans](https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/admin/lesson-plans): `src/app/admin/lesson-plans`
- [Question Bank](https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/admin/question-bank): `src/app/admin/question-bank`
- [Question Editor](https://github.com/mrchon0802/kienenglishcenter/blob/main/src/components/question-editor/QuestionEditor/QuestionEditor.tsx): `src/components/question-editor/QuestionEditor/QuestionEditor.tsx`
- [Assignments](https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/teacher/assignments): `src/app/teacher/assignments`
- [Quiz Runner](https://github.com/mrchon0802/kienenglishcenter/blob/main/src/components/quiz/QuizRunner/QuizRunner.tsx): `src/components/quiz/QuizRunner/QuizRunner.tsx`
- [Grading](https://github.com/mrchon0802/kienenglishcenter/blob/main/src/lib/grading.ts): `src/lib/grading.ts`
- [Assessments](https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/teacher/assessments): `src/app/teacher/assessments`

### Center Operations

- [Enrollments](https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/admin/enrollments): `src/app/admin/enrollments`
- [Schedule Management](https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/admin/schedule): `src/app/admin/schedule`
- [Classes and Attendance](https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/admin/classes): `src/app/admin/classes`
- [Tuition Management](https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/admin/tuition): `src/app/admin/tuition`
- [Student Records](https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/admin/students): `src/app/admin/students`
- [Reports](https://github.com/mrchon0802/kienenglishcenter/tree/main/src/app/admin/reports): `src/app/admin/reports`

### Shared Runtime

- [Action Authorization](https://github.com/mrchon0802/kienenglishcenter/blob/main/src/lib/action-auth.ts): `src/lib/action-auth.ts`
- [Demo Identity](https://github.com/mrchon0802/kienenglishcenter/blob/main/src/lib/current-user.ts): `src/lib/current-user.ts`
- [Enrollment Actions](https://github.com/mrchon0802/kienenglishcenter/blob/main/src/app/admin/enrollments/actions.ts): `src/app/admin/enrollments/actions.ts`
- [Schedule Actions](https://github.com/mrchon0802/kienenglishcenter/blob/main/src/app/admin/schedule/actions.ts): `src/app/admin/schedule/actions.ts`
- [Question Actions](https://github.com/mrchon0802/kienenglishcenter/blob/main/src/app/admin/question-bank/actions.ts): `src/app/admin/question-bank/actions.ts`
- [Student Assignment Actions](https://github.com/mrchon0802/kienenglishcenter/blob/main/src/app/student/assignments/actions.ts): `src/app/student/assignments/actions.ts`

## Connections

- Enrollments → Enrollment Actions: invokes (evidence: `src/app/admin/enrollments/_components/EnrollmentWorkspace.tsx`)
- Enrollment Actions → Action Authorization: checks access (evidence: `src/app/admin/enrollments/actions.ts`)
- Schedule Management → Schedule Actions: invokes (evidence: `src/app/admin/schedule/ScheduleManager.tsx`)
- Question Editor → Question Actions: saves questions (evidence: `src/components/question-editor/QuestionEditor/QuestionEditor.tsx`)
- Question Actions → Action Authorization: checks access (evidence: `src/app/admin/question-bank/actions.ts`)
- Quiz Runner → Student Assignment Actions: submits attempt (evidence: `src/components/quiz/QuizRunner/QuizRunner.tsx`)
- Quiz Runner → Grading
- Action Authorization → Demo Identity: gets current user (evidence: `src/lib/action-auth.ts`)
- Parent Dashboard → Demo Identity: gets student ID (evidence: `src/app/parent/page.tsx`)
- Question Actions → Question Bank
