# hosan-work/check_leave_system architecture

> Architecture diagram of the GitHub repository hosan-work/check_leave_system, 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/hosan-work/check_leave_system
- Repository: https://github.com/hosan-work/check_leave_system

## Overview

PawPuffPractice is a Vue and ASP.NET Core application for member accounts and administrator operations, including clock records, leave requests, calendar data, and LINE notifications. The main workflow runs from browser views through the API to MySQL; authentication is restored and maintained through a shared Vue composable and server cookies. The diagram includes documented major branches, but several frontend services and controllers were not sampled, so only explicitly evidenced calls are connected.

Main entry points: [`PawPuffPractice.Api/Data/PawPuffPracticeMySQLDbContext.cs`](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Data/PawPuffPracticeMySQLDbContext.cs) (EF data context), [`PawPuffPractice.vue/src/router/index.js`](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.vue/src/router/index.js) (Page routing), [`PawPuffPractice.Api/Controllers/AdminLeavesController.cs`](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Controllers/AdminLeavesController.cs) (Leave API), [`PawPuffPractice.vue/src/composables/useAuth.js`](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.vue/src/composables/useAuth.js) (Auth state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Vue application"]
  node_app["App shell<br/>[App.vue]"]
  node_authstate["Auth state<br/>[useAuth.js]"]
  node_routes["Page routing<br/>[index.js]"]
  node_loginview["Login and register<br/>[LoginView.vue]"]
  node_memberview["Member profile<br/>[MemberView.vue]"]
  node_usersview["User administration<br/>[AdminUsersView.vue]"]
  node_clockview["Clock management<br/>[AdminClockView.vue]"]
  node_leaveview["Leave management<br/>[AdminLeaveView.vue]"]
end

subgraph group_api["ASP.NET API"]
  node_api["API host<br/>[Program.cs]"]
  node_authcontroller["Authentication<br/>[AuthController.cs]"]
  node_userscontroller["User administration API"]
end

subgraph group_domain["Business features"]
  node_clockscontroller["Clock API"]
  node_leavescontroller["Leave API"]
  node_calendarcontroller["Calendar API"]
  node_calendarfiles["Calendar file service"]
  node_csv["CSV converter"]
  node_leavehub["Leave notifications<br/>[AdminLeaveHub.cs]"]
end

subgraph group_storage["Persistence"]
  node_dbcontext["EF data context"]
  node_mysql[("MySQL database")]
  node_seed["Development seeder"]
end

subgraph group_integrations["External services"]
  node_line["LINE messaging"]
  node_lineapi["LINE platform"]
end

node_user(("Member or admin"))
node_browser(("Browser"))

node_user -->|"uses"| node_browser
node_browser -->|"opens"| node_app
node_app -->|"initializes"| node_authstate
node_app -->|"renders routes"| node_routes
node_routes -->|"routes to"| node_loginview
node_routes -->|"routes to"| node_memberview
node_routes -->|"routes to"| node_usersview
node_routes -->|"routes to"| node_clockview
node_routes -->|"routes to"| node_leaveview
node_loginview -.->|"uses"| node_authstate
node_memberview -.->|"uses"| node_authstate
node_browser -.->|"sends API requests"| node_api
node_authstate -->|"calls auth endpoints"| node_authcontroller
node_api -->|"configures"| node_dbcontext
node_api -->|"runs seeding"| node_seed
node_authcontroller -->|"queries and saves"| node_dbcontext
node_userscontroller -->|"queries and saves"| node_dbcontext
node_clockscontroller -->|"queries and saves"| node_dbcontext
node_leavescontroller -->|"queries and saves"| node_dbcontext
node_calendarcontroller -->|"loads calendar"| node_calendarfiles
node_leavescontroller -->|"loads calendar"| node_calendarfiles
node_calendarfiles -->|"converts CSV"| node_csv
node_leavescontroller -->|"broadcasts changes"| node_leavehub
node_clockscontroller -->|"sends notifications"| node_line
node_line -->|"pushes message"| node_lineapi
node_seed -->|"seeds records"| node_dbcontext
node_dbcontext -.->|"persists entities"| node_mysql
node_clockview -.->|"calls clock API"| node_clockscontroller
node_leaveview -.->|"calls leave API"| node_leavescontroller
node_usersview -.->|"calls admin API"| node_userscontroller

click node_app "https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.vue/src/App.vue"
click node_authstate "https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.vue/src/composables/useAuth.js"
click node_routes "https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.vue/src/router/index.js"
click node_loginview "https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.vue/src/views/LoginView.vue"
click node_memberview "https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.vue/src/views/MemberView.vue"
click node_usersview "https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.vue/src/views/AdminUsersView.vue"
click node_clockview "https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.vue/src/views/AdminClockView.vue"
click node_leaveview "https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.vue/src/views/AdminLeaveView.vue"
click node_api "https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Program.cs"
click node_authcontroller "https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Controllers/AuthController.cs"
click node_userscontroller "https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Controllers/AdminUsersController.cs"
click node_clockscontroller "https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Controllers/AdminClocksController.cs"
click node_leavescontroller "https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Controllers/AdminLeavesController.cs"
click node_calendarcontroller "https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Controllers/CalendarController.cs"
click node_calendarfiles "https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Services/CalendarFileService.cs"
click node_csv "https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Services/CalendarCsvConverter.cs"
click node_leavehub "https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Hubs/AdminLeaveHub.cs"
click node_dbcontext "https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Data/PawPuffPracticeMySQLDbContext.cs"
click node_seed "https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Data/DevelopmentDataSeeder.cs"
click node_line "https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Services/LineMessageService.cs"

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_authstate,node_routes,node_loginview,node_memberview,node_usersview,node_clockview,node_leaveview,node_browser toneBlue
class node_api,node_authcontroller,node_userscontroller toneAmber
class node_clockscontroller,node_leavescontroller,node_calendarcontroller,node_calendarfiles,node_csv,node_leavehub toneMint
class node_dbcontext,node_mysql,node_seed toneRose
class node_line,node_lineapi,node_user toneIndigo
```

## Components

### Vue application

- [App shell](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.vue/src/App.vue): `PawPuffPractice.vue/src/App.vue`
- [Auth state](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.vue/src/composables/useAuth.js): `PawPuffPractice.vue/src/composables/useAuth.js`
- [Page routing](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.vue/src/router/index.js): `PawPuffPractice.vue/src/router/index.js`
- [Login and register](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.vue/src/views/LoginView.vue): `PawPuffPractice.vue/src/views/LoginView.vue`
- [Member profile](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.vue/src/views/MemberView.vue): `PawPuffPractice.vue/src/views/MemberView.vue`
- [User administration](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.vue/src/views/AdminUsersView.vue): `PawPuffPractice.vue/src/views/AdminUsersView.vue`
- [Clock management](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.vue/src/views/AdminClockView.vue): `PawPuffPractice.vue/src/views/AdminClockView.vue`
- [Leave management](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.vue/src/views/AdminLeaveView.vue): `PawPuffPractice.vue/src/views/AdminLeaveView.vue`

### ASP.NET API

- [API host](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Program.cs): `PawPuffPractice.Api/Program.cs`
- [Authentication](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Controllers/AuthController.cs): `PawPuffPractice.Api/Controllers/AuthController.cs`
- [User administration API](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Controllers/AdminUsersController.cs): `PawPuffPractice.Api/Controllers/AdminUsersController.cs`

### Business features

- [Clock API](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Controllers/AdminClocksController.cs): `PawPuffPractice.Api/Controllers/AdminClocksController.cs`
- [Leave API](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Controllers/AdminLeavesController.cs): `PawPuffPractice.Api/Controllers/AdminLeavesController.cs`
- [Calendar API](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Controllers/CalendarController.cs): `PawPuffPractice.Api/Controllers/CalendarController.cs`
- [Calendar file service](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Services/CalendarFileService.cs): `PawPuffPractice.Api/Services/CalendarFileService.cs`
- [CSV converter](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Services/CalendarCsvConverter.cs): `PawPuffPractice.Api/Services/CalendarCsvConverter.cs`
- [Leave notifications](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Hubs/AdminLeaveHub.cs): `PawPuffPractice.Api/Hubs/AdminLeaveHub.cs`

### Persistence

- [EF data context](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Data/PawPuffPracticeMySQLDbContext.cs): `PawPuffPractice.Api/Data/PawPuffPracticeMySQLDbContext.cs`
- **MySQL database**
- [Development seeder](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Data/DevelopmentDataSeeder.cs): `PawPuffPractice.Api/Data/DevelopmentDataSeeder.cs`

### External services

- [LINE messaging](https://github.com/hosan-work/check_leave_system/blob/main/PawPuffPractice.Api/Services/LineMessageService.cs): `PawPuffPractice.Api/Services/LineMessageService.cs`
- **LINE platform**

### Other components

- **Member or admin**
- **Browser**

## Connections

- Member or admin → Browser: uses
- Browser → App shell: opens
- App shell → Auth state: initializes (evidence: `PawPuffPractice.vue/src/App.vue`)
- App shell → Page routing: renders routes (evidence: `PawPuffPractice.vue/src/App.vue`)
- Page routing → Login and register: routes to (evidence: `PawPuffPractice.vue/src/router/index.js`)
- Page routing → Member profile: routes to (evidence: `PawPuffPractice.vue/src/router/index.js`)
- Page routing → User administration: routes to (evidence: `PawPuffPractice.vue/src/router/index.js`)
- Page routing → Clock management: routes to (evidence: `PawPuffPractice.vue/src/router/index.js`)
- Page routing → Leave management: routes to (evidence: `PawPuffPractice.vue/src/router/index.js`)
- Login and register → Auth state: uses
- Member profile → Auth state: uses
- Browser → API host: sends API requests
- Auth state → Authentication: calls auth endpoints (evidence: `PawPuffPractice.vue/src/composables/useAuth.js`)
- API host → EF data context: configures (evidence: `PawPuffPractice.Api/Program.cs`)
- API host → Development seeder: runs seeding (evidence: `PawPuffPractice.Api/Program.cs`)
- Authentication → EF data context: queries and saves (evidence: `PawPuffPractice.Api/Controllers/AuthController.cs`)
- User administration API → EF data context: queries and saves (evidence: `PawPuffPractice.Api/Controllers/AdminUsersController.cs`)
- Clock API → EF data context: queries and saves (evidence: `PawPuffPractice.Api/Controllers/AdminClocksController.cs`)
- Leave API → EF data context: queries and saves (evidence: `PawPuffPractice.Api/Controllers/AdminLeavesController.cs`)
- Calendar API → Calendar file service: loads calendar (evidence: `PawPuffPractice.Api/Controllers/CalendarController.cs`)
- Leave API → Calendar file service: loads calendar (evidence: `PawPuffPractice.Api/Controllers/AdminLeavesController.cs`)
- Calendar file service → CSV converter: converts CSV (evidence: `PawPuffPractice.Api/Services/CalendarFileService.cs`)
- Leave API → Leave notifications: broadcasts changes (evidence: `PawPuffPractice.Api/Controllers/AdminLeavesController.cs`)
- Clock API → LINE messaging: sends notifications (evidence: `PawPuffPractice.Api/Controllers/AdminClocksController.cs`)
- LINE messaging → LINE platform: pushes message (evidence: `PawPuffPractice.Api/Services/LineMessageService.cs`)
- Development seeder → EF data context: seeds records (evidence: `PawPuffPractice.Api/Data/DevelopmentDataSeeder.cs`)
- EF data context → MySQL database: persists entities
- Clock management → Clock API: calls clock API
- Leave management → Leave API: calls leave API
- User administration → User administration API: calls admin API
