# cbbsjj0314/picking-my-time-sink architecture

> Architecture diagram of the GitHub repository cbbsjj0314/picking-my-time-sink, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cbbsjj0314/picking-my-time-sink
- Repository: https://github.com/cbbsjj0314/picking-my-time-sink

## Overview

Picking My Time Sink is a Steam-centered game-data dashboard, with bounded Chzzk observations and a limited trusted-mapping combined activity view. Its principal workflow is collect provider data, normalize and load it into Postgres, serve read-only API responses, then render Steam, Chzzk, and Combined views in the web app. Recovery and artifact handoff are supporting operational capabilities, not the production serving path. Relationships for unsampled modules are included only where the README or SOURCE INDEX supports them; the implementation details of those modules were not inspected.

Main entry points: [`web/src/App.tsx`](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/web/src/App.tsx) (Web application), [`src/chzzk/ingest/run_chzzk_regular_write_path.py`](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/chzzk/ingest/run_chzzk_regular_write_path.py) (Chzzk write path), [`src/api/app.py`](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/api/app.py) (FastAPI app), [`src/api/routers/games.py`](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/api/routers/games.py) (Games routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_steam["Steam data"]
  node_steam_fetch["Steam fetchers"]
  node_steam_pipeline["Steam pipeline"]
  node_steam_normalize["Steam normalization"]
  node_steam_probe["Steam probes<br/>[common.py]"]
end

subgraph group_chzzk["Chzzk observations"]
  node_chzzk_probe["Live-list probe"]
  node_chzzk_normalize["Category facts<br/>[category_lives.py]"]
  node_chzzk_write["Chzzk write path"]
  node_chzzk_manual["Fetch-load orchestration"]
end

subgraph group_serving["Read API"]
  node_postgres[("Postgres facts and serving views")]
  node_api_app["FastAPI app<br/>[app.py]"]
  node_games_router["Games routes<br/>[games.py]"]
  node_ccu_service["CCU service<br/>[ccu_service.py]"]
  node_price_service["Price service<br/>[price_service.py]"]
  node_chzzk_service["Chzzk service<br/>[chzzk_service.py]"]
  node_combined_service["Combined activity service"]
end

subgraph group_web["Dashboard"]
  node_web_app["Web application<br/>[App.tsx]"]
  node_steam_web_hook["Steam data hooks"]
  node_steam_web_api["Steam API client<br/>[games.ts]"]
  node_steam_view_model["Steam view models<br/>[steamViewModel.ts]"]
  node_chzzk_web_hook["Chzzk category hook"]
  node_combined_web_hook["Combined activity hook"]
end

subgraph group_ops["Recovery and operations"]
  node_recovery["Artifact recovery"]
  node_postgres_artifact["Postgres artifact"]
  node_r2_publish["Object-store publishing<br/>[r2_publish.py]"]
  node_resource_observability["Resource observability"]
end

node_steam_api(("Steam APIs"))
node_chzzk_api(("Chzzk APIs"))
node_object_store[("Object storage")]

node_steam_api -->|"supplies data"| node_steam_fetch
node_steam_pipeline -->|"runs fetchers"| node_steam_fetch
node_steam_pipeline -->|"runs transforms"| node_steam_normalize
node_steam_fetch -->|"hands off artifacts"| node_steam_normalize
node_steam_api -->|"probed by"| node_steam_probe
node_chzzk_api -->|"supplies observations"| node_chzzk_probe
node_chzzk_manual -->|"runs probe"| node_chzzk_probe
node_chzzk_manual -->|"dispatches write path"| node_chzzk_write
node_chzzk_probe -->|"produces category input"| node_chzzk_normalize
node_chzzk_write -->|"uses normalization"| node_chzzk_normalize
node_steam_normalize -->|"loads facts"| node_postgres
node_chzzk_write -->|"loads observations"| node_postgres
node_postgres -->|"serves read models"| node_api_app
node_api_app -->|"registers routes"| node_games_router
node_games_router -->|"calls service"| node_ccu_service
node_games_router -->|"calls service"| node_price_service
node_postgres -->|"queries serving views"| node_ccu_service
node_postgres -->|"queries serving views"| node_price_service
node_postgres -->|"queries observations"| node_chzzk_service
node_postgres -->|"queries combined view"| node_combined_service
node_api_app -->|"serves dashboard"| node_web_app
node_web_app -->|"uses hook"| node_steam_web_hook
node_steam_web_hook -->|"requests data"| node_steam_web_api
node_steam_web_hook -->|"uses view model"| node_steam_view_model
node_web_app -->|"uses hook"| node_chzzk_web_hook
node_web_app -->|"uses hook"| node_combined_web_hook
node_recovery -->|"verifies generation"| node_postgres_artifact
node_recovery -->|"uses published inventory"| node_r2_publish
node_r2_publish -->|"packages artifact"| node_postgres_artifact
node_r2_publish -->|"publishes artifacts"| node_object_store
node_resource_observability -.-> node_recovery

click node_steam_fetch "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/steam/ingest/fetch_reviews_daily.py"
click node_steam_pipeline "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/steam/ingest/run_steam_only_scheduled_pipeline.py"
click node_steam_normalize "https://github.com/cbbsjj0314/picking-my-time-sink/tree/main/src/steam/normalize"
click node_steam_probe "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/steam/probe/common.py"
click node_chzzk_probe "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/chzzk/probe/live_list_temporal_probe.py"
click node_chzzk_normalize "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/chzzk/normalize/category_lives.py"
click node_chzzk_write "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/chzzk/ingest/run_chzzk_regular_write_path.py"
click node_chzzk_manual "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/chzzk/ingest/run_chzzk_fetch_load_manual_orchestration.py"
click node_api_app "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/api/app.py"
click node_games_router "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/api/routers/games.py"
click node_ccu_service "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/api/services/ccu_service.py"
click node_price_service "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/api/services/price_service.py"
click node_chzzk_service "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/api/services/chzzk_service.py"
click node_combined_service "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/api/services/combined_service.py"
click node_web_app "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/web/src/App.tsx"
click node_steam_web_hook "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/web/src/hooks/useSteamOverview.ts"
click node_steam_web_api "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/web/src/api/games.ts"
click node_steam_view_model "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/web/src/lib/steamViewModel.ts"
click node_chzzk_web_hook "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/web/src/hooks/useChzzkCategoryOverview.ts"
click node_combined_web_hook "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/web/src/hooks/useCombinedGameActivity.ts"
click node_recovery "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/recovery/rotation_collect.py"
click node_postgres_artifact "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/recovery/postgres_artifact.py"
click node_r2_publish "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/recovery/r2_publish.py"
click node_resource_observability "https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/observability/resource_envelope.py"

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_steam_fetch,node_steam_pipeline,node_steam_normalize,node_steam_probe toneBlue
class node_chzzk_probe,node_chzzk_normalize,node_chzzk_write,node_chzzk_manual,node_object_store toneAmber
class node_postgres,node_api_app,node_games_router,node_ccu_service,node_price_service,node_chzzk_service,node_combined_service,node_steam_api,node_chzzk_api toneMint
class node_web_app,node_steam_web_hook,node_steam_web_api,node_steam_view_model,node_chzzk_web_hook,node_combined_web_hook toneRose
class node_recovery,node_postgres_artifact,node_r2_publish,node_resource_observability toneIndigo
```

## Components

### Steam data

- [Steam fetchers](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/steam/ingest/fetch_reviews_daily.py): `src/steam/ingest/fetch_reviews_daily.py`
- [Steam pipeline](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/steam/ingest/run_steam_only_scheduled_pipeline.py): `src/steam/ingest/run_steam_only_scheduled_pipeline.py`
- [Steam normalization](https://github.com/cbbsjj0314/picking-my-time-sink/tree/main/src/steam/normalize): `src/steam/normalize`
- [Steam probes](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/steam/probe/common.py): `src/steam/probe/common.py`

### Chzzk observations

- [Live-list probe](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/chzzk/probe/live_list_temporal_probe.py): `src/chzzk/probe/live_list_temporal_probe.py`
- [Category facts](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/chzzk/normalize/category_lives.py): `src/chzzk/normalize/category_lives.py`
- [Chzzk write path](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/chzzk/ingest/run_chzzk_regular_write_path.py): `src/chzzk/ingest/run_chzzk_regular_write_path.py`
- [Fetch-load orchestration](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/chzzk/ingest/run_chzzk_fetch_load_manual_orchestration.py): `src/chzzk/ingest/run_chzzk_fetch_load_manual_orchestration.py`

### Read API

- **Postgres facts and serving views**
- [FastAPI app](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/api/app.py): `src/api/app.py`
- [Games routes](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/api/routers/games.py): `src/api/routers/games.py`
- [CCU service](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/api/services/ccu_service.py): `src/api/services/ccu_service.py`
- [Price service](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/api/services/price_service.py): `src/api/services/price_service.py`
- [Chzzk service](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/api/services/chzzk_service.py): `src/api/services/chzzk_service.py`
- [Combined activity service](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/api/services/combined_service.py): `src/api/services/combined_service.py`

### Dashboard

- [Web application](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/web/src/App.tsx): `web/src/App.tsx`
- [Steam data hooks](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/web/src/hooks/useSteamOverview.ts): `web/src/hooks/useSteamOverview.ts`
- [Steam API client](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/web/src/api/games.ts): `web/src/api/games.ts`
- [Steam view models](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/web/src/lib/steamViewModel.ts): `web/src/lib/steamViewModel.ts`
- [Chzzk category hook](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/web/src/hooks/useChzzkCategoryOverview.ts): `web/src/hooks/useChzzkCategoryOverview.ts`
- [Combined activity hook](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/web/src/hooks/useCombinedGameActivity.ts): `web/src/hooks/useCombinedGameActivity.ts`

### Recovery and operations

- [Artifact recovery](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/recovery/rotation_collect.py): `src/recovery/rotation_collect.py`
- [Postgres artifact](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/recovery/postgres_artifact.py): `src/recovery/postgres_artifact.py`
- [Object-store publishing](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/recovery/r2_publish.py): `src/recovery/r2_publish.py`
- [Resource observability](https://github.com/cbbsjj0314/picking-my-time-sink/blob/main/src/observability/resource_envelope.py): `src/observability/resource_envelope.py`

### Other components

- **Steam APIs**
- **Chzzk APIs**
- **Object storage**

## Connections

- Steam APIs → Steam fetchers: supplies data
- Steam pipeline → Steam fetchers: runs fetchers (evidence: `src/steam/ingest/run_steam_only_scheduled_pipeline.py`)
- Steam pipeline → Steam normalization: runs transforms (evidence: `src/steam/ingest/run_steam_only_scheduled_pipeline.py`)
- Steam fetchers → Steam normalization: hands off artifacts
- Steam APIs → Steam probes: probed by
- Chzzk APIs → Live-list probe: supplies observations
- Fetch-load orchestration → Live-list probe: runs probe (evidence: `src/chzzk/ingest/run_chzzk_fetch_load_manual_orchestration.py`)
- Fetch-load orchestration → Chzzk write path: dispatches write path (evidence: `src/chzzk/ingest/run_chzzk_fetch_load_manual_orchestration.py`)
- Live-list probe → Category facts: produces category input (evidence: `src/chzzk/probe/live_list_temporal_probe.py`)
- Chzzk write path → Category facts: uses normalization (evidence: `src/chzzk/ingest/run_chzzk_regular_write_path.py`)
- Steam normalization → Postgres facts and serving views: loads facts
- Chzzk write path → Postgres facts and serving views: loads observations
- Postgres facts and serving views → FastAPI app: serves read models
- FastAPI app → Games routes: registers routes (evidence: `src/api/app.py`)
- Games routes → CCU service: calls service (evidence: `src/api/routers/games.py`)
- Games routes → Price service: calls service (evidence: `src/api/routers/games.py`)
- Postgres facts and serving views → CCU service: queries serving views (evidence: `src/api/services/ccu_service.py`)
- Postgres facts and serving views → Price service: queries serving views (evidence: `src/api/services/price_service.py`)
- Postgres facts and serving views → Chzzk service: queries observations
- Postgres facts and serving views → Combined activity service: queries combined view
- FastAPI app → Web application: serves dashboard
- Web application → Steam data hooks: uses hook (evidence: `web/src/App.tsx`)
- Steam data hooks → Steam API client: requests data (evidence: `web/src/hooks/useSteamOverview.ts`)
- Steam data hooks → Steam view models: uses view model (evidence: `web/src/hooks/useSteamOverview.ts`)
- Web application → Chzzk category hook: uses hook (evidence: `web/src/App.tsx`)
- Web application → Combined activity hook: uses hook (evidence: `web/src/App.tsx`)
- Artifact recovery → Postgres artifact: verifies generation (evidence: `src/recovery/rotation_collect.py`)
- Artifact recovery → Object-store publishing: uses published inventory (evidence: `src/recovery/rotation_collect.py`)
- Object-store publishing → Postgres artifact: packages artifact (evidence: `src/recovery/r2_publish.py`)
- Object-store publishing → Object storage: publishes artifacts
- Resource observability → Artifact recovery
