# muoegu/language-school-operations architecture

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

- Interactive diagram: https://gitdiagram.com/muoegu/language-school-operations
- Repository: https://github.com/muoegu/language-school-operations

## Overview

This is a language-school operations web app for representatives, staff, and teachers. Users sign in, then manage students and teachers, schedule and record lessons, maintain textbooks and lesson types, and track payments, reports, alerts, and notifications. The Vue client routes users to role-aware screens; its API calls reach Hono route handlers, which enforce permissions and delegate domain operations to services backed by PostgreSQL. README describes major capabilities beyond the sampled calls; those branches are included, but their internal call links are omitted where source evidence was unavailable.

Main entry points: [`api/src/app.ts`](https://github.com/muoegu/language-school-operations/blob/main/api/src/app.ts) (Hono app), [`web/src/main.ts`](https://github.com/muoegu/language-school-operations/blob/main/web/src/main.ts) (Vue application), [`api/src/db/client.ts`](https://github.com/muoegu/language-school-operations/blob/main/api/src/db/client.ts) (Database client), [`api/src/features/lessons/service.ts`](https://github.com/muoegu/language-school-operations/blob/main/api/src/features/lessons/service.ts) (Lesson scheduling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_webapp["Vue application<br/>[main.ts]"]
  node_authui["Role-aware session<br/>[useAuth.ts]"]
  node_studentsui["Student records"]
  node_lessonsui["Lesson calendar<br/>[LessonsPage.vue]"]
  node_dashboardui["Dashboard alerts<br/>[DashboardPage.vue]"]
  node_billingui["Billing screens"]
  node_catalogui["Catalog screens<br/>[TextbooksPage.vue]"]
end

subgraph group_api["API and domain services"]
  node_app["Hono app<br/>[app.ts]"]
  node_auth["Session and roles<br/>[session.ts]"]
  node_students["Student management<br/>[service.ts]"]
  node_teachers["Teacher management"]
  node_lessons["Lesson scheduling<br/>[service.ts]"]
  node_records["Lesson records<br/>[service.ts]"]
  node_attendance["Attendance"]
  node_dashboard["Dashboard alerts"]
  node_catalog["Lesson types and books"]
  node_payments["Payment records<br/>[service.ts]"]
  node_reports["Payment reports"]
end

subgraph group_data["Persistence"]
  node_dbclient["Database client<br/>[client.ts]"]
  node_schema["School data schema<br/>[schema.ts]"]
  node_postgres[("PostgreSQL")]
end

node_staff(("School users"))

node_staff -->|"uses"| node_webapp
node_webapp -->|"checks session"| node_authui
node_authui -.->|"requests session"| node_app
node_webapp -->|"routes to"| node_studentsui
node_webapp -->|"routes to"| node_lessonsui
node_webapp -->|"routes to"| node_dashboardui
node_webapp -->|"routes to"| node_billingui
node_webapp -->|"routes to"| node_catalogui
node_studentsui -.->|"requests data"| node_students
node_lessonsui -.->|"requests data"| node_lessons
node_dashboardui -.->|"requests alerts"| node_dashboard
node_billingui -.->|"requests reports"| node_reports
node_app -->|"registers routes"| node_auth
node_app -->|"registers routes"| node_students
node_app -->|"registers routes"| node_teachers
node_app -->|"registers routes"| node_lessons
node_app -->|"registers routes"| node_records
node_app -->|"registers routes"| node_attendance
node_app -->|"registers routes"| node_dashboard
node_app -->|"registers routes"| node_catalog
node_app -->|"registers routes"| node_payments
node_app -->|"registers routes"| node_reports
node_students -->|"queries"| node_dbclient
node_lessons -->|"queries"| node_dbclient
node_records -->|"queries"| node_dbclient
node_payments -->|"queries"| node_dbclient
node_auth -->|"loads user"| node_dbclient
node_dbclient -.->|"uses schema"| node_schema
node_dbclient -->|"connects"| node_postgres
node_records -->|"uses lesson service"| node_lessons

click node_webapp "https://github.com/muoegu/language-school-operations/blob/main/web/src/main.ts"
click node_authui "https://github.com/muoegu/language-school-operations/blob/main/web/src/composables/useAuth.ts"
click node_studentsui "https://github.com/muoegu/language-school-operations/blob/main/web/src/pages/StudentDetailPage.vue"
click node_lessonsui "https://github.com/muoegu/language-school-operations/blob/main/web/src/pages/LessonsPage.vue"
click node_dashboardui "https://github.com/muoegu/language-school-operations/blob/main/web/src/pages/DashboardPage.vue"
click node_billingui "https://github.com/muoegu/language-school-operations/blob/main/web/src/pages/PaymentReportsPage.vue"
click node_catalogui "https://github.com/muoegu/language-school-operations/blob/main/web/src/pages/TextbooksPage.vue"
click node_app "https://github.com/muoegu/language-school-operations/blob/main/api/src/app.ts"
click node_auth "https://github.com/muoegu/language-school-operations/blob/main/api/src/features/auth/session.ts"
click node_students "https://github.com/muoegu/language-school-operations/blob/main/api/src/features/students/service.ts"
click node_teachers "https://github.com/muoegu/language-school-operations/tree/main/api/src/features/teachers"
click node_lessons "https://github.com/muoegu/language-school-operations/blob/main/api/src/features/lessons/service.ts"
click node_records "https://github.com/muoegu/language-school-operations/blob/main/api/src/features/lesson-records/service.ts"
click node_attendance "https://github.com/muoegu/language-school-operations/tree/main/api/src/features/attendance"
click node_dashboard "https://github.com/muoegu/language-school-operations/tree/main/api/src/features/dashboard-alerts"
click node_catalog "https://github.com/muoegu/language-school-operations/tree/main/api/src/features/lesson-types"
click node_payments "https://github.com/muoegu/language-school-operations/blob/main/api/src/features/payment-records/service.ts"
click node_reports "https://github.com/muoegu/language-school-operations/tree/main/api/src/features/payment-reports"
click node_dbclient "https://github.com/muoegu/language-school-operations/blob/main/api/src/db/client.ts"
click node_schema "https://github.com/muoegu/language-school-operations/blob/main/api/src/db/schema.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_webapp,node_authui,node_studentsui,node_lessonsui,node_dashboardui,node_billingui,node_catalogui,node_staff toneBlue
class node_app,node_auth,node_students,node_teachers,node_lessons,node_records,node_attendance,node_dashboard,node_catalog,node_payments,node_reports toneAmber
class node_dbclient,node_schema,node_postgres toneMint
```

## Components

### Web application

- [Vue application](https://github.com/muoegu/language-school-operations/blob/main/web/src/main.ts): `web/src/main.ts`
- [Role-aware session](https://github.com/muoegu/language-school-operations/blob/main/web/src/composables/useAuth.ts): `web/src/composables/useAuth.ts`
- [Student records](https://github.com/muoegu/language-school-operations/blob/main/web/src/pages/StudentDetailPage.vue): `web/src/pages/StudentDetailPage.vue`
- [Lesson calendar](https://github.com/muoegu/language-school-operations/blob/main/web/src/pages/LessonsPage.vue): `web/src/pages/LessonsPage.vue`
- [Dashboard alerts](https://github.com/muoegu/language-school-operations/blob/main/web/src/pages/DashboardPage.vue): `web/src/pages/DashboardPage.vue`
- [Billing screens](https://github.com/muoegu/language-school-operations/blob/main/web/src/pages/PaymentReportsPage.vue): `web/src/pages/PaymentReportsPage.vue`
- [Catalog screens](https://github.com/muoegu/language-school-operations/blob/main/web/src/pages/TextbooksPage.vue): `web/src/pages/TextbooksPage.vue`

### API and domain services

- [Hono app](https://github.com/muoegu/language-school-operations/blob/main/api/src/app.ts): `api/src/app.ts`
- [Session and roles](https://github.com/muoegu/language-school-operations/blob/main/api/src/features/auth/session.ts): `api/src/features/auth/session.ts`
- [Student management](https://github.com/muoegu/language-school-operations/blob/main/api/src/features/students/service.ts): `api/src/features/students/service.ts`
- [Teacher management](https://github.com/muoegu/language-school-operations/tree/main/api/src/features/teachers): `api/src/features/teachers`
- [Lesson scheduling](https://github.com/muoegu/language-school-operations/blob/main/api/src/features/lessons/service.ts): `api/src/features/lessons/service.ts`
- [Lesson records](https://github.com/muoegu/language-school-operations/blob/main/api/src/features/lesson-records/service.ts): `api/src/features/lesson-records/service.ts`
- [Attendance](https://github.com/muoegu/language-school-operations/tree/main/api/src/features/attendance): `api/src/features/attendance`
- [Dashboard alerts](https://github.com/muoegu/language-school-operations/tree/main/api/src/features/dashboard-alerts): `api/src/features/dashboard-alerts`
- [Lesson types and books](https://github.com/muoegu/language-school-operations/tree/main/api/src/features/lesson-types): `api/src/features/lesson-types`
- [Payment records](https://github.com/muoegu/language-school-operations/blob/main/api/src/features/payment-records/service.ts): `api/src/features/payment-records/service.ts`
- [Payment reports](https://github.com/muoegu/language-school-operations/tree/main/api/src/features/payment-reports): `api/src/features/payment-reports`

### Persistence

- [Database client](https://github.com/muoegu/language-school-operations/blob/main/api/src/db/client.ts): `api/src/db/client.ts`
- [School data schema](https://github.com/muoegu/language-school-operations/blob/main/api/src/db/schema.ts): `api/src/db/schema.ts`
- **PostgreSQL**

### Other components

- **School users**

## Connections

- School users → Vue application: uses
- Vue application → Role-aware session: checks session (evidence: `web/src/main.ts`)
- Role-aware session → Hono app: requests session
- Vue application → Student records: routes to (evidence: `web/src/main.ts`)
- Vue application → Lesson calendar: routes to (evidence: `web/src/main.ts`)
- Vue application → Dashboard alerts: routes to (evidence: `web/src/main.ts`)
- Vue application → Billing screens: routes to (evidence: `web/src/main.ts`)
- Vue application → Catalog screens: routes to (evidence: `web/src/main.ts`)
- Student records → Student management: requests data
- Lesson calendar → Lesson scheduling: requests data
- Dashboard alerts → Dashboard alerts: requests alerts
- Billing screens → Payment reports: requests reports
- Hono app → Session and roles: registers routes (evidence: `api/src/app.ts`)
- Hono app → Student management: registers routes (evidence: `api/src/app.ts`)
- Hono app → Teacher management: registers routes (evidence: `api/src/app.ts`)
- Hono app → Lesson scheduling: registers routes (evidence: `api/src/app.ts`)
- Hono app → Lesson records: registers routes (evidence: `api/src/app.ts`)
- Hono app → Attendance: registers routes (evidence: `api/src/app.ts`)
- Hono app → Dashboard alerts: registers routes (evidence: `api/src/app.ts`)
- Hono app → Lesson types and books: registers routes (evidence: `api/src/app.ts`)
- Hono app → Payment records: registers routes (evidence: `api/src/app.ts`)
- Hono app → Payment reports: registers routes (evidence: `api/src/app.ts`)
- Student management → Database client: queries (evidence: `api/src/features/students/service.ts`)
- Lesson scheduling → Database client: queries (evidence: `api/src/features/lessons/service.ts`)
- Lesson records → Database client: queries (evidence: `api/src/features/lesson-records/service.ts`)
- Payment records → Database client: queries (evidence: `api/src/features/payment-records/service.ts`)
- Session and roles → Database client: loads user (evidence: `api/src/features/auth/session.ts`)
- Database client → School data schema: uses schema
- Database client → PostgreSQL: connects (evidence: `api/src/db/client.ts`)
- Lesson records → Lesson scheduling: uses lesson service (evidence: `api/src/features/lesson-records/service.ts`)
