# Graph Report - /Users/etlab/projects/imax-snapshot  (2026-04-27)

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

## Summary
- 276 nodes · 362 edges · 46 communities detected
- Extraction: 84% EXTRACTED · 16% INFERRED · 0% AMBIGUOUS · INFERRED: 57 edges (avg confidence: 0.83)
- Token cost: 0 input · 0 output

## Community Hubs (Navigation)
- [[_COMMUNITY_Community 0|Community 0]]
- [[_COMMUNITY_Community 1|Community 1]]
- [[_COMMUNITY_Community 2|Community 2]]
- [[_COMMUNITY_Community 3|Community 3]]
- [[_COMMUNITY_Community 4|Community 4]]
- [[_COMMUNITY_Community 5|Community 5]]
- [[_COMMUNITY_Community 6|Community 6]]
- [[_COMMUNITY_Community 7|Community 7]]
- [[_COMMUNITY_Community 8|Community 8]]
- [[_COMMUNITY_Community 9|Community 9]]
- [[_COMMUNITY_Community 10|Community 10]]
- [[_COMMUNITY_Community 11|Community 11]]
- [[_COMMUNITY_Community 12|Community 12]]
- [[_COMMUNITY_Community 13|Community 13]]
- [[_COMMUNITY_Community 14|Community 14]]
- [[_COMMUNITY_Community 15|Community 15]]
- [[_COMMUNITY_Community 16|Community 16]]
- [[_COMMUNITY_Community 17|Community 17]]
- [[_COMMUNITY_Community 18|Community 18]]
- [[_COMMUNITY_Community 19|Community 19]]
- [[_COMMUNITY_Community 20|Community 20]]
- [[_COMMUNITY_Community 21|Community 21]]
- [[_COMMUNITY_Community 22|Community 22]]
- [[_COMMUNITY_Community 23|Community 23]]
- [[_COMMUNITY_Community 24|Community 24]]
- [[_COMMUNITY_Community 25|Community 25]]
- [[_COMMUNITY_Community 26|Community 26]]
- [[_COMMUNITY_Community 27|Community 27]]
- [[_COMMUNITY_Community 28|Community 28]]
- [[_COMMUNITY_Community 29|Community 29]]
- [[_COMMUNITY_Community 30|Community 30]]
- [[_COMMUNITY_Community 31|Community 31]]
- [[_COMMUNITY_Community 32|Community 32]]
- [[_COMMUNITY_Community 33|Community 33]]
- [[_COMMUNITY_Community 34|Community 34]]
- [[_COMMUNITY_Community 35|Community 35]]
- [[_COMMUNITY_Community 36|Community 36]]
- [[_COMMUNITY_Community 37|Community 37]]
- [[_COMMUNITY_Community 38|Community 38]]
- [[_COMMUNITY_Community 39|Community 39]]
- [[_COMMUNITY_Community 40|Community 40]]
- [[_COMMUNITY_Community 41|Community 41]]
- [[_COMMUNITY_Community 42|Community 42]]
- [[_COMMUNITY_Community 43|Community 43]]
- [[_COMMUNITY_Community 44|Community 44]]
- [[_COMMUNITY_Community 45|Community 45]]

## God Nodes (most connected - your core abstractions)
1. `GET()` - 16 edges
2. `SQLite table: users (kakao_id, status, peak_student_id)` - 15 edges
3. `GET /api/auth/kakao/callback` - 14 edges
4. `lib/session (getSessionUser, createSession, deleteSession, SESSION_COOKIE)` - 14 edges
5. `API Reference doc` - 13 edges
6. `HomePage (record-type list, status banners)` - 12 edges
7. `lib/db (SQLite getDb)` - 10 edges
8. `POST()` - 10 edges
9. `POST /api/auth/register` - 9 edges
10. `GET /api/videos` - 9 edges

## Surprising Connections (you probably didn't know these)
- `SQLite table: users (kakao_id, status, peak_student_id)` --references--> `POST /api/admin/approve`  [EXTRACTED]
  app/api/auth/register/route.ts → docs/api-reference.md
- `Peak DB table: record_types` --references--> `GET /api/record-types`  [EXTRACTED]
  app/api/record-types/route.ts → docs/api-reference.md
- `SQLite table: users (kakao_id, status, peak_student_id)` --references--> `DB Schema doc`  [EXTRACTED]
  app/api/auth/register/route.ts → docs/db-schema.md
