跳至主要内容

Cross-Repo Flows

這頁只描述跨 major system 的主流程。細節仍回到 source、tests 與 domain docs。

Twitch viewer watch flow

P0 complete
BoundarySource
Extension heartbeatapps/extension/src/hooks/useHeartbeat.ts
Extension API clientapps/extension/src/services/api.ts
Watch handlerservices/api/internal/handlers/watch_handler.go
Watch serviceservices/api/internal/services/watch_service.go
Points serviceservices/api/internal/services/points_service.go
Schema003_watch_points.sql, 012_tachi_balances.sql

Review focus:

  • heartbeat debounce / cadence 是否避免 double credit。
  • ledger insert 和 balance update 是否在同一個 consistency boundary。
  • API 回傳型別是否仍符合 extension hook 的假設。

Coupon redemption flow

P0 complete
BoundarySource
Extension coupon panelCouponShopPanel.tsx
Extension redeem logicredeemCouponForPanel.ts, couponRedeem.ts
Spend handlerspend_handler.go
Spend servicespend_service.go
tachiya clienttachiya_client.go
tachigo schema019_coupon_redemptions.sql
tachiya repohttps://github.com/nurockplayer/tachiya

Review focus:

  • spend / redemption update 要能處理 tachiya timeout、retry 與 partial failure。
  • external redemption id 應避免重複建立 coupon 或重複扣點。
  • tachiya 連結使用 master 穩定路徑;未合併內容要用 commit permalink。

Streamer / agency management flow

P1 stub

Coming soon. 第一版先保留入口,後續補完整 dashboard → tachigo API → channel / agency state flow。

目前可先從這些檔案開始: