- KBO 공식 홈페이지에서 연도별 팀 순위 및 상대 전적 데이터를 가져오는 크롤링 스크립트를 구현했습니다. - ASP.NET의 ViewState 및 EventValidation 필드를 처리하여 동적인 연도 전환 요청을 지원합니다. - 데이터를 가독성 높은 콘솔 테이블 형태로 출력하거나 JSON 형식으로 변환하는 기능을 제공합니다.
13 KiB
`# Graph Report - docs/data-patterns (2026-05-29)
Corpus Check
- Corpus is ~13,070 words - fits in a single context window. You may not need a graph.
Summary
- 173 nodes · 177 edges · 28 communities (12 shown, 16 thin omitted)
- Extraction: 97% EXTRACTED · 3% INFERRED · 0% AMBIGUOUS · INFERRED: 5 edges (avg confidence: 0.91)
- Token cost: 154,966 input · 0 output
Community Hubs (Navigation)
- _COMMUNITY_ReadWrite Optimization Fixes
- _COMMUNITY_Archive & Stats Pipeline
- _COMMUNITY_Scoreboard & User Write Fixes
- _COMMUNITY_Client User Auth & Profile
- _COMMUNITY_Server Cron & Game Sync
- _COMMUNITY_Client KBO Data (RankPlayer)
- _COMMUNITY_Client KBO Schedule & GameDetail
- _COMMUNITY_Prediction Vote Flow
- _COMMUNITY_Server Vote & RTDB Layer
- _COMMUNITY_Game Trigger & Stats Invalidation
- _COMMUNITY_Attendance & Notification
- _COMMUNITY_Attendance Service (Server)
- _COMMUNITY_kboCache & Lock
- _COMMUNITY_User Profile Service
- _COMMUNITY_Scoreboard Cache
- _COMMUNITY_Nickname Reservation
- _COMMUNITY_voteHistory Subcollection
- _COMMUNITY_pointLedger Subcollection
- _COMMUNITY_Firebase Auth (Client)
- _COMMUNITY_Remote Config (Client)
- _COMMUNITY_Firestore Trigger
- _COMMUNITY_rankSnapshot Service
- _COMMUNITY_KBO External API
- _COMMUNITY_MemCache (In-Memory)
- _COMMUNITY_RTDB userVotes Path
- _COMMUNITY_RTDB scoreboardCache
- _COMMUNITY_Client Prediction Provider
- _COMMUNITY_Stats Cache (RTDB)
God Nodes (most connected - your core abstractions)
userService (Server)- 7 edgesdailyArchive Cron (03:00 KST)- 7 edgesUserRepository (keepAlive)- 7 edgeskboRepository (Server)- 6 edgesdailyArchive.ts (setDay + judgeDay)- 6 edgesFirestore users Collection- 5 edgesFirestore games Collection- 5 edgesRTDB /cache/stats/{uid} Path- 5 edgesscoreboardService (Server)- 5 edgesgameSyncService (Server)- 5 edges
Surprising Connections (you probably didn't know these)
RTDB: votes/{gameId}/counts (public read)--semantically_similar_to-->RTDB: voteAggregates/{gameId} (public read)[INFERRED] [semantically similar] graphify-out/tmp-corpus/backend_optimization-plan.md → graphify-out/tmp-corpus/client_improvements-client.mddailyArchive Cron (03:00 KST)--writes_to-->Firestore users Collection[EXTRACTED] graphify-out/tmp-corpus/backend_backend-writes.md → graphify-out/tmp-corpus/backend_backend-reads.mdClient FCM / users.fcmTokens Direct Write--writes_to-->Firestore users Collection[EXTRACTED] graphify-out/tmp-corpus/backend_data-lifecycle.md → graphify-out/tmp-corpus/backend_backend-reads.mdPOST /admin/game/end Endpoint (markGameEnded)--writes_to-->Firestore games Collection[EXTRACTED] graphify-out/tmp-corpus/backend_backend-writes.md → graphify-out/tmp-corpus/backend_backend-reads.mdgameResultService (Server)--reads_from-->RTDB /votes/{gameId} Path[EXTRACTED] graphify-out/tmp-corpus/backend_backend-writes.md → graphify-out/tmp-corpus/backend_backend-reads.md
Hyperedges (group relationships)
- KBO External Fetch to Cache to Client Endpoint Pipeline — backend_reads_external_kbo, backend_reads_firestore_kbocache, backend_reads_repo_kbocacherepo, backend_reads_firestore_kbolocks, backend_lifecycle_concept_distributedlock [EXTRACTED 1.00]
- dailyArchive Cron Write Pipeline — backend_writes_cron_dailyarchive, backend_reads_svc_judgmentservice, backend_reads_firestore_votehistory, backend_reads_firestore_users, backend_reads_svc_ranksnapshotservice, backend_reads_rtdb_scoreboardcache, backend_reads_rtdb_cachestats [EXTRACTED 1.00]
- onGameCompleted Fan-out Write Pattern — backend_writes_trigger_ongamecompleted, backend_writes_svc_gameresultservice, backend_reads_rtdb_uservotes, backend_reads_rtdb_cachestats, backend_lifecycle_concept_fanout [EXTRACTED 1.00]
- Backend Read Optimization Set R1 R4 R5 R7 — backend_improvements_reads_r1_gamedaycache, backend_improvements_reads_r4_backoff, backend_improvements_reads_r5_fieldmask, backend_improvements_reads_r7_parallelrank [EXTRACTED 1.00]
- Backend Write Optimization Set W1 through W6 — backend_improvements_writes_w1_diff, backend_improvements_writes_w2_votehistory, backend_improvements_writes_w3_statsdedup, backend_improvements_writes_w4_ranksnapshot, backend_improvements_writes_w5r6_photourl, backend_improvements_writes_w6_gamedetailttl [EXTRACTED 1.00]
- User Prediction Vote Flow — backend_writes_endpoint_post_prediction, backend_writes_endpoint_put_prediction, backend_reads_repo_voterepo, backend_reads_rtdb_votes, backend_reads_rtdb_uservotes [EXTRACTED 1.00]
- Tier 1 High-Impact Low-Risk Optimizations — opt_W1, opt_W2, opt_R1, opt_C1 [EXTRACTED 1.00]
- Tier 2 Medium-Impact Optimizations — opt_R2, opt_W3, opt_R3, opt_R4, opt_C2, opt_C3 [EXTRACTED 1.00]
- Tier 3 Small / Housekeeping Optimizations — opt_W4, opt_W5, opt_W6, opt_R5, opt_R6, opt_R7, opt_C4 [EXTRACTED 1.00]
- Applied Client Optimizations (opt/client-rw branch) — opt_C1, opt_C2, opt_C3, opt_C4, client_vote_repo_after, client_standings_provider_after, client_h2h_provider_after, client_ace_pitcher_after, client_current_user_after [EXTRACTED 1.00]
- SWR Cache Adapters (4 domains) — client_schedule_cache, client_game_detail_cache, client_day_record_cache, client_game_record_dates_cache [EXTRACTED 1.00]
- All Client Repositories (keepAlive) — client_game_repo, client_user_repo, client_prediction_repo, client_team_record_repo, client_player_repo, client_game_detail_repo, client_scoreboard_repo, client_attendance_repo [EXTRACTED 1.00]
- Duplicate CF Call Pattern (C2+C3) — client_provider_h2h, client_provider_rank, client_ep_rank, client_provider_ace_pitcher, client_provider_pitchers, client_ep_player [EXTRACTED 1.00]
Communities (28 total, 16 thin omitted)
Community 0 - "Read/Write Optimization Fixes"
Cohesion: 0.10 Nodes (22): R4: Cache Stampede Exponential Backoff Fix, R7: Multi-Year Rank Parallel Fetch Fix, W1: games syncGamesForMonth getAll+diff Fix, W6: game_detail Cache Bulk Invalidation Stopped, Client SWR Cache (swr_cache.dart), Distributed Lock (kboLocks TTL 30s), GET /kbo/gameDetail Endpoint, GET /kbo/player Endpoint (+14 more)
Community 1 - "Archive & Stats Pipeline"
Cohesion: 0.15 Nodes (18): R1: GameDayCache Memoization Fix, W2: voteHistory Double-Write Consolidation Fix, W3: Archive Stats Invalidation Fan-out Dedup Fix, Fan-out Write Pattern (stats invalidation), GET /prediction/games Endpoint, GET /stats Endpoint, Firestore games Collection, Firestore voteHistory Subcollection (+10 more)
Community 2 - "Scoreboard & User Write Fixes"
Cohesion: 0.13 Nodes (16): R5: Scoreboard Self-User FieldMask Fix, W4: Rank Snapshot Merged Into Judgment Tx Fix, W5+R6: getMe photoUrl Hot-Write Suppression Fix, Client FCM / users.fcmTokens Direct Write, Precompute Scoreboard Cache Concept, GET /prediction/scoreboard Endpoint, Firestore users Collection, RTDB /nicknames Path (+8 more)
Community 3 - "Client User Auth & Profile"
Cohesion: 0.14 Nodes (16): currentUser Provider After C4 (keepAlive), CF Endpoint: GET /user/check-nickname, CF Endpoint: DELETE /user, CF Endpoint: GET /user, CF Endpoint: PATCH /user (profile update), CF Endpoint: POST /user (onboarding), CF Endpoint: GET /prediction/scoreboard, CF Endpoint: GET /stats (+8 more)
Community 4 - "Server Cron & Game Sync"
Cohesion: 0.16 Nodes (15): Cron Job: 02:00 daily (syncGamesForMonth + kboCache invalidation), dailyArchive.ts (setDay + judgeDay), debugHandlers.ts (Unauthenticated forceSync/dailyArchive), syncGamesForMonth (gameSyncService.ts:63), Firestore: dailyArchive collection, Firestore: games collection, Firestore/Cache: kboCache (game_detail__ TTL), R1: dailyArchive listByDate Sharing (+7 more)
Community 5 - "Client KBO Data (Rank/Player)"
Cohesion: 0.16 Nodes (14): acePitcher Provider After C3 (derived from pitchers), CF Endpoint: GET /kbo/player, CF Endpoint: GET /kbo/rank, headToHead Provider After C2 (watches standings), Client Improvements Summary (C1-C4 Applied), PlayerRepository (keepAlive), acePitcher Provider (autoDispose, duplicate player call), h2h Provider (autoDispose, no cache, duplicates rank call) (+6 more)
Community 6 - "Client KBO Schedule & GameDetail"
Cohesion: 0.15 Nodes (13): DayRecordCache (day_prediction_record, skip if settled), CF Endpoint: GET /kbo/gameDetail, CF Endpoint: GET /kbo/schedule, GameDetailCache (game_detail namespace), GameDetailRepository (keepAlive), GameRecordDatesCache (game_record_dates namespace), GameRepository (keepAlive), DayPredictionRecord Provider (autoDispose + SWR skip if settled) (+5 more)
Community 7 - "Prediction Vote Flow"
Cohesion: 0.22 Nodes (11): CF Endpoint: GET /prediction (by date), CF Endpoint: POST /prediction, CF Endpoint: PUT /prediction, CF Endpoint: GET /prediction/summary (10s polling), PredictionRepository (keepAlive), PredictionAction Notifier (keepAlive), voteSummary Provider (StreamProvider 10s poll), VoteRepository After C1 (RTDB onValue subscription) (+3 more)
Community 8 - "Server Vote & RTDB Layer"
Cohesion: 0.20 Nodes (10): GET /kbo/games Endpoint, GET /prediction Endpoint, GET /prediction/summary Endpoint, In-Memory MemCache (Server-side), voteRepository (Server), RTDB /votes/{gameId} Path, gameListService (Server), predictionService (Server) (+2 more)
Community 9 - "Game Trigger & Stats Invalidation"
Cohesion: 0.22 Nodes (10): gameResultService.ts:42 (stats fan-out on game complete), CF: /stats (getStats Cloud Function), invalidateStats (/cache/stats/{uid} delete), judgeDay (judgmentService.ts:94), onGameCompleted.ts:59 (Firestore trigger), Firestore/Cache: /cache/stats/{uid}, Firestore: voteHistory collection, R2: getStats Incremental Aggregation (+2 more)
Community 10 - "Attendance & Notification"
Cohesion: 0.40 Nodes (5): AttendanceRepository (keepAlive), CF Endpoint: GET /attendance/month, CF Endpoint: POST /attendance/check-in, CF Endpoint: PATCH /users/me/notifications, CheckInController Notifier (autoDispose)
Community 11 - "Attendance Service (Server)"
Cohesion: 0.50 Nodes (4): Firestore attendance Subcollection, Firestore pointLedger Subcollection, attendanceService (Server), POST /attendance/check-in Endpoint
Knowledge Gaps
- 78 isolated node(s):
Firestore attendance Subcollection,Firestore pointLedger Subcollection,RTDB /nicknames Path,RTDB /userNicknames Path,scoreboardCacheRepository (Server)(+73 more) These have ≤1 connection - possible missing edges or undocumented components. - 16 thin communities (<3 nodes) omitted from report — run
graphify queryto explore isolated nodes.
Suggested Questions
Questions this graph is uniquely positioned to answer:
- Why does
C1: voteSummary Polling to RTDB SubscriptionconnectPrediction Vote FlowtoServer Cron & Game Sync,Client KBO Data (Rank/Player)? High betweenness centrality (0.090) - this node is a cross-community bridge. - Why does
Client Improvements Summary (C1-C4 Applied)connectClient KBO Data (Rank/Player)toClient User Auth & Profile,Prediction Vote Flow? High betweenness centrality (0.088) - this node is a cross-community bridge. - Why does
Cost Summary: Top Write/Read/Client CostsconnectServer Cron & Game SynctoPrediction Vote Flow? High betweenness centrality (0.070) - this node is a cross-community bridge. - What connects
Firestore attendance Subcollection,Firestore pointLedger Subcollection,RTDB /nicknames Pathto the rest of the system? 78 weakly-connected nodes found - possible documentation gaps or missing edges. - Should
Read/Write Optimization Fixesbe split into smaller, more focused modules? Cohesion score 0.1038961038961039 - nodes in this community are weakly interconnected. - Should
Scoreboard & User Write Fixesbe split into smaller, more focused modules? Cohesion score 0.13333333333333333 - nodes in this community are weakly interconnected. - Should
Client User Auth & Profilebe split into smaller, more focused modules? Cohesion score 0.14166666666666666 - nodes in this community are weakly interconnected.