- `SQLite table: users (kakao_id, status, peak_student_id)` --references--> `User status flow (pending → approved/rejected)`  [EXTRACTED]
  app/api/auth/register/route.ts → docs/db-schema.md
- `SQLite table: users (kakao_id, status, peak_student_id)` --references--> `Peak MySQL students table`  [EXTRACTED]
  app/api/auth/register/route.ts → docs/db-schema.md

## Hyperedges (group relationships)
- **v2-upgrade PDCA cycle (95%, 1 iter)** —  [INFERRED 0.95]
- **student-saas PDCA cycle (85-92%, 0 iter)** —  [INFERRED 0.95]
- **iMax PWA 아이콘 세트** —  [INFERRED 0.90]
- **iMax 영상 병합 데이터 흐름** —  [INFERRED 0.95]

## Communities

### Community 0 - "Community 0"
Cohesion: 0.09
Nodes (12): sign(), verify(), getDb(), migrate(), getPeakPool(), GET(), notifyTelegram(), POST() (+4 more)

### Community 1 - "Community 1"
Cohesion: 0.1
Nodes (30): POST /api/admin/approve · /reject, GET /api/admin/pending, GET /api/auth/kakao + callback, GET /api/auth/me, POST /api/auth/register, GET /api/peak-students (admin), GET /api/record-types, iMax API Reference (+22 more)

### Community 2 - "Community 2"
Cohesion: 0.11
Nodes (25): AdminLoginPage (key entry, sessionStorage), POST /api/admin/approve endpoint, GET /api/admin/pending endpoint (x-admin-key), POST /api/admin/reject endpoint, POST /api/auth/logout endpoint, GET /api/auth/me endpoint, POST /api/auth/register endpoint, GET /api/peak-students?date= endpoint (+17 more)

### Community 3 - "Community 3"
Cohesion: 0.17
Nodes (22): Auth pattern: x-admin-key header == ADMIN_PASSWORD, User status flow (pending → approved/rejected), DB_PATH env (default cwd/data.db), iMax SQLite file (data.db, WAL), createSession(userId), deleteSession(sessionId), getDb(), getSessionUser() (+14 more)

### Community 4 - "Community 4"
Cohesion: 0.12
Nodes (22): GET /api/student-videos endpoint, lightweight-charts v5 addSeries(AreaSeries) pattern, Date+record_type_id merge logic (records ↔ videos), Peak system read-only constraint, ET server systemd port 3502, API Reference doc, Changelog, CLAUDE.md (project rules) (+14 more)

### Community 5 - "Community 5"
Cohesion: 0.11
Nodes (21): academy_id=2 (일산맥스 fixed filter), Admin approval workflow (peak_student_id matching), HMAC-SHA256 signed session cookies, iMax Student SaaS (imax.etlab.kr), Kakao OAuth 2.0 with state parameter, Decision: simple admin password (not Peak instructor account), Decision: inline video player (max-h-[50vh]) instead of fullscreen, Decision: /pending → redirect /home with inline status banner (+13 more)

