# seoeongeueun/workmate2 architecture

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

- Interactive diagram: https://gitdiagram.com/seoeongeueun/workmate2
- Repository: https://github.com/seoeongeueun/workmate2

## Overview

Workmate is presented as a retro-styled music player. Its apparent user journey spans account/session handling, playlist and track management, and a playback screen; the repository also includes a restricted video-management screen. The README offers little architectural detail, and many relevant files were not excerpted, so the graph shows only relationships directly visible in the supplied source. Database, API, and query wiring is therefore represented as components without inferred connections.

Main entry points: [`app/layout.tsx`](https://github.com/seoeongeueun/workmate2/blob/main/app/layout.tsx) (Player shell), [`app/ui/PowerLight.tsx`](https://github.com/seoeongeueun/workmate2/blob/main/app/ui/PowerLight.tsx) (Power and keys), [`app/manage/page.tsx`](https://github.com/seoeongeueun/workmate2/blob/main/app/manage/page.tsx) (Management page), [`app/components/VideoChecker.tsx`](https://github.com/seoeongeueun/workmate2/blob/main/app/components/VideoChecker.tsx) (Video checker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Player experience"]
  node_home["Home entry<br/>[page.tsx]"]
  node_play["Playback page<br/>[page.tsx]"]
  node_music["Music screen<br/>[MusicScreen.tsx]"]
  node_dialogue["Dialogue screen<br/>[DialogueScreen.tsx]"]
  node_login["Login screen<br/>[loginScreen.tsx]"]
  node_loading["Loading screen<br/>[loadingScreen.tsx]"]
  node_controls["Player controls<br/>[ABButtons.tsx]"]
  node_navigation["Directional controls<br/>[MoveButton.tsx]"]
  node_power["Power and keys<br/>[PowerLight.tsx]"]
  node_start["Start controls<br/>[StartButtons.tsx]"]
  node_settings["Theme settings<br/>[SettingsButton.tsx]"]
  node_layout["Player shell<br/>[layout.tsx]"]
end

subgraph group_domain["Music and content"]
  node_playlist["Playlist model<br/>[Playlist.ts]"]
  node_playlistdata[("Playlist data<br/>[Playlist.ts]")]
  node_luckydata[("Lucky tracks<br/>[Lucky.ts]")]
  node_videocheck["Video checker<br/>[VideoChecker.tsx]"]
  node_manage["Management page<br/>[page.tsx]"]
end

subgraph group_services["Account and services"]
  node_playlistapi["Playlist API<br/>[route.ts]"]
  node_luckyapi["Lucky API<br/>[route.ts]"]
  node_manageapi["Management API<br/>[route.ts]"]
  node_authapi["Authentication API<br/>[route.ts]"]
  node_signupapi["Signup API<br/>[route.ts]"]
  node_logoutapi["Logout API<br/>[route.ts]"]
  node_userdata[("User model<br/>[User.ts]")]
  node_sessionactions["Session actions<br/>[session.ts]"]
  node_dbconnect["Database connection<br/>[dbConnect.ts]"]
end

subgraph group_shared["Shared runtime"]
  node_queryprovider["Query provider<br/>[QueryProvider.tsx]"]
  node_queries["Query modules"]
  node_actions["Playlist and track actions"]
  node_apihelpers["API helpers<br/>[api.ts]"]
  node_request["Request helper<br/>[apiRequest.ts]"]
  node_tools["Shared utilities<br/>[tools.ts]"]
  node_audio["Audio controls<br/>[audioControls.ts]"]
end

node_visitor(("Listener"))

node_visitor -.->|"opens"| node_home
node_layout -->|"renders"| node_settings
node_layout -->|"renders"| node_power
node_layout -->|"renders"| node_controls
node_layout -->|"renders"| node_navigation
node_layout -->|"renders"| node_start
node_layout -->|"wraps screen"| node_queryprovider
node_power -->|"handles keys"| node_visitor
node_power -.->|"updates button state"| node_controls
node_manage -->|"submits access code"| node_request
node_manage -->|"renders on access"| node_videocheck
node_videocheck -->|"uses video utilities"| node_tools
node_request -.->|"posts access check"| node_manageapi

click node_home "https://github.com/seoeongeueun/workmate2/blob/main/app/page.tsx"
click node_play "https://github.com/seoeongeueun/workmate2/blob/main/app/play/page.tsx"
click node_music "https://github.com/seoeongeueun/workmate2/blob/main/app/components/MusicScreen.tsx"
click node_dialogue "https://github.com/seoeongeueun/workmate2/blob/main/app/components/DialogueScreen.tsx"
click node_login "https://github.com/seoeongeueun/workmate2/blob/main/app/components/loginScreen.tsx"
click node_loading "https://github.com/seoeongeueun/workmate2/blob/main/app/components/loadingScreen.tsx"
click node_controls "https://github.com/seoeongeueun/workmate2/blob/main/app/ui/ABButtons.tsx"
click node_navigation "https://github.com/seoeongeueun/workmate2/blob/main/app/ui/MoveButton.tsx"
click node_power "https://github.com/seoeongeueun/workmate2/blob/main/app/ui/PowerLight.tsx"
click node_start "https://github.com/seoeongeueun/workmate2/blob/main/app/ui/StartButtons.tsx"
click node_settings "https://github.com/seoeongeueun/workmate2/blob/main/app/ui/SettingsButton.tsx"
click node_layout "https://github.com/seoeongeueun/workmate2/blob/main/app/layout.tsx"
click node_playlist "https://github.com/seoeongeueun/workmate2/blob/main/app/classes/Playlist.ts"
click node_playlistdata "https://github.com/seoeongeueun/workmate2/blob/main/app/models/Playlist.ts"
click node_luckydata "https://github.com/seoeongeueun/workmate2/blob/main/app/models/Lucky.ts"
click node_videocheck "https://github.com/seoeongeueun/workmate2/blob/main/app/components/VideoChecker.tsx"
click node_manage "https://github.com/seoeongeueun/workmate2/blob/main/app/manage/page.tsx"
click node_playlistapi "https://github.com/seoeongeueun/workmate2/blob/main/app/api/playlist/route.ts"
click node_luckyapi "https://github.com/seoeongeueun/workmate2/blob/main/app/api/lucky/route.ts"
click node_manageapi "https://github.com/seoeongeueun/workmate2/blob/main/app/api/manage/route.ts"
click node_authapi "https://github.com/seoeongeueun/workmate2/blob/main/app/api/auth/route.ts"
click node_signupapi "https://github.com/seoeongeueun/workmate2/blob/main/app/api/signup/route.ts"
click node_logoutapi "https://github.com/seoeongeueun/workmate2/blob/main/app/api/logout/route.ts"
click node_userdata "https://github.com/seoeongeueun/workmate2/blob/main/app/models/User.ts"
click node_sessionactions "https://github.com/seoeongeueun/workmate2/blob/main/app/actions/session.ts"
click node_dbconnect "https://github.com/seoeongeueun/workmate2/blob/main/app/providers/dbConnect.ts"
click node_queryprovider "https://github.com/seoeongeueun/workmate2/blob/main/app/query/QueryProvider.tsx"
click node_queries "https://github.com/seoeongeueun/workmate2/tree/main/app/query"
click node_actions "https://github.com/seoeongeueun/workmate2/tree/main/app/actions"
click node_apihelpers "https://github.com/seoeongeueun/workmate2/blob/main/app/lib/api.ts"
click node_request "https://github.com/seoeongeueun/workmate2/blob/main/app/lib/apiRequest.ts"
click node_tools "https://github.com/seoeongeueun/workmate2/blob/main/app/lib/tools.ts"
click node_audio "https://github.com/seoeongeueun/workmate2/blob/main/app/lib/audioControls.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_home,node_play,node_music,node_dialogue,node_login,node_loading,node_controls,node_navigation,node_power,node_start,node_settings,node_layout toneBlue
class node_playlist,node_playlistdata,node_luckydata,node_videocheck,node_manage toneAmber
class node_playlistapi,node_luckyapi,node_manageapi,node_authapi,node_signupapi,node_logoutapi,node_userdata,node_sessionactions,node_dbconnect toneMint
class node_queryprovider,node_queries,node_actions,node_apihelpers,node_request,node_tools,node_audio toneRose
class node_visitor toneIndigo
```

## Components

### Player experience

- [Home entry](https://github.com/seoeongeueun/workmate2/blob/main/app/page.tsx): `app/page.tsx`
- [Playback page](https://github.com/seoeongeueun/workmate2/blob/main/app/play/page.tsx): `app/play/page.tsx`
- [Music screen](https://github.com/seoeongeueun/workmate2/blob/main/app/components/MusicScreen.tsx): `app/components/MusicScreen.tsx`
- [Dialogue screen](https://github.com/seoeongeueun/workmate2/blob/main/app/components/DialogueScreen.tsx): `app/components/DialogueScreen.tsx`
- [Login screen](https://github.com/seoeongeueun/workmate2/blob/main/app/components/loginScreen.tsx): `app/components/loginScreen.tsx`
- [Loading screen](https://github.com/seoeongeueun/workmate2/blob/main/app/components/loadingScreen.tsx): `app/components/loadingScreen.tsx`
- [Player controls](https://github.com/seoeongeueun/workmate2/blob/main/app/ui/ABButtons.tsx): `app/ui/ABButtons.tsx`
- [Directional controls](https://github.com/seoeongeueun/workmate2/blob/main/app/ui/MoveButton.tsx): `app/ui/MoveButton.tsx`
- [Power and keys](https://github.com/seoeongeueun/workmate2/blob/main/app/ui/PowerLight.tsx): `app/ui/PowerLight.tsx`
- [Start controls](https://github.com/seoeongeueun/workmate2/blob/main/app/ui/StartButtons.tsx): `app/ui/StartButtons.tsx`
- [Theme settings](https://github.com/seoeongeueun/workmate2/blob/main/app/ui/SettingsButton.tsx): `app/ui/SettingsButton.tsx`
- [Player shell](https://github.com/seoeongeueun/workmate2/blob/main/app/layout.tsx): `app/layout.tsx`

### Music and content

- [Playlist model](https://github.com/seoeongeueun/workmate2/blob/main/app/classes/Playlist.ts): `app/classes/Playlist.ts`
- [Playlist data](https://github.com/seoeongeueun/workmate2/blob/main/app/models/Playlist.ts): `app/models/Playlist.ts`
- [Lucky tracks](https://github.com/seoeongeueun/workmate2/blob/main/app/models/Lucky.ts): `app/models/Lucky.ts`
- [Video checker](https://github.com/seoeongeueun/workmate2/blob/main/app/components/VideoChecker.tsx): `app/components/VideoChecker.tsx`
- [Management page](https://github.com/seoeongeueun/workmate2/blob/main/app/manage/page.tsx): `app/manage/page.tsx`

### Account and services

- [Playlist API](https://github.com/seoeongeueun/workmate2/blob/main/app/api/playlist/route.ts): `app/api/playlist/route.ts`
- [Lucky API](https://github.com/seoeongeueun/workmate2/blob/main/app/api/lucky/route.ts): `app/api/lucky/route.ts`
- [Management API](https://github.com/seoeongeueun/workmate2/blob/main/app/api/manage/route.ts): `app/api/manage/route.ts`
- [Authentication API](https://github.com/seoeongeueun/workmate2/blob/main/app/api/auth/route.ts): `app/api/auth/route.ts`
- [Signup API](https://github.com/seoeongeueun/workmate2/blob/main/app/api/signup/route.ts): `app/api/signup/route.ts`
- [Logout API](https://github.com/seoeongeueun/workmate2/blob/main/app/api/logout/route.ts): `app/api/logout/route.ts`
- [User model](https://github.com/seoeongeueun/workmate2/blob/main/app/models/User.ts): `app/models/User.ts`
- [Session actions](https://github.com/seoeongeueun/workmate2/blob/main/app/actions/session.ts): `app/actions/session.ts`
- [Database connection](https://github.com/seoeongeueun/workmate2/blob/main/app/providers/dbConnect.ts): `app/providers/dbConnect.ts`

### Shared runtime

- [Query provider](https://github.com/seoeongeueun/workmate2/blob/main/app/query/QueryProvider.tsx): `app/query/QueryProvider.tsx`
- [Query modules](https://github.com/seoeongeueun/workmate2/tree/main/app/query): `app/query`
- [Playlist and track actions](https://github.com/seoeongeueun/workmate2/tree/main/app/actions): `app/actions`
- [API helpers](https://github.com/seoeongeueun/workmate2/blob/main/app/lib/api.ts): `app/lib/api.ts`
- [Request helper](https://github.com/seoeongeueun/workmate2/blob/main/app/lib/apiRequest.ts): `app/lib/apiRequest.ts`
- [Shared utilities](https://github.com/seoeongeueun/workmate2/blob/main/app/lib/tools.ts): `app/lib/tools.ts`
- [Audio controls](https://github.com/seoeongeueun/workmate2/blob/main/app/lib/audioControls.ts): `app/lib/audioControls.ts`

### Other components

- **Listener**

## Connections

- Listener → Home entry: opens
- Player shell → Theme settings: renders (evidence: `app/layout.tsx`)
- Player shell → Power and keys: renders (evidence: `app/layout.tsx`)
- Player shell → Player controls: renders (evidence: `app/layout.tsx`)
- Player shell → Directional controls: renders (evidence: `app/layout.tsx`)
- Player shell → Start controls: renders (evidence: `app/layout.tsx`)
- Player shell → Query provider: wraps screen (evidence: `app/layout.tsx`)
- Power and keys → Listener: handles keys (evidence: `app/ui/PowerLight.tsx`)
- Power and keys → Player controls: updates button state
- Management page → Request helper: submits access code (evidence: `app/manage/page.tsx`)
- Management page → Video checker: renders on access (evidence: `app/manage/page.tsx`)
- Video checker → Shared utilities: uses video utilities (evidence: `app/components/VideoChecker.tsx`)
- Request helper → Management API: posts access check
