5 Commits

Author SHA1 Message Date
33087cc5b3 Make list pages fully dynamic; cache only at query level
Docker production build runs without DATABASE_URL, so any page Next
tries to prerender at build (force-static / revalidate without a
dynamic segment) fails on the Prisma call. Homepage, genre page, and
sitemap previously had page-level revalidate, forcing prerender. Add
force-dynamic to each and move the revalidation inside an
unstable_cache wrapper around the Prisma query — result still cached
5m / 1h at runtime, but build no longer touches the DB.

Detail page (/manga/[slug]) keeps page-level revalidate since its
dynamic segment without generateStaticParams was never prerendered at
build anyway.

Update CLAUDE.md caching section to reflect the new strategy.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 20:56:26 +08:00
dea57e6b28 Drop R2 URL signing; serve images via custom domain
Images now load direct from images.04080616.xyz. Removes read-side
signing (signUrl/signCoverUrls + callers), unlocking browser and
edge caching since URLs are stable. Presigned upload kept for /api/upload.
PageReader retries failed loads via onError as a safety net.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 19:29:11 +08:00
f2ef775f70 Consolidate project docs into CLAUDE.md, remove AGENTS.md
CLAUDE.md is now self-contained: absorbed the still-accurate parts of
AGENTS.md (Next.js-is-different warning, port allocation, Nginx block,
SEO notes, Meilisearch as phase-2 plan) and dropped the stale bits
(pre-width/height schema, "public domain only" content policy, old
manga.04080616.xyz domain, aspirational build order).

Also added findings surfaced by auditing CLAUDE.md against the actual
code:

- Placeholder-based reader architecture and its invariants (must have
  Page.width/height, scroll={false} on Links, history.replaceState for
  URL sync, prev/next derived from currentChapterNum).
- docker-compose.yml only brings up the app; Postgres is external.
- localStorage key format sunnymh:last-read:<slug> + legacy bare-number
  fallback that must be preserved.
- Immersive reader route: Header/BottomNav return null on /manga/[slug]/[n].
- signCoverUrls is the single source of truth for signed cover URLs.
- iOS Safari conventions: viewportFit cover, pt-safe/pb-safe, WebKit
  momentum scrolling, overflow-x:hidden.
- Dev gotchas: allowedDevOrigins VPN whitelist, prisma/seed.ts is
  docs-only, scraper is the real data pipeline.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 18:25:10 +08:00
9bd75381a7 Add hello world landing page and Docker deployment config
Simple landing page for initial Portainer GitOps deployment.
Includes Dockerfile, docker-compose.yml with pull_policy: build,
and project documentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 22:37:08 +08:00
c7374493c5 Initial commit from Create Next App 2026-03-24 22:20:52 +08:00