Files
mangabaka-seeder/docs/plans/004-kakaopage.md
T

1.8 KiB

KakaoPage source — implementation plan

superpowers:executing-plans (native). Spec: docs/specs/004-kakaopage.md.

Goal: a kakaopage Source registered next to webtoons and tapas, plus per-host request headers.

Global constraints

src/core pure; tests offline on captured fixtures (done); no new dependencies.

Review focus

  1. seriesId=N must not match N0 in Wayback rows. → Task 1 test, Task 4 history test.
  2. A series without land_thumbnail (19+ edition) → one cover, no crash. → Task 3 test.
  3. Old dn-img-page.kakao.com …&filename=th3 URLs normalise to the original. → Task 1 test.
  4. The Referer reaches bff-page.kakao.com through both the server proxy and the userscript. → Task 2 tests.
  5. An unknown id gives a clear error. → Task 4 test.

Task 1: URLs (kakaopage/urls.ts)

  • Links (/content/N, /home?seriesId=N, m.), rejects; normalizeImageUrl; isSameKakaoSeries; overviewUrl(id). RED → GREEN → commit.

Task 2: Request headers (core/transport.ts, server/app.ts, userscript/gm.ts)

  • requestHeadersFor(url); the server proxy and gmTransport send it (tests on both). RED → GREEN → commit.

Task 3: Parsing (kakaopage/parse.ts)

  • parseOverview(json) (comic, novel, 19+ without land thumbnail, error body); extractCovers(html, pageUrl) for 2020/2022/2024 captures. RED → GREEN → commit.

Task 4: Source and registry

  • kakaopage Source through FakeTransport (resolve, currentCovers, unknown id, Wayback over both CDX fixtures keeps only this id); registry, allowlists, @connect, hint copy; README, ARCHITECTURE, DECISIONS. RED → GREEN → commit.

Task 5: Verify and finish

  • Real run in headless Chrome; final review; remove this plan; merge; push.