# Graph Report - /Users/etlab/projects/peak-did  (2026-04-25)

## Corpus Check
- 28 files · ~0 words
- Verdict: corpus is large enough that graph structure adds value.

## Summary
- 102 nodes · 118 edges · 23 communities detected
- Extraction: 76% EXTRACTED · 24% INFERRED · 0% AMBIGUOUS · INFERRED: 28 edges (avg confidence: 0.8)
- Token cost: 0 input · 0 output

## Community Hubs (Navigation)
- [[_COMMUNITY_DB Schema & Join Contract|DB Schema & Join Contract]]
- [[_COMMUNITY_API Board Route & Polling|API Board Route & Polling]]
- [[_COMMUNITY_Deployment & Site Operations|Deployment & Site Operations]]
- [[_COMMUNITY_ClassBoard View & Time Resolver|ClassBoard View & Time Resolver]]
- [[_COMMUNITY_CoreOutro Views & UTC Bug|Core/Outro Views & UTC Bug]]
- [[_COMMUNITY_Project Root Meta|Project Root Meta]]
- [[_COMMUNITY_Exercise View & Watermark|Exercise View & Watermark]]
- [[_COMMUNITY_TypeScript Data Types|TypeScript Data Types]]
- [[_COMMUNITY_CSS Tokens|CSS Tokens]]
- [[_COMMUNITY_Globals CSS|Globals CSS]]
- [[_COMMUNITY_systemd Service|systemd Service]]
- [[_COMMUNITY_Caddy Proxy|Caddy Proxy]]
- [[_COMMUNITY_Deploy Script|Deploy Script]]
- [[_COMMUNITY_PostCSS Config|PostCSS Config]]
- [[_COMMUNITY_Next.js Config|Next.js Config]]
- [[_COMMUNITY_Next.js Env Types|Next.js Env Types]]
- [[_COMMUNITY_Tailwind Config|Tailwind Config]]
- [[_COMMUNITY_Main Page|Main Page]]
- [[_COMMUNITY_Client Polling Interval|Client Polling Interval]]
- [[_COMMUNITY_fetchClasses God|fetchClasses God]]
- [[_COMMUNITY_peak DB God|peak DB God]]
- [[_COMMUNITY_resolveView God|resolveView God]]
- [[_COMMUNITY_globals.css God|globals.css God]]

## God Nodes (most connected - your core abstractions)
1. `GET /api/did/board` - 12 edges
2. `peak DB (readonly, 192.168.35.249:3306)` - 9 edges
3. `Peak DID Project (graph root)` - 9 edges
4. `fetchClasses() SQL helper` - 8 edges
5. `ViewSwitcher (polling + 4-view transitions)` - 8 edges
6. `resolveView(now)` - 7 edges
7. `ExerciseBoard (exercise view)` - 6 edges
8. `Peak DID Project` - 6 edges
9. `fetchExercisePlans() SQL helper` - 5 edges
10. `ClassBoard (pre_class view)` - 5 edges

## Surprising Connections (you probably didn't know these)
- `lib/mock.ts (mock=1 data)` --semantically_similar_to--> `global.__lastBoard stale cache fallback`  [INFERRED] [semantically similar]
  src/lib/mock.ts → API-SPEC.md
- `ExerciseBoard (exercise view)` --consumes--> `ExercisePlan interface`  [INFERRED]
  src/components/ExerciseBoard.tsx → API-SPEC.md
- `ExerciseBoard (exercise view)` --renders_view--> `exercise view (18:40-20:30)`  [EXTRACTED]
  src/components/ExerciseBoard.tsx → CLAUDE.md
- `ExerciseBoard (exercise view)` --uses--> `landscape grid (--cols-h × 1row)`  [INFERRED]
  src/components/ExerciseBoard.tsx → CLAUDE.md
- `ClassBoard (pre_class view)` --consumes--> `ClassCard interface`  [INFERRED]
  src/components/ClassBoard.tsx → API-SPEC.md

