# yyeonseoo/cspot architecture

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

- Interactive diagram: https://gitdiagram.com/yyeonseoo/cspot
- Repository: https://github.com/yyeonseoo/cspot

## Overview

This is a club scheduling and performance-management portal. Members log in and use a role-aware app shell to view calendars, respond to practice surveys, and manage their personal information; administrators also manage performances, songs, users, notices, and archives. The domain model and schedule helpers support those workflows, with browser-local data and a remote data route available. The README is empty, so capability coverage and connections rely on the source index and sampled files; unsampled implementations are represented only where the index identifies them.

Main entry points: [`components/app-shell.tsx`](https://github.com/yyeonseoo/cspot/blob/main/components/app-shell.tsx) (App shell), [`app/page.tsx`](https://github.com/yyeonseoo/cspot/blob/main/app/page.tsx) (Portal page), [`lib/schedule.ts`](https://github.com/yyeonseoo/cspot/blob/main/lib/schedule.ts) (Schedule rules), [`lib/local-data.ts`](https://github.com/yyeonseoo/cspot/blob/main/lib/local-data.ts) (Local data store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Portal entry"]
  node_page["Portal page<br/>[page.tsx]"]
  node_login["Login screen<br/>[login-screen.tsx]"]
  node_shell["App shell<br/>[app-shell.tsx]"]
end

subgraph group_schedule["Scheduling"]
  node_calendar["Calendar<br/>[calendar-panel.tsx]"]
  node_survey["Availability surveys<br/>[survey-panel.tsx]"]
  node_practice["Practice planning"]
  node_slots["Availability grid<br/>[slot-grid.tsx]"]
end

subgraph group_performance["Performances"]
  node_performance["Performance manager"]
  node_performanceview["Performance view"]
  node_overview["Practice overview"]
  node_setlist["Setlist ordering<br/>[setlist-order.tsx]"]
  node_archive["Performance archive<br/>[archive-panel.tsx]"]
  node_archiveimport["Archive import<br/>[archive-import.tsx]"]
end

subgraph group_club["Club management"]
  node_songs["Song editor"]
  node_users["User management<br/>[users-panel.tsx]"]
  node_notices["Notices<br/>[notice-panel.tsx]"]
  node_mypage["Member page<br/>[my-page-panel.tsx]"]
end

subgraph group_core["Data and domain"]
  node_domain["Club domain data<br/>[domain.ts]"]
  node_schedulelogic["Schedule rules<br/>[schedule.ts]"]
  node_localdata[("Local data store<br/>[local-data.ts]")]
  node_remote["Remote data access<br/>[remote-data.ts]"]
  node_api["Data API route<br/>[route.ts]"]
  node_session[("Session storage<br/>[session.ts]")]
  node_permissions["Role permissions<br/>[permissions.ts]"]
  node_theme["Theme settings<br/>[theme.ts]"]
  node_items["Shared display items<br/>[items.tsx]"]
  node_ui["Shared UI controls<br/>[ui.tsx]"]
end

node_member(("Club member"))

node_member -->|"opens"| node_page
node_page -->|"shows"| node_login
node_page -->|"renders"| node_shell
node_page -->|"loads data"| node_localdata
node_page -->|"reads session"| node_session
node_page -->|"uses data access"| node_remote
node_page -->|"checks roles"| node_permissions
node_page -->|"loads theme"| node_theme
node_login -->|"writes session"| node_session
node_shell -->|"renders"| node_calendar
node_shell -->|"renders"| node_survey
node_shell -->|"renders"| node_practice
node_shell -->|"renders"| node_performance
node_shell -->|"renders"| node_performanceview
node_shell -->|"renders"| node_overview
node_shell -->|"renders"| node_archive
node_shell -->|"renders"| node_users
node_shell -->|"renders"| node_notices
node_shell -->|"renders"| node_mypage
node_survey -->|"renders"| node_slots
node_survey -->|"renders"| node_songs
node_practice -->|"uses"| node_slots
node_performance -->|"renders"| node_setlist
node_performance -->|"renders"| node_archiveimport
node_archive -->|"renders"| node_items
node_calendar -->|"renders"| node_items
node_calendar -->|"uses rules"| node_schedulelogic
node_survey -->|"uses rules"| node_schedulelogic
node_shell -->|"checks roles"| node_permissions
node_shell -->|"reads session"| node_session
node_localdata -->|"stores"| node_domain
node_schedulelogic -->|"uses types"| node_domain
node_session -->|"uses key"| node_localdata
node_api -->|"delegates"| node_remote
node_performance -->|"persists changes"| node_localdata
node_archive -->|"uses archive data"| node_localdata
node_users -->|"uses roles"| node_permissions
node_items -->|"uses colors"| node_schedulelogic
node_items -->|"uses types"| node_domain
node_ui -->|"uses helpers"| node_schedulelogic

click node_page "https://github.com/yyeonseoo/cspot/blob/main/app/page.tsx"
click node_login "https://github.com/yyeonseoo/cspot/blob/main/components/login-screen.tsx"
click node_shell "https://github.com/yyeonseoo/cspot/blob/main/components/app-shell.tsx"
click node_calendar "https://github.com/yyeonseoo/cspot/blob/main/components/calendar-panel.tsx"
click node_survey "https://github.com/yyeonseoo/cspot/blob/main/components/survey-panel.tsx"
click node_practice "https://github.com/yyeonseoo/cspot/blob/main/components/song-management-panel.tsx"
click node_slots "https://github.com/yyeonseoo/cspot/blob/main/components/slot-grid.tsx"
click node_performance "https://github.com/yyeonseoo/cspot/blob/main/components/performance-manager.tsx"
click node_performanceview "https://github.com/yyeonseoo/cspot/blob/main/components/performance-view.tsx"
click node_overview "https://github.com/yyeonseoo/cspot/blob/main/components/practice-overview.tsx"
click node_setlist "https://github.com/yyeonseoo/cspot/blob/main/components/setlist-order.tsx"
click node_archive "https://github.com/yyeonseoo/cspot/blob/main/components/archive-panel.tsx"
click node_archiveimport "https://github.com/yyeonseoo/cspot/blob/main/components/archive-import.tsx"
click node_songs "https://github.com/yyeonseoo/cspot/blob/main/components/leader-song-editor.tsx"
click node_users "https://github.com/yyeonseoo/cspot/blob/main/components/users-panel.tsx"
click node_notices "https://github.com/yyeonseoo/cspot/blob/main/components/notice-panel.tsx"
click node_mypage "https://github.com/yyeonseoo/cspot/blob/main/components/my-page-panel.tsx"
click node_domain "https://github.com/yyeonseoo/cspot/blob/main/types/domain.ts"
click node_schedulelogic "https://github.com/yyeonseoo/cspot/blob/main/lib/schedule.ts"
click node_localdata "https://github.com/yyeonseoo/cspot/blob/main/lib/local-data.ts"
click node_remote "https://github.com/yyeonseoo/cspot/blob/main/lib/remote-data.ts"
click node_api "https://github.com/yyeonseoo/cspot/blob/main/app/api/data/route.ts"
click node_session "https://github.com/yyeonseoo/cspot/blob/main/lib/session.ts"
click node_permissions "https://github.com/yyeonseoo/cspot/blob/main/lib/permissions.ts"
click node_theme "https://github.com/yyeonseoo/cspot/blob/main/lib/theme.ts"
click node_items "https://github.com/yyeonseoo/cspot/blob/main/components/items.tsx"
click node_ui "https://github.com/yyeonseoo/cspot/blob/main/components/ui.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_page,node_login,node_shell toneBlue
class node_calendar,node_survey,node_practice,node_slots toneAmber
class node_performance,node_performanceview,node_overview,node_setlist,node_archive,node_archiveimport toneMint
class node_songs,node_users,node_notices,node_mypage toneRose
class node_domain,node_schedulelogic,node_localdata,node_remote,node_api,node_session,node_permissions,node_theme,node_items,node_ui,node_member toneIndigo
```

## Components

### Portal entry

- [Portal page](https://github.com/yyeonseoo/cspot/blob/main/app/page.tsx): `app/page.tsx`
- [Login screen](https://github.com/yyeonseoo/cspot/blob/main/components/login-screen.tsx): `components/login-screen.tsx`
- [App shell](https://github.com/yyeonseoo/cspot/blob/main/components/app-shell.tsx): `components/app-shell.tsx`

### Scheduling

- [Calendar](https://github.com/yyeonseoo/cspot/blob/main/components/calendar-panel.tsx): `components/calendar-panel.tsx`
- [Availability surveys](https://github.com/yyeonseoo/cspot/blob/main/components/survey-panel.tsx): `components/survey-panel.tsx`
- [Practice planning](https://github.com/yyeonseoo/cspot/blob/main/components/song-management-panel.tsx): `components/song-management-panel.tsx`
- [Availability grid](https://github.com/yyeonseoo/cspot/blob/main/components/slot-grid.tsx): `components/slot-grid.tsx`

### Performances

- [Performance manager](https://github.com/yyeonseoo/cspot/blob/main/components/performance-manager.tsx): `components/performance-manager.tsx`
- [Performance view](https://github.com/yyeonseoo/cspot/blob/main/components/performance-view.tsx): `components/performance-view.tsx`
- [Practice overview](https://github.com/yyeonseoo/cspot/blob/main/components/practice-overview.tsx): `components/practice-overview.tsx`
- [Setlist ordering](https://github.com/yyeonseoo/cspot/blob/main/components/setlist-order.tsx): `components/setlist-order.tsx`
- [Performance archive](https://github.com/yyeonseoo/cspot/blob/main/components/archive-panel.tsx): `components/archive-panel.tsx`
- [Archive import](https://github.com/yyeonseoo/cspot/blob/main/components/archive-import.tsx): `components/archive-import.tsx`

### Club management

- [Song editor](https://github.com/yyeonseoo/cspot/blob/main/components/leader-song-editor.tsx): `components/leader-song-editor.tsx`
- [User management](https://github.com/yyeonseoo/cspot/blob/main/components/users-panel.tsx): `components/users-panel.tsx`
- [Notices](https://github.com/yyeonseoo/cspot/blob/main/components/notice-panel.tsx): `components/notice-panel.tsx`
- [Member page](https://github.com/yyeonseoo/cspot/blob/main/components/my-page-panel.tsx): `components/my-page-panel.tsx`

### Data and domain

- [Club domain data](https://github.com/yyeonseoo/cspot/blob/main/types/domain.ts): `types/domain.ts`
- [Schedule rules](https://github.com/yyeonseoo/cspot/blob/main/lib/schedule.ts): `lib/schedule.ts`
- [Local data store](https://github.com/yyeonseoo/cspot/blob/main/lib/local-data.ts): `lib/local-data.ts`
- [Remote data access](https://github.com/yyeonseoo/cspot/blob/main/lib/remote-data.ts): `lib/remote-data.ts`
- [Data API route](https://github.com/yyeonseoo/cspot/blob/main/app/api/data/route.ts): `app/api/data/route.ts`
- [Session storage](https://github.com/yyeonseoo/cspot/blob/main/lib/session.ts): `lib/session.ts`
- [Role permissions](https://github.com/yyeonseoo/cspot/blob/main/lib/permissions.ts): `lib/permissions.ts`
- [Theme settings](https://github.com/yyeonseoo/cspot/blob/main/lib/theme.ts): `lib/theme.ts`
- [Shared display items](https://github.com/yyeonseoo/cspot/blob/main/components/items.tsx): `components/items.tsx`
- [Shared UI controls](https://github.com/yyeonseoo/cspot/blob/main/components/ui.tsx): `components/ui.tsx`

### Other components

- **Club member**

## Connections

- Club member → Portal page: opens (evidence: `app/page.tsx`)
- Portal page → Login screen: shows (evidence: `app/page.tsx`)
- Portal page → App shell: renders (evidence: `app/page.tsx`)
- Portal page → Local data store: loads data (evidence: `app/page.tsx`)
- Portal page → Session storage: reads session (evidence: `app/page.tsx`)
- Portal page → Remote data access: uses data access (evidence: `app/page.tsx`)
- Portal page → Role permissions: checks roles (evidence: `app/page.tsx`)
- Portal page → Theme settings: loads theme (evidence: `app/page.tsx`)
- Login screen → Session storage: writes session (evidence: `components/login-screen.tsx`)
- App shell → Calendar: renders (evidence: `components/app-shell.tsx`)
- App shell → Availability surveys: renders (evidence: `components/app-shell.tsx`)
- App shell → Practice planning: renders (evidence: `components/app-shell.tsx`)
- App shell → Performance manager: renders (evidence: `components/app-shell.tsx`)
- App shell → Performance view: renders (evidence: `components/app-shell.tsx`)
- App shell → Practice overview: renders (evidence: `components/app-shell.tsx`)
- App shell → Performance archive: renders (evidence: `components/app-shell.tsx`)
- App shell → User management: renders (evidence: `components/app-shell.tsx`)
- App shell → Notices: renders (evidence: `components/app-shell.tsx`)
- App shell → Member page: renders (evidence: `components/app-shell.tsx`)
- Availability surveys → Availability grid: renders (evidence: `components/survey-panel.tsx`)
- Availability surveys → Song editor: renders (evidence: `components/survey-panel.tsx`)
- Practice planning → Availability grid: uses (evidence: `components/song-management-panel.tsx`)
- Performance manager → Setlist ordering: renders (evidence: `components/performance-manager.tsx`)
- Performance manager → Archive import: renders (evidence: `components/performance-manager.tsx`)
- Performance archive → Shared display items: renders (evidence: `components/archive-panel.tsx`)
- Calendar → Shared display items: renders (evidence: `components/calendar-panel.tsx`)
- Calendar → Schedule rules: uses rules (evidence: `components/calendar-panel.tsx`)
- Availability surveys → Schedule rules: uses rules (evidence: `components/survey-panel.tsx`)
- App shell → Role permissions: checks roles (evidence: `components/app-shell.tsx`)
- App shell → Session storage: reads session (evidence: `components/app-shell.tsx`)
- Local data store → Club domain data: stores (evidence: `lib/local-data.ts`)
- Schedule rules → Club domain data: uses types (evidence: `lib/schedule.ts`)
- Session storage → Local data store: uses key (evidence: `lib/session.ts`)
- Data API route → Remote data access: delegates (evidence: `app/api/data/route.ts`)
- Performance manager → Local data store: persists changes (evidence: `components/performance-manager.tsx`)
- Performance archive → Local data store: uses archive data (evidence: `components/archive-panel.tsx`)
- User management → Role permissions: uses roles (evidence: `components/users-panel.tsx`)
- Shared display items → Schedule rules: uses colors (evidence: `components/items.tsx`)
- Shared display items → Club domain data: uses types (evidence: `components/items.tsx`)
- Shared UI controls → Schedule rules: uses helpers (evidence: `components/ui.tsx`)