### Community 6 - "Community 6"
Cohesion: 0.18
Nodes (18): BASE_URL env (default https://imax.etlab.kr), SESSION_SECRET / KAKAO_ADMIN_KEY env, Cookie: imax_kakao_temp (signed 10min), Cookie: imax_oauth_state (5min CSRF), Cookie: SESSION_COOKIE (httpOnly, 30d), Kakao API (kapi.kakao.com /v2/user/me), Kakao OAuth (kauth.kakao.com), Telegram Bot API (notifyTelegram) (+10 more)

### Community 7 - "Community 7"
Cohesion: 0.23
Nodes (17): Auth pattern: session user.status==approved + peak_student_id, PEAK_DB_HOST/USER/PASSWORD/NAME env, SESSION_COOKIE = imax_session, SESSION_DAYS = 30, Recorder API (PEAK_RECORDER_API /api/videos), Peak MySQL @ 192.168.35.249:3306 (peak), getPeakPool(), mysql2/promise driver (+9 more)

### Community 8 - "Community 8"
Cohesion: 0.15
Nodes (15): Decision: chart date dedup (best per day) + Y-axis invert for asc, Decision: direction-based best/worst calculation in stats API, Decision: defer Firebase Storage deletion to v3 (DB-only), Decision: PUT/DELETE /api/records/{id} on Recorder API, Decision: split /records/[studentId] page (not StudentCard extension), Decision: reuse GET /api/videos/today instead of new /list endpoint, Archive 2026-03 Index, v2-upgrade Analysis (+7 more)

### Community 9 - "Community 9"
Cohesion: 0.32
Nodes (8): navigator.serviceWorker (browser API), SWRegister client component, CACHE_NAME = imax-v2, sw activate handler, sw fetch handler (network-first, /api/* skipped), sw install handler, PRECACHE [/, /icon-192.png, /icon-512.png], service worker script (sw.js)

### Community 10 - "Community 10"
Cohesion: 0.33
Nodes (3): formatDate(), formatTime(), handleLogout()

### Community 11 - "Community 11"
Cohesion: 0.5
Nodes (5): Apple touch icon — iMAX 일산맥스 체대입시 (red i, white MAX, black bg), PWA icon 192x192 — iMAX 일산맥스 체대입시 (red i, white MAX, black bg), PWA icon 512x512 — iMAX 일산맥스 체대입시 (red i, white MAX, black bg), iMAX 일산맥스 logo (compact, white/red on white bg), 맥스체대입시 일산교육원 brand logo (black MAX wordmark with red runner X, on white bg)

### Community 12 - "Community 12"
Cohesion: 0.6
Nodes (0): 

### Community 13 - "Community 13"
Cohesion: 0.5
Nodes (4): ResizeObserver (browser API), RecordChart component, lightweight-charts (createChart, AreaSeries), DataPoint {time, value}

### Community 14 - "Community 14"
Cohesion: 0.67
Nodes (0): 

### Community 15 - "Community 15"
Cohesion: 1.0
Nodes (1): README (create-next-app)

### Community 16 - "Community 16"
Cohesion: 0.67
Nodes (0): 

### Community 17 - "Community 17"
Cohesion: 1.0
Nodes (0): 

### Community 18 - "Community 18"
Cohesion: 1.0
Nodes (0): 

### Community 19 - "Community 19"
Cohesion: 1.0
Nodes (0): 

### Community 20 - "Community 20"
Cohesion: 1.0
Nodes (0): 

### Community 21 - "Community 21"
Cohesion: 1.0
Nodes (0): 

### Community 22 - "Community 22"
Cohesion: 1.0
Nodes (0): 

### Community 23 - "Community 23"
Cohesion: 1.0
Nodes (0): 

### Community 24 - "Community 24"
Cohesion: 1.0
Nodes (0): 

### Community 25 - "Community 25"
Cohesion: 1.0
Nodes (1): PostCSS Config (Tailwind v4)

### Community 26 - "Community 26"
Cohesion: 1.0
Nodes (1): Next.js TypeScript Env Declaration

### Community 27 - "Community 27"
Cohesion: 1.0
Nodes (1): ESLint Config (next/core-web-vitals + ts)

### Community 28 - "Community 28"
Cohesion: 1.0
Nodes (1): Next.js Config (output:standalone)

### Community 29 - "Community 29"
Cohesion: 1.0
Nodes (1): iMAX App Metadata + PWA manifest

### Community 30 - "Community 30"
Cohesion: 1.0
Nodes (1): RecordSummary interface

### Community 31 - "Community 31"
Cohesion: 1.0
Nodes (1): RecordItem interface (peak|video source)

### Community 32 - "Community 32"
Cohesion: 1.0
Nodes (1): StatItem interface (best/avg/worst/count)

### Community 33 - "Community 33"
Cohesion: 1.0
Nodes (1): PendingUser interface

### Community 34 - "Community 34"
Cohesion: 1.0
Nodes (1): GET /api/auth/kakao endpoint (OAuth start)

### Community 35 - "Community 35"
Cohesion: 1.0
Nodes (1): README.md (Next.js bootstrap)

### Community 36 - "Community 36"
Cohesion: 1.0
Nodes (1): Stock file icon SVG (Next.js bootstrap default, gray #666)

### Community 37 - "Community 37"
Cohesion: 1.0
Nodes (1): Vercel triangle logo SVG (Next.js bootstrap default)

### Community 38 - "Community 38"
Cohesion: 1.0
Nodes (1): Next.js wordmark SVG (Next.js bootstrap default)

### Community 39 - "Community 39"
Cohesion: 1.0
Nodes (1): Stock globe icon SVG (Next.js bootstrap default, gray #666)

### Community 40 - "Community 40"
Cohesion: 1.0
Nodes (1): Stock window icon SVG (Next.js bootstrap default, gray #666)

### Community 41 - "Community 41"
Cohesion: 1.0
Nodes (0): 

### Community 42 - "Community 42"
Cohesion: 1.0
Nodes (0): 

### Community 43 - "Community 43"
Cohesion: 1.0
Nodes (0): 

### Community 44 - "Community 44"
Cohesion: 1.0
Nodes (0): 

### Community 45 - "Community 45"
Cohesion: 1.0
Nodes (0): 

## Knowledge Gaps
- **70 isolated node(s):** `PostCSS Config (Tailwind v4)`, `Next.js TypeScript Env Declaration`, `ESLint Config (next/core-web-vitals + ts)`, `Next.js Config (output:standalone)`, `iMAX App Metadata + PWA manifest` (+65 more)
  These have ≤1 connection - possible missing edges or undocumented components.
- **Thin community `Community 17`** (2 nodes): `RootLayout()`, `layout.tsx`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 18`** (2 nodes): `LandingPage()`, `page.tsx`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 19`** (2 nodes): `toggleSort()`, `page.tsx`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 20`** (2 nodes): `handleLogin()`, `page.tsx`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 21`** (2 nodes): `RegisterPage()`, `page.tsx`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 22`** (2 nodes): `PendingPage()`, `page.tsx`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 23`** (2 nodes): `RecordChart()`, `RecordChart.tsx`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 24`** (2 nodes): `SWRegister()`, `SWRegister.tsx`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 25`** (1 nodes): `PostCSS Config (Tailwind v4)`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 26`** (1 nodes): `Next.js TypeScript Env Declaration`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 27`** (1 nodes): `ESLint Config (next/core-web-vitals + ts)`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 28`** (1 nodes): `Next.js Config (output:standalone)`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 29`** (1 nodes): `iMAX App Metadata + PWA manifest`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 30`** (1 nodes): `RecordSummary interface`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 31`** (1 nodes): `RecordItem interface (peak|video source)`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 32`** (1 nodes): `StatItem interface (best/avg/worst/count)`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 33`** (1 nodes): `PendingUser interface`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 34`** (1 nodes): `GET /api/auth/kakao endpoint (OAuth start)`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 35`** (1 nodes): `README.md (Next.js bootstrap)`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 36`** (1 nodes): `Stock file icon SVG (Next.js bootstrap default, gray #666)`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 37`** (1 nodes): `Vercel triangle logo SVG (Next.js bootstrap default)`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 38`** (1 nodes): `Next.js wordmark SVG (Next.js bootstrap default)`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 39`** (1 nodes): `Stock globe icon SVG (Next.js bootstrap default, gray #666)`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 40`** (1 nodes): `Stock window icon SVG (Next.js bootstrap default, gray #666)`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 41`** (1 nodes): `postcss.config.mjs`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 42`** (1 nodes): `next-env.d.ts`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 43`** (1 nodes): `eslint.config.mjs`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 44`** (1 nodes): `next.config.ts`
  Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 45`** (1 nodes): `sw.js`
  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 `SQLite table: users (kakao_id, status, peak_student_id)` connect `Community 3` to `Community 4`, `Community 5`, `Community 6`?**
  _High betweenness centrality (0.114) - this node is a cross-community bridge._
- **Why does `DB Schema doc` connect `Community 4` to `Community 3`, `Community 7`?**
  _High betweenness centrality (0.098) - this node is a cross-community bridge._
- **Why does `GET /api/student-videos endpoint` connect `Community 4` to `Community 2`?**
  _High betweenness centrality (0.079) - this node is a cross-community bridge._
- **Are the 7 inferred relationships involving `GET()` (e.g. with `getSessionUser()` and `getPeakPool()`) actually correct?**
  _`GET()` has 7 INFERRED edges - model-reasoned connections that need verification._
- **Are the 4 inferred relationships involving `GET /api/auth/kakao/callback` (e.g. with `POST /api/auth/logout` and `POST /api/auth/register`) actually correct?**
  _`GET /api/auth/kakao/callback` has 4 INFERRED edges - model-reasoned connections that need verification._
- **What connects `PostCSS Config (Tailwind v4)`, `Next.js TypeScript Env Declaration`, `ESLint Config (next/core-web-vitals + ts)` to the rest of the system?**
  _70 weakly-connected nodes found - possible documentation gaps or missing edges._
- **Should `Community 0` be split into smaller, more focused modules?**
  _Cohesion score 0.09 - nodes in this community are weakly interconnected._