## Hyperedges (group relationships)
- **3-layer DID resilience: LEFT JOIN placeholder + stale cache + mock fallback** — placeholder_unassigned, stale_cache, lib_mock [INFERRED 0.85]
- **KST time resolution on UTC etserver: Intl.DateTimeFormat -> resolveView -> 4 views** — etserver_utc_timezone, lib_time_resolveview, bug_gethours_utc, view_pre_class, view_exercise, view_core, view_outro [EXTRACTED 0.95]
- **auto-scale design system: clamp(vw) + cqmin + portrait/landscape grid** — token_clamp_vw, token_cqmin, grid_landscape, grid_portrait [EXTRACTED 0.90]
- **ViewSwitcher stale-detection triad: client clock + server stale flag + UI warning** — viewswitcher_stale_warn_ms, viewswitcher_stale_flag, viewswitcher_api_did_board [EXTRACTED 0.90]
- **View selection logic: forced query view + server-determined view + toggle sequence** — viewswitcher_usequeryview, viewswitcher_toggle_sequence, viewswitcher_api_did_board [EXTRACTED 0.90]

## Communities

### Community 0 - "DB Schema & Join Contract"
Cohesion: 0.14
Nodes (22): class_id = class_num mapping (trainer_id NULL), paca DB (pacapro-managed master), peak DB (readonly, 192.168.35.249:3306), ilsanmaxtraining/backend cron sync (매시 5분), JOIN key: t.paca_user_id = instructor_id (NOT t.id), lib/db.ts (mysql2 pool), lib/mock.ts (mock=1 data), paca DB readonly / peak DB readonly (DID consumer) (+14 more)

### Community 1 - "API Board Route & Polling"
Cohesion: 0.23
Nodes (11): Community: API 라우트 & Polling, God node: GET /api/did/board (13 edges), God node: ViewSwitcher polling+4-view (10 edges), fetch /api/did/board (cache: no-store), POLL_MS=30000 (30s board polling), stale-flag UI banner, STALE_WARN_MS=120000 (2min client stale threshold), TOGGLE_MS=30000 (pre_class <-> exercise toggle) (+3 more)

### Community 2 - "Deployment & Site Operations"
Cohesion: 0.18
Nodes (11): Ilsan Academy (academy_id=2), past bug: cqh caused wrap in narrow portrait cards, etserver /home/et/peak-did (systemd port 3550), macOS rsync deploy flow, Chromium kiosk (zero touch/input), 43in FHD 1920x1080 monitor (140% Windows scale), overflow:hidden everywhere (no scroll rule), 17:00-21:00 daily operating window (+3 more)

### Community 3 - "ClassBoard View & Time Resolver"
Cohesion: 0.24
Nodes (10): ClassBoard (pre_class view), Clock (realtime), MottoCard (odd-count filler), .motto-image class, landscape grid (--cols-h × 1row), portrait grid (--cols-v × 2rows, ceil(n/2)), maxbro.png (MAX mascot flexing-arm illustration with Max calligraphy), lib/time.ts (KST resolveView) (+2 more)

### Community 4 - "Core/Outro Views & UTC Bug"
Cohesion: 0.25
Nodes (9): past bug: Date.getHours() returned UTC on etserver, CoreSession (core view), Outro (outro view), etserver UTC timezone fact, resolveView(now), lib/weekday.ts (WEEKDAY_GREETING + core constants), core view (20:30-21:00), exercise view (18:40-20:30) (+1 more)

### Community 5 - "Project Root Meta"
Cohesion: 0.22
Nodes (9): Community: DB 스키마 & 데이터 계약, Community: 배포 & 인프라, Community: 4뷰 전환 & 시간 로직, Community: Mock 데이터 & 시간 유틸, Community: TypeScript 타입 시스템, Community: UI 컴포넌트 & 스타일, Community: ViewSwitcher 내부, Peak DID Project (graph root) (+1 more)

### Community 6 - "Exercise View & Watermark"
Cohesion: 0.33
Nodes (7): ExerciseBoard (exercise view), .ex-stamp class (multiply + rotate(-8deg)), framer-motion 300ms fade transition, logo.png (BREAK YOUR LIMITS brand watermark), stamp-done.png (red distressed MAX rubber stamp), root layout.tsx, .watermark-overlay (body-direct div, z-index 2147483647)

### Community 7 - "TypeScript Data Types"
Cohesion: 0.6
Nodes (6): lib/types.ts, BoardPayload interface, ClassCard interface, ExerciseItem interface, ExercisePlan interface, Student interface

### Community 8 - "CSS Tokens"
Cohesion: 1.0
Nodes (1): styles/tokens.css (clamp vw tokens)

