# hdsk1234/math-log architecture

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

- Interactive diagram: https://gitdiagram.com/hdsk1234/math-log
- Repository: https://github.com/hdsk1234/math-log

## Overview

Math Log is a tutoring-management app for teachers and students. Teachers sign in or students verify a PIN, then use student-management and individual-student views to record homework and lessons, review learning progress, manage textbooks, and view rankings or mock-exam analysis. Student and teacher records are stored through Firebase; image review and report/export features support the dashboard workflow. The graph follows the routes and imports shown in the excerpts and SOURCE INDEX; several component capabilities are documented by references but their internals were not sampled.

Main entry points: [`App.tsx`](https://github.com/hdsk1234/math-log/blob/main/App.tsx) (App routing), [`pages/StudentManagementDashboard.tsx`](https://github.com/hdsk1234/math-log/blob/main/pages/StudentManagementDashboard.tsx) (Student management), [`pages/StudentDetailDashboard.tsx`](https://github.com/hdsk1234/math-log/blob/main/pages/StudentDetailDashboard.tsx) (Student dashboard), [`components/QuickUpdateDashboard.tsx`](https://github.com/hdsk1234/math-log/blob/main/components/QuickUpdateDashboard.tsx) (Quick updates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Access and routing"]
  node_app["App routing<br/>[App.tsx]"]
  node_login["Sign-in<br/>[Login.tsx]"]
end

subgraph group_management["Teacher management"]
  node_management_page["Student management"]
  node_student_list["Student roster<br/>[StudentList.tsx]"]
  node_quick_update["Quick updates"]
  node_admin["Admin dashboard<br/>[AdminDashboard.tsx]"]
end

subgraph group_learning["Student learning"]
  node_detail["Student dashboard"]
  node_homework_calendar["Homework calendar"]
  node_lesson_table["Lesson log<br/>[LessonTable.tsx]"]
  node_textbook["Textbook tracker"]
  node_weak_points["Weak points<br/>[WeakPointList.tsx]"]
  node_homework_images["Homework images"]
  node_quick_review["Image review"]
end

subgraph group_analytics["Reports and analytics"]
  node_admin_stats["Student statistics"]
  node_rankings_page["Rankings page<br/>[RankingsPage.tsx]"]
  node_rankings["Homework rankings"]
  node_mock_stats["Mock exam analysis<br/>[MockExamStats.tsx]"]
  node_mock_data["Exam parsing and metrics<br/>[mockExamData.ts]"]
  node_export["Dashboard export"]
end

subgraph group_services["Data and integrations"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_mock_store["Exam data store<br/>[mockExamStore.ts]"]
  node_firestore[("Cloud Firestore")]
  node_firebase["Firebase setup<br/>[firebase.ts]"]
  node_kakao_images["Kakao image lookup<br/>[kakaoImages.ts]"]
end

node_teacher(("Teacher"))
node_student(("Student"))

node_teacher -->|"opens app"| node_app
node_student -->|"opens app"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_management_page
node_app -->|"routes to"| node_detail
node_app -->|"routes to"| node_admin
node_app -->|"routes to"| node_rankings_page
node_login -->|"signs in"| node_auth
node_app -->|"logs out"| node_auth
node_app -->|"verifies PIN"| node_firestore
node_management_page -->|"renders"| node_student_list
node_management_page -->|"renders"| node_quick_update
node_management_page -->|"renders"| node_homework_images
node_management_page -->|"renders"| node_rankings
node_management_page -->|"renders"| node_mock_stats
node_management_page -->|"opens"| node_export
node_student_list -->|"reads and writes"| node_firestore
node_quick_update -->|"updates records"| node_firestore
node_quick_update -->|"renders"| node_quick_review
node_admin -->|"renders"| node_admin_stats
node_admin -->|"loads data"| node_firestore
node_detail -->|"renders"| node_homework_calendar
node_detail -->|"renders"| node_lesson_table
node_detail -->|"renders"| node_textbook
node_detail -->|"renders"| node_weak_points
node_detail -->|"renders"| node_homework_images
node_detail -->|"renders"| node_rankings
node_rankings_page -->|"renders"| node_rankings
node_mock_stats -->|"parses and calculates"| node_mock_data
node_mock_stats -->|"stores exam data"| node_mock_store
node_mock_store -->|"persists data"| node_firestore
node_auth -->|"uses auth client"| node_firebase
node_firebase -->|"initializes"| node_firestore
node_homework_images -->|"uses services"| node_firebase
node_quick_review -->|"looks up images"| node_kakao_images

click node_app "https://github.com/hdsk1234/math-log/blob/main/App.tsx"
click node_login "https://github.com/hdsk1234/math-log/blob/main/components/Login.tsx"
click node_auth "https://github.com/hdsk1234/math-log/blob/main/lib/auth.ts"
click node_management_page "https://github.com/hdsk1234/math-log/blob/main/pages/StudentManagementDashboard.tsx"
click node_student_list "https://github.com/hdsk1234/math-log/blob/main/components/StudentList.tsx"
click node_quick_update "https://github.com/hdsk1234/math-log/blob/main/components/QuickUpdateDashboard.tsx"
click node_admin "https://github.com/hdsk1234/math-log/blob/main/pages/AdminDashboard.tsx"
click node_admin_stats "https://github.com/hdsk1234/math-log/blob/main/components/AdminStudentStats.tsx"
click node_detail "https://github.com/hdsk1234/math-log/blob/main/pages/StudentDetailDashboard.tsx"
click node_homework_calendar "https://github.com/hdsk1234/math-log/blob/main/components/HomeworkCalendar.tsx"
click node_lesson_table "https://github.com/hdsk1234/math-log/blob/main/components/LessonTable.tsx"
click node_textbook "https://github.com/hdsk1234/math-log/blob/main/components/TextbookTracker.tsx"
click node_weak_points "https://github.com/hdsk1234/math-log/blob/main/components/WeakPointList.tsx"
click node_homework_images "https://github.com/hdsk1234/math-log/blob/main/components/HomeworkImageFeed.tsx"
click node_quick_review "https://github.com/hdsk1234/math-log/blob/main/components/QuickImageReview.tsx"
click node_rankings_page "https://github.com/hdsk1234/math-log/blob/main/pages/RankingsPage.tsx"
click node_rankings "https://github.com/hdsk1234/math-log/blob/main/components/StudentRankings.tsx"
click node_mock_stats "https://github.com/hdsk1234/math-log/blob/main/components/MockExamStats.tsx"
click node_mock_data "https://github.com/hdsk1234/math-log/blob/main/lib/mockExamData.ts"
click node_mock_store "https://github.com/hdsk1234/math-log/blob/main/lib/mockExamStore.ts"
click node_export "https://github.com/hdsk1234/math-log/blob/main/components/DashboardExportModal.tsx"
click node_firebase "https://github.com/hdsk1234/math-log/blob/main/lib/firebase.ts"
click node_kakao_images "https://github.com/hdsk1234/math-log/blob/main/lib/kakaoImages.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_app,node_login toneBlue
class node_management_page,node_student_list,node_quick_update,node_admin toneAmber
class node_detail,node_homework_calendar,node_lesson_table,node_textbook,node_weak_points,node_homework_images,node_quick_review toneMint
class node_admin_stats,node_rankings_page,node_rankings,node_mock_stats,node_mock_data,node_export toneRose
class node_auth,node_mock_store,node_firestore,node_firebase,node_kakao_images,node_teacher,node_student toneIndigo
```

## Components

### Access and routing

- [App routing](https://github.com/hdsk1234/math-log/blob/main/App.tsx): `App.tsx`
- [Sign-in](https://github.com/hdsk1234/math-log/blob/main/components/Login.tsx): `components/Login.tsx`

### Teacher management

- [Student management](https://github.com/hdsk1234/math-log/blob/main/pages/StudentManagementDashboard.tsx): `pages/StudentManagementDashboard.tsx`
- [Student roster](https://github.com/hdsk1234/math-log/blob/main/components/StudentList.tsx): `components/StudentList.tsx`
- [Quick updates](https://github.com/hdsk1234/math-log/blob/main/components/QuickUpdateDashboard.tsx): `components/QuickUpdateDashboard.tsx`
- [Admin dashboard](https://github.com/hdsk1234/math-log/blob/main/pages/AdminDashboard.tsx): `pages/AdminDashboard.tsx`

### Student learning

- [Student dashboard](https://github.com/hdsk1234/math-log/blob/main/pages/StudentDetailDashboard.tsx): `pages/StudentDetailDashboard.tsx`
- [Homework calendar](https://github.com/hdsk1234/math-log/blob/main/components/HomeworkCalendar.tsx): `components/HomeworkCalendar.tsx`
- [Lesson log](https://github.com/hdsk1234/math-log/blob/main/components/LessonTable.tsx): `components/LessonTable.tsx`
- [Textbook tracker](https://github.com/hdsk1234/math-log/blob/main/components/TextbookTracker.tsx): `components/TextbookTracker.tsx`
- [Weak points](https://github.com/hdsk1234/math-log/blob/main/components/WeakPointList.tsx): `components/WeakPointList.tsx`
- [Homework images](https://github.com/hdsk1234/math-log/blob/main/components/HomeworkImageFeed.tsx): `components/HomeworkImageFeed.tsx`
- [Image review](https://github.com/hdsk1234/math-log/blob/main/components/QuickImageReview.tsx): `components/QuickImageReview.tsx`

### Reports and analytics

- [Student statistics](https://github.com/hdsk1234/math-log/blob/main/components/AdminStudentStats.tsx): `components/AdminStudentStats.tsx`
- [Rankings page](https://github.com/hdsk1234/math-log/blob/main/pages/RankingsPage.tsx): `pages/RankingsPage.tsx`
- [Homework rankings](https://github.com/hdsk1234/math-log/blob/main/components/StudentRankings.tsx): `components/StudentRankings.tsx`
- [Mock exam analysis](https://github.com/hdsk1234/math-log/blob/main/components/MockExamStats.tsx): `components/MockExamStats.tsx`
- [Exam parsing and metrics](https://github.com/hdsk1234/math-log/blob/main/lib/mockExamData.ts): `lib/mockExamData.ts`
- [Dashboard export](https://github.com/hdsk1234/math-log/blob/main/components/DashboardExportModal.tsx): `components/DashboardExportModal.tsx`

### Data and integrations

- [Authentication](https://github.com/hdsk1234/math-log/blob/main/lib/auth.ts): `lib/auth.ts`
- [Exam data store](https://github.com/hdsk1234/math-log/blob/main/lib/mockExamStore.ts): `lib/mockExamStore.ts`
- **Cloud Firestore**
- [Firebase setup](https://github.com/hdsk1234/math-log/blob/main/lib/firebase.ts): `lib/firebase.ts`
- [Kakao image lookup](https://github.com/hdsk1234/math-log/blob/main/lib/kakaoImages.ts): `lib/kakaoImages.ts`

### Other components

- **Teacher**
- **Student**

## Connections

- Teacher → App routing: opens app (evidence: `App.tsx`)
- Student → App routing: opens app (evidence: `App.tsx`)
- App routing → Sign-in: routes to (evidence: `App.tsx`)
- App routing → Student management: routes to (evidence: `App.tsx`)
- App routing → Student dashboard: routes to (evidence: `App.tsx`)
- App routing → Admin dashboard: routes to (evidence: `App.tsx`)
- App routing → Rankings page: routes to (evidence: `App.tsx`)
- Sign-in → Authentication: signs in (evidence: `components/Login.tsx`)
- App routing → Authentication: logs out (evidence: `App.tsx`)
- App routing → Cloud Firestore: verifies PIN (evidence: `App.tsx`)
- Student management → Student roster: renders (evidence: `pages/StudentManagementDashboard.tsx`)
- Student management → Quick updates: renders (evidence: `pages/StudentManagementDashboard.tsx`)
- Student management → Homework images: renders (evidence: `pages/StudentManagementDashboard.tsx`)
- Student management → Homework rankings: renders (evidence: `pages/StudentManagementDashboard.tsx`)
- Student management → Mock exam analysis: renders (evidence: `pages/StudentManagementDashboard.tsx`)
- Student management → Dashboard export: opens (evidence: `pages/StudentManagementDashboard.tsx`)
- Student roster → Cloud Firestore: reads and writes (evidence: `components/StudentList.tsx`)
- Quick updates → Cloud Firestore: updates records (evidence: `components/QuickUpdateDashboard.tsx`)
- Quick updates → Image review: renders (evidence: `components/QuickUpdateDashboard.tsx`)
- Admin dashboard → Student statistics: renders (evidence: `pages/AdminDashboard.tsx`)
- Admin dashboard → Cloud Firestore: loads data (evidence: `pages/AdminDashboard.tsx`)
- Student dashboard → Homework calendar: renders (evidence: `pages/StudentDetailDashboard.tsx`)
- Student dashboard → Lesson log: renders (evidence: `pages/StudentDetailDashboard.tsx`)
- Student dashboard → Textbook tracker: renders (evidence: `pages/StudentDetailDashboard.tsx`)
- Student dashboard → Weak points: renders (evidence: `pages/StudentDetailDashboard.tsx`)
- Student dashboard → Homework images: renders (evidence: `pages/StudentDetailDashboard.tsx`)
- Student dashboard → Homework rankings: renders (evidence: `pages/StudentDetailDashboard.tsx`)
- Rankings page → Homework rankings: renders (evidence: `pages/RankingsPage.tsx`)
- Mock exam analysis → Exam parsing and metrics: parses and calculates (evidence: `components/MockExamStats.tsx`)
- Mock exam analysis → Exam data store: stores exam data (evidence: `components/MockExamStats.tsx`)
- Exam data store → Cloud Firestore: persists data (evidence: `lib/mockExamStore.ts`)
- Authentication → Firebase setup: uses auth client (evidence: `lib/auth.ts`)
- Firebase setup → Cloud Firestore: initializes (evidence: `lib/firebase.ts`)
- Homework images → Firebase setup: uses services (evidence: `components/HomeworkImageFeed.tsx`)
- Image review → Kakao image lookup: looks up images (evidence: `components/QuickImageReview.tsx`)