### Community 9 - "Globals CSS"
Cohesion: 1.0
Nodes (1): app/globals.css (container-query core)

### Community 10 - "systemd Service"
Cohesion: 1.0
Nodes (1): peak-did.service systemd unit

### Community 11 - "Caddy Proxy"
Cohesion: 1.0
Nodes (1): Caddy reverse_proxy snippet

### Community 12 - "Deploy Script"
Cohesion: 1.0
Nodes (1): deploy/install.sh

### Community 13 - "PostCSS Config"
Cohesion: 1.0
Nodes (0): 

### Community 14 - "Next.js Config"
Cohesion: 1.0
Nodes (0): 

### Community 15 - "Next.js Env Types"
Cohesion: 1.0
Nodes (0): 

### Community 16 - "Tailwind Config"
Cohesion: 1.0
Nodes (0): 

### Community 17 - "Main Page"
Cohesion: 1.0
Nodes (1): / main page

### Community 18 - "Client Polling Interval"
Cohesion: 1.0
Nodes (1): 30-second client polling

### Community 19 - "fetchClasses God"
Cohesion: 1.0
Nodes (1): God node: fetchClasses() (10 edges)

### Community 20 - "peak DB God"
Cohesion: 1.0
Nodes (1): God node: peak DB readonly 192.168.35.249:3306 (9 edges)

### Community 21 - "resolveView God"
Cohesion: 1.0
Nodes (1): God node: resolveView(now) (7 edges)

### Community 22 - "globals.css God"
Cohesion: 1.0
Nodes (1): God node: app/globals.css (container-query core, 7 edges)

## Knowledge Gaps
- **35 isolated node(s):** `styles/tokens.css (clamp vw tokens)`, `app/globals.css (container-query core)`, `peak-did.service systemd unit`, `Caddy reverse_proxy snippet`, `deploy/install.sh` (+30 more)
  These have ≤1 connection - possible missing edges or undocumented components.
- **Thin community `CSS Tokens`** (1 nodes): `styles/tokens.css (clamp vw tokens)`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Globals CSS`** (1 nodes): `app/globals.css (container-query core)`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `systemd Service`** (1 nodes): `peak-did.service systemd unit`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Caddy Proxy`** (1 nodes): `Caddy reverse_proxy snippet`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Deploy Script`** (1 nodes): `deploy/install.sh`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `PostCSS Config`** (1 nodes): `postcss.config.mjs`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Next.js Config`** (1 nodes): `next.config.mjs`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Next.js Env Types`** (1 nodes): `next-env.d.ts`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Tailwind Config`** (1 nodes): `tailwind.config.ts`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Main Page`** (1 nodes): `/ main page`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Client Polling Interval`** (1 nodes): `30-second client polling`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `fetchClasses God`** (1 nodes): `God node: fetchClasses() (10 edges)`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `peak DB God`** (1 nodes): `God node: peak DB readonly 192.168.35.249:3306 (9 edges)`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `resolveView God`** (1 nodes): `God node: resolveView(now) (7 edges)`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `globals.css God`** (1 nodes): `God node: app/globals.css (container-query core, 7 edges)`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.

## Suggested Questions
_Questions this graph is uniquely positioned to answer:_

- **Why does `GET /api/did/board` connect `DB Schema & Join Contract` to `Deployment & Site Operations`, `Core/Outro Views & UTC Bug`, `TypeScript Data Types`?**
  _High betweenness centrality (0.182) - this node is a cross-community bridge._
- **Why does `Peak DID Project` connect `Deployment & Site Operations` to `DB Schema & Join Contract`?**
  _High betweenness centrality (0.118) - this node is a cross-community bridge._
- **Why does `ExerciseBoard (exercise view)` connect `Exercise View & Watermark` to `DB Schema & Join Contract`, `ClassBoard View & Time Resolver`, `Core/Outro Views & UTC Bug`, `TypeScript Data Types`?**
  _High betweenness centrality (0.113) - this node is a cross-community bridge._
- **What connects `styles/tokens.css (clamp vw tokens)`, `app/globals.css (container-query core)`, `peak-did.service systemd unit` to the rest of the system?**
  _35 weakly-connected nodes found - possible documentation gaps or missing edges._
- **Should `DB Schema & Join Contract` be split into smaller, more focused modules?**
  _Cohesion score 0.14 - nodes in this community are weakly interconnected._