@ginhotaru282/reader 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -0
- package/.next/app-path-routes-manifest.json +15 -0
- package/.next/build-manifest.json +20 -0
- package/.next/package.json +1 -0
- package/.next/prerender-manifest.json +114 -0
- package/.next/required-server-files.json +334 -0
- package/.next/routes-manifest.json +149 -0
- package/.next/server/app/(reader)/[id]/page/app-paths-manifest.json +3 -0
- package/.next/server/app/(reader)/[id]/page/build-manifest.json +16 -0
- package/.next/server/app/(reader)/[id]/page/next-font-manifest.json +15 -0
- package/.next/server/app/(reader)/[id]/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/(reader)/[id]/page/server-reference-manifest.json +4 -0
- package/.next/server/app/(reader)/[id]/page.js +16 -0
- package/.next/server/app/(reader)/[id]/page.js.map +5 -0
- package/.next/server/app/(reader)/[id]/page.js.nft.json +1 -0
- package/.next/server/app/(reader)/[id]/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_global-error/page/build-manifest.json +16 -0
- package/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
- package/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_global-error/page.js +9 -0
- package/.next/server/app/_global-error/page.js.map +5 -0
- package/.next/server/app/_global-error/page.js.nft.json +1 -0
- package/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_global-error.html +1 -0
- package/.next/server/app/_global-error.meta +15 -0
- package/.next/server/app/_global-error.rsc +14 -0
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_full.segment.rsc +14 -0
- package/.next/server/app/_global-error.segments/_head.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_index.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
- package/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_not-found/page/build-manifest.json +16 -0
- package/.next/server/app/_not-found/page/next-font-manifest.json +11 -0
- package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_not-found/page.js +13 -0
- package/.next/server/app/_not-found/page.js.map +5 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_not-found.html +1 -0
- package/.next/server/app/_not-found.meta +16 -0
- package/.next/server/app/_not-found.rsc +16 -0
- package/.next/server/app/_not-found.segments/_full.segment.rsc +16 -0
- package/.next/server/app/_not-found.segments/_head.segment.rsc +6 -0
- package/.next/server/app/_not-found.segments/_index.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -0
- package/.next/server/app/api/bookmark/[id]/toggle/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/bookmark/[id]/toggle/route/build-manifest.json +9 -0
- package/.next/server/app/api/bookmark/[id]/toggle/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/bookmark/[id]/toggle/route.js +6 -0
- package/.next/server/app/api/bookmark/[id]/toggle/route.js.map +5 -0
- package/.next/server/app/api/bookmark/[id]/toggle/route.js.nft.json +1 -0
- package/.next/server/app/api/bookmark/[id]/toggle/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/chapter/[id]/audio/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/chapter/[id]/audio/route/build-manifest.json +9 -0
- package/.next/server/app/api/chapter/[id]/audio/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/chapter/[id]/audio/route.js +6 -0
- package/.next/server/app/api/chapter/[id]/audio/route.js.map +5 -0
- package/.next/server/app/api/chapter/[id]/audio/route.js.nft.json +1 -0
- package/.next/server/app/api/chapter/[id]/audio/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/chapter/[id]/audio-status/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/chapter/[id]/audio-status/route/build-manifest.json +9 -0
- package/.next/server/app/api/chapter/[id]/audio-status/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/chapter/[id]/audio-status/route.js +6 -0
- package/.next/server/app/api/chapter/[id]/audio-status/route.js.map +5 -0
- package/.next/server/app/api/chapter/[id]/audio-status/route.js.nft.json +1 -0
- package/.next/server/app/api/chapter/[id]/audio-status/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/chapter/[id]/unlock/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/chapter/[id]/unlock/route/build-manifest.json +9 -0
- package/.next/server/app/api/chapter/[id]/unlock/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/chapter/[id]/unlock/route.js +6 -0
- package/.next/server/app/api/chapter/[id]/unlock/route.js.map +5 -0
- package/.next/server/app/api/chapter/[id]/unlock/route.js.nft.json +1 -0
- package/.next/server/app/api/chapter/[id]/unlock/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/comment/story/[id]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/comment/story/[id]/route/build-manifest.json +9 -0
- package/.next/server/app/api/comment/story/[id]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/comment/story/[id]/route.js +6 -0
- package/.next/server/app/api/comment/story/[id]/route.js.map +5 -0
- package/.next/server/app/api/comment/story/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/comment/story/[id]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/reading-progress/[storyId]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/reading-progress/[storyId]/route/build-manifest.json +9 -0
- package/.next/server/app/api/reading-progress/[storyId]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/reading-progress/[storyId]/route.js +6 -0
- package/.next/server/app/api/reading-progress/[storyId]/route.js.map +5 -0
- package/.next/server/app/api/reading-progress/[storyId]/route.js.nft.json +1 -0
- package/.next/server/app/api/reading-progress/[storyId]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/reading-progress/sync/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/reading-progress/sync/route/build-manifest.json +9 -0
- package/.next/server/app/api/reading-progress/sync/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/reading-progress/sync/route.js +6 -0
- package/.next/server/app/api/reading-progress/sync/route.js.map +5 -0
- package/.next/server/app/api/reading-progress/sync/route.js.nft.json +1 -0
- package/.next/server/app/api/reading-progress/sync/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/story/[id]/combo-unlock/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/story/[id]/combo-unlock/route/build-manifest.json +9 -0
- package/.next/server/app/api/story/[id]/combo-unlock/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/story/[id]/combo-unlock/route.js +6 -0
- package/.next/server/app/api/story/[id]/combo-unlock/route.js.map +5 -0
- package/.next/server/app/api/story/[id]/combo-unlock/route.js.nft.json +1 -0
- package/.next/server/app/api/story/[id]/combo-unlock/route_client-reference-manifest.js +3 -0
- package/.next/server/app/icon.png/route/app-paths-manifest.json +3 -0
- package/.next/server/app/icon.png/route/build-manifest.json +9 -0
- package/.next/server/app/icon.png/route.js +7 -0
- package/.next/server/app/icon.png/route.js.map +5 -0
- package/.next/server/app/icon.png/route.js.nft.json +1 -0
- package/.next/server/app/icon.png.body +0 -0
- package/.next/server/app/icon.png.meta +1 -0
- package/.next/server/app/index.html +1 -0
- package/.next/server/app/index.meta +14 -0
- package/.next/server/app/index.rsc +16 -0
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +5 -0
- package/.next/server/app/index.segments/_full.segment.rsc +16 -0
- package/.next/server/app/index.segments/_head.segment.rsc +6 -0
- package/.next/server/app/index.segments/_index.segment.rsc +5 -0
- package/.next/server/app/index.segments/_tree.segment.rsc +4 -0
- package/.next/server/app/page/app-paths-manifest.json +3 -0
- package/.next/server/app/page/build-manifest.json +16 -0
- package/.next/server/app/page/next-font-manifest.json +11 -0
- package/.next/server/app/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/page/server-reference-manifest.json +4 -0
- package/.next/server/app/page.js +14 -0
- package/.next/server/app/page.js.map +5 -0
- package/.next/server/app/page.js.nft.json +1 -0
- package/.next/server/app/page_client-reference-manifest.js +3 -0
- package/.next/server/app-paths-manifest.json +15 -0
- package/.next/server/chunks/[externals]_next_dist_0iuj5m_._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ewmt7_._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0m1sn3r._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0rthafo._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0u0sxpl._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0xuaoik._.js +15 -0
- package/.next/server/chunks/[root-of-the-server]__0yuh9-6._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__10dmsr8._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ohu1lu._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ux8_la._.js +3 -0
- package/.next/server/chunks/[turbopack]_runtime.js +903 -0
- package/.next/server/chunks/_next-internal_server_app_api_bookmark_[id]_toggle_route_actions_0midgng.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_chapter_[id]_audio-status_route_actions_137h21m.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_chapter_[id]_audio_route_actions_1ursqip.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_chapter_[id]_unlock_route_actions_02wqhh1.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_comment_story_[id]_route_actions_0-k0u9j.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_reading-progress_[storyId]_route_actions_1wu6t2e.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_reading-progress_sync_route_actions_0bmsea-.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_story_[id]_combo-unlock_route_actions_1s8x_jq.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_icon_png_route_actions_1-lsc8h.js +3 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0nojrj_.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__01629yw._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__05n80pl._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0uw2vno._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ybcdc2._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1-g8gmo._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__13bnu2t._.js +6 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1dky4g0._.js +33 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1gdndpr._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1gux7cw._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1t3wpve._.js +33 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1vfpvus._.js +21 -0
- package/.next/server/chunks/ssr/[turbopack]_runtime.js +903 -0
- package/.next/server/chunks/ssr/_1dkuh1k._.js +8 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_(reader)_[id]_page_actions_1j9t8xe.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yr.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1j.js +3 -0
- package/.next/server/chunks/ssr/node_modules_0h91jdk._.js +33 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0bw_x_7._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0opsz1q._.js +6 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j3._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0-o-goa.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0x.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_01b_3bz.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_05derss.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0p62q26.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19--w_z.js +4 -0
- package/.next/server/functions-config-manifest.json +4 -0
- package/.next/server/middleware-build-manifest.js +20 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/next-font-manifest.js +1 -0
- package/.next/server/next-font-manifest.json +23 -0
- package/.next/server/pages/404.html +1 -0
- package/.next/server/pages/500.html +1 -0
- package/.next/server/pages-manifest.json +4 -0
- package/.next/server/prefetch-hints.json +1 -0
- package/.next/server/server-reference-manifest.js +1 -0
- package/.next/server/server-reference-manifest.json +5 -0
- package/.next/static/RFW2Gso53U4j44sDcC09J/_buildManifest.js +1 -0
- package/.next/static/RFW2Gso53U4j44sDcC09J/_clientMiddlewareManifest.js +1 -0
- package/.next/static/RFW2Gso53U4j44sDcC09J/_ssgManifest.js +1 -0
- package/.next/static/chunks/01dkdyukbdpqq.js +1 -0
- package/.next/static/chunks/05-c3ty_6dwfk.js +1 -0
- package/.next/static/chunks/0cz1d0mv5g_q7.js +1 -0
- package/.next/static/chunks/0w6_crw430jrp.css +3 -0
- package/.next/static/chunks/14mrh2-p_w84d.js +1 -0
- package/.next/static/chunks/1xxzci2thw472.css +4 -0
- package/.next/static/chunks/25o46h8mdjlrg.js +1 -0
- package/.next/static/chunks/2wkjp1bvz-w78.js +5 -0
- package/.next/static/chunks/3j8kcbmnuxd8g.js +1 -0
- package/.next/static/chunks/turbopack-1my_pp40jfqxc.js +1 -0
- package/.next/static/media/0b1dc8ddaa74ba49-s.0e__wj8580tc5.woff2 +0 -0
- package/.next/static/media/1a099d89ee94ee96-s.35a5cae5tspm2.woff2 +0 -0
- package/.next/static/media/4fa387ec64143e14-s.2tuy5pz7dlieh.woff2 +0 -0
- package/.next/static/media/507a47c1876d4ec2-s.2qdkzeru_ecot.woff2 +0 -0
- package/.next/static/media/53b9e256198e5412-s.390ncx5urfkfu.woff2 +0 -0
- package/.next/static/media/5ce348bf30bf5439-s.31988l_ccedte.woff2 +0 -0
- package/.next/static/media/6306c77e7c8268e4-s.2dbetqa9o8jxf.woff2 +0 -0
- package/.next/static/media/7178b3e590c64307-s.21jp631_3pja2.woff2 +0 -0
- package/.next/static/media/71fbf9c08529c2a5-s.2fpqrm51ez0iq.woff2 +0 -0
- package/.next/static/media/797e433ab948586e-s.p.0r6juujl39pe6.woff2 +0 -0
- package/.next/static/media/7d817b4c03b0c5f1-s.1uyisp29ctx0d.woff2 +0 -0
- package/.next/static/media/8a480f0b521d4e75-s.1qq4vpdcun5oj.woff2 +0 -0
- package/.next/static/media/8c2eb9ceedecfc8e-s.p.23aeddxv5enbo.woff2 +0 -0
- package/.next/static/media/ac34884600cd8d5d-s.2936i88_6qsfd.woff2 +0 -0
- package/.next/static/media/bbc41e54d2fcbd21-s.1rgnod-3esatf.woff2 +0 -0
- package/.next/static/media/caa3a2e1cccd8315-s.p.0wgildi0cnwt9.woff2 +0 -0
- package/.next/static/media/e1ccd2766b08c828-s.p.15gdzqknx46iu.woff2 +0 -0
- package/.next/static/media/e629b5bc06499d58-s.p.10u7vx61f1ie7.woff2 +0 -0
- package/.next/static/media/e7150917543fc9da-s.0mybutugvu-lq.woff2 +0 -0
- package/.next/static/media/e9457141811d41ae-s.02frcczqg7k-8.woff2 +0 -0
- package/.next/static/media/fba5a26ea33df6a3-s.p.18rizl4rsrl42.woff2 +0 -0
- package/.next/static/media/fef07dbb0973bf53-s.3p2_lha1f2xer.woff2 +0 -0
- package/.next/static/media/icon.189nugia0w7di.png +0 -0
- package/package.json +3 -1
- package/server.js +38 -0
- package/.dockerignore +0 -5
- package/.gitattributes +0 -2
- package/Dockerfile +0 -26
- package/README.md +0 -36
- package/eslint.config.mjs +0 -18
- package/next.config.ts +0 -8
- package/postcss.config.mjs +0 -7
- package/scripts/obfuscate-build.mjs +0 -77
- package/src/app/(reader)/[id]/page.tsx +0 -40
- package/src/app/(reader)/layout.tsx +0 -38
- package/src/app/api/bookmark/[id]/toggle/route.ts +0 -41
- package/src/app/api/chapter/[id]/audio/route.ts +0 -37
- package/src/app/api/chapter/[id]/audio-status/route.ts +0 -36
- package/src/app/api/chapter/[id]/unlock/route.ts +0 -49
- package/src/app/api/comment/story/[id]/route.ts +0 -48
- package/src/app/api/reading-progress/[storyId]/route.ts +0 -26
- package/src/app/api/reading-progress/sync/route.ts +0 -38
- package/src/app/api/story/[id]/combo-unlock/route.ts +0 -47
- package/src/app/globals.css +0 -26
- package/src/app/icon.png +0 -0
- package/src/app/layout.tsx +0 -35
- package/src/app/page.tsx +0 -3
- package/src/components/ssr/Skeleton/index.module.css +0 -22
- package/src/components/ssr/Skeleton/index.tsx +0 -38
- package/src/modules/reader/ReaderView.tsx +0 -48
- package/src/modules/reader/api/backend-data.ts +0 -231
- package/src/modules/reader/api/client-audio-api.ts +0 -33
- package/src/modules/reader/api/client-bookmark-api.ts +0 -21
- package/src/modules/reader/api/client-comment-api.ts +0 -31
- package/src/modules/reader/api/client-progress-api.ts +0 -36
- package/src/modules/reader/api/client-purchase-api.ts +0 -64
- package/src/modules/reader/api/get-reader-page-data.ts +0 -48
- package/src/modules/reader/api/types.ts +0 -47
- package/src/modules/reader/components/AudioPlayerBar.tsx +0 -299
- package/src/modules/reader/components/AutoScrollDrawer.tsx +0 -58
- package/src/modules/reader/components/ChapterBottomNav.tsx +0 -16
- package/src/modules/reader/components/ChapterContent.tsx +0 -43
- package/src/modules/reader/components/ChapterListDrawer.tsx +0 -84
- package/src/modules/reader/components/ChapterNav.tsx +0 -20
- package/src/modules/reader/components/ChapterSelect.tsx +0 -24
- package/src/modules/reader/components/ChapterWatermark.tsx +0 -53
- package/src/modules/reader/components/CommentSection.tsx +0 -156
- package/src/modules/reader/components/LockedChapterGate.tsx +0 -37
- package/src/modules/reader/components/MobileDock.tsx +0 -62
- package/src/modules/reader/components/NavButton.tsx +0 -22
- package/src/modules/reader/components/ReaderBreadcrumbs.tsx +0 -20
- package/src/modules/reader/components/ReaderChrome.tsx +0 -206
- package/src/modules/reader/components/ReaderToolbar.tsx +0 -52
- package/src/modules/reader/components/ReaderTopbar.tsx +0 -31
- package/src/modules/reader/components/SettingsPanel.tsx +0 -158
- package/src/modules/reader/components/Toast.tsx +0 -15
- package/src/modules/reader/constants/index.ts +0 -22
- package/src/modules/reader/hooks/useAudioPlayer.ts +0 -633
- package/src/modules/reader/hooks/useAutoScroll.ts +0 -31
- package/src/modules/reader/hooks/useBookmark.ts +0 -32
- package/src/modules/reader/hooks/useComments.ts +0 -86
- package/src/modules/reader/hooks/useContentProtection.ts +0 -81
- package/src/modules/reader/hooks/useDrawers.ts +0 -27
- package/src/modules/reader/hooks/useFullscreen.ts +0 -24
- package/src/modules/reader/hooks/usePrefs.ts +0 -66
- package/src/modules/reader/hooks/useReaderView.ts +0 -190
- package/src/modules/reader/hooks/useReadingProgress.ts +0 -95
- package/src/modules/reader/hooks/useScrollVisibility.ts +0 -44
- package/src/modules/reader/hooks/useToast.ts +0 -19
- package/src/modules/reader/hooks/useUnlock.ts +0 -59
- package/src/modules/reader/styles/reader.module.css +0 -1986
- package/src/modules/reader/types.ts +0 -145
- package/src/modules/reader/utils/affiliate.ts +0 -43
- package/src/modules/reader/utils/chapter-label.ts +0 -8
- package/src/modules/reader/utils/format-date.ts +0 -10
- package/src/modules/reader/utils/obfuscate-content.ts +0 -70
- package/src/modules/reader/utils/silent-wav.ts +0 -33
- package/src/modules/reader/utils/tiktok-tts.ts +0 -251
- package/src/modules/reader/utils/word-svg.ts +0 -132
- package/tsconfig.json +0 -34
package/README.md
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
|
|
2
|
-
|
|
3
|
-
## Getting Started
|
|
4
|
-
|
|
5
|
-
First, run the development server:
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm run dev
|
|
9
|
-
# or
|
|
10
|
-
yarn dev
|
|
11
|
-
# or
|
|
12
|
-
pnpm dev
|
|
13
|
-
# or
|
|
14
|
-
bun dev
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
|
18
|
-
|
|
19
|
-
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
|
20
|
-
|
|
21
|
-
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
|
|
22
|
-
|
|
23
|
-
## Learn More
|
|
24
|
-
|
|
25
|
-
To learn more about Next.js, take a look at the following resources:
|
|
26
|
-
|
|
27
|
-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
|
28
|
-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
|
29
|
-
|
|
30
|
-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
|
|
31
|
-
|
|
32
|
-
## Deploy on Vercel
|
|
33
|
-
|
|
34
|
-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
|
35
|
-
|
|
36
|
-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
|
package/eslint.config.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { defineConfig, globalIgnores } from "eslint/config";
|
|
2
|
-
import nextVitals from "eslint-config-next/core-web-vitals";
|
|
3
|
-
import nextTs from "eslint-config-next/typescript";
|
|
4
|
-
|
|
5
|
-
const eslintConfig = defineConfig([
|
|
6
|
-
...nextVitals,
|
|
7
|
-
...nextTs,
|
|
8
|
-
// Override default ignores of eslint-config-next.
|
|
9
|
-
globalIgnores([
|
|
10
|
-
// Default ignores of eslint-config-next:
|
|
11
|
-
".next/**",
|
|
12
|
-
"out/**",
|
|
13
|
-
"build/**",
|
|
14
|
-
"next-env.d.ts",
|
|
15
|
-
]),
|
|
16
|
-
]);
|
|
17
|
-
|
|
18
|
-
export default eslintConfig;
|
package/next.config.ts
DELETED
package/postcss.config.mjs
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
// Chạy sau `next build`: obfuscate các JS chunk phía client trong .next/static để người dùng
|
|
2
|
-
// mở DevTools không đọc được thẳng code app (không nhắm tới crawler). KHÔNG đụng vào
|
|
3
|
-
// .next/server (code chạy trên server không lộ ra trình duyệt nên không cần, và obfuscate có
|
|
4
|
-
// thể phá code Node).
|
|
5
|
-
import { readdirSync, readFileSync, writeFileSync, statSync } from "node:fs";
|
|
6
|
-
import { join } from "node:path";
|
|
7
|
-
import JavaScriptObfuscator from "javascript-obfuscator";
|
|
8
|
-
|
|
9
|
-
const staticDir = join(process.cwd(), ".next", "static");
|
|
10
|
-
|
|
11
|
-
// Turbopack đặt tên chunk bằng hash ngẫu nhiên, không có quy ước "framework-*"/"main-*"
|
|
12
|
-
// như webpack, nên không thể skip riêng React/Next runtime theo tên file — chúng bị trộn
|
|
13
|
-
// chung với code app trong cùng chunk. Dùng ngưỡng dung lượng để né: vendor/React đã minify
|
|
14
|
-
// thường lớn hơn nhiều so với code app, nên các chunk lớn nhiều khả năng chứa runtime/vendor
|
|
15
|
-
// và được bỏ qua để giảm rủi ro phá hydration.
|
|
16
|
-
const SKIP_PATTERNS = [/^turbopack-/];
|
|
17
|
-
const MAX_OBFUSCATE_BYTES = 50_000;
|
|
18
|
-
|
|
19
|
-
// Chunk chứa code app (word-svg.ts/obfuscate-content.ts...) bị Turbopack gộp chung với
|
|
20
|
-
// opentype.js nên vượt ngưỡng size ở trên, nhưng lại chính là chunk to nhất — thứ một người
|
|
21
|
-
// dùng tò mò mở DevTools sẽ bấm vào xem đầu tiên. Luôn obfuscate các chunk này bất kể dung
|
|
22
|
-
// lượng, nhận diện qua marker nội dung vì tên chunk là hash ngẫu nhiên, không cố định giữa
|
|
23
|
-
// các lần build.
|
|
24
|
-
const FORCE_INCLUDE_MARKERS = [/jakarta/i, /opentype/i, /glyph/i];
|
|
25
|
-
|
|
26
|
-
function listJsFiles(dir) {
|
|
27
|
-
const out = [];
|
|
28
|
-
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
29
|
-
const full = join(dir, entry.name);
|
|
30
|
-
if (entry.isDirectory()) {
|
|
31
|
-
out.push(...listJsFiles(full));
|
|
32
|
-
} else if (entry.name.endsWith(".js") && !entry.name.endsWith(".map")) {
|
|
33
|
-
out.push(full);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return out;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function main() {
|
|
40
|
-
let files;
|
|
41
|
-
try {
|
|
42
|
-
files = listJsFiles(staticDir);
|
|
43
|
-
} catch {
|
|
44
|
-
console.error(`Không tìm thấy ${staticDir} — hãy chạy "next build" trước.`);
|
|
45
|
-
process.exit(1);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
let count = 0;
|
|
49
|
-
for (const file of files) {
|
|
50
|
-
if (SKIP_PATTERNS.some((re) => re.test(file.split("/").pop()))) continue;
|
|
51
|
-
|
|
52
|
-
const code = readFileSync(file, "utf8");
|
|
53
|
-
const forceInclude = FORCE_INCLUDE_MARKERS.some((re) => re.test(code));
|
|
54
|
-
if (!forceInclude && statSync(file).size > MAX_OBFUSCATE_BYTES) continue;
|
|
55
|
-
|
|
56
|
-
const result = JavaScriptObfuscator.obfuscate(code, {
|
|
57
|
-
compact: true,
|
|
58
|
-
controlFlowFlattening: false,
|
|
59
|
-
deadCodeInjection: false,
|
|
60
|
-
selfDefending: false,
|
|
61
|
-
debugProtection: false,
|
|
62
|
-
disableConsoleOutput: false,
|
|
63
|
-
stringArray: true,
|
|
64
|
-
stringArrayEncoding: ["base64"],
|
|
65
|
-
rotateStringArrayIndex: false,
|
|
66
|
-
identifierNamesGenerator: "hexadecimal",
|
|
67
|
-
renameGlobals: false,
|
|
68
|
-
sourceMap: false,
|
|
69
|
-
});
|
|
70
|
-
writeFileSync(file, result.getObfuscatedCode());
|
|
71
|
-
count++;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
console.log(`Đã obfuscate ${count} file JS trong ${staticDir}`);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
main();
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Suspense } from "react";
|
|
2
|
-
import { cookies } from "next/headers";
|
|
3
|
-
import type { Viewport } from "next";
|
|
4
|
-
import ReaderView from "@/modules/reader/ReaderView";
|
|
5
|
-
import { ReaderLoadingSkeleton } from "@/components/ssr/Skeleton";
|
|
6
|
-
import { THEME_COOKIE, THEME_BG } from "@/modules/reader/constants";
|
|
7
|
-
import type { Theme } from "@/modules/reader/hooks/usePrefs";
|
|
8
|
-
|
|
9
|
-
type Params = { id: string };
|
|
10
|
-
|
|
11
|
-
const VALID_THEMES: Theme[] = ["light", "sepia", "dark"];
|
|
12
|
-
|
|
13
|
-
async function resolveTheme(): Promise<Theme> {
|
|
14
|
-
const cookieStore = await cookies();
|
|
15
|
-
const saved = cookieStore.get(THEME_COOKIE)?.value;
|
|
16
|
-
return VALID_THEMES.includes(saved as Theme) ? (saved as Theme) : "light";
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Fills Safari's translucent toolbar with the reader's own background from
|
|
20
|
-
// the very first paint (via the same cookie the SSR skeleton uses), instead
|
|
21
|
-
// of leaving it to blur/bleed the page content beneath it.
|
|
22
|
-
export async function generateViewport(): Promise<Viewport> {
|
|
23
|
-
const theme = await resolveTheme();
|
|
24
|
-
return { themeColor: THEME_BG[theme] };
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export default async function ReaderPage({
|
|
28
|
-
params,
|
|
29
|
-
}: {
|
|
30
|
-
params: Promise<Params>;
|
|
31
|
-
}) {
|
|
32
|
-
const { id } = await params;
|
|
33
|
-
const theme = await resolveTheme();
|
|
34
|
-
|
|
35
|
-
return (
|
|
36
|
-
<Suspense key={id} fallback={<ReaderLoadingSkeleton theme={theme} />}>
|
|
37
|
-
<ReaderView id={id} />
|
|
38
|
-
</Suspense>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { Metadata } from "next";
|
|
2
|
-
import { Lora, Plus_Jakarta_Sans } from "next/font/google";
|
|
3
|
-
import "@/modules/reader/styles/reader.module.css";
|
|
4
|
-
|
|
5
|
-
const lora = Lora({
|
|
6
|
-
variable: "--font-reader-serif",
|
|
7
|
-
subsets: ["latin", "vietnamese"],
|
|
8
|
-
weight: ["400", "500", "600", "700"],
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
const jakarta = Plus_Jakarta_Sans({
|
|
12
|
-
variable: "--font-reader-sans",
|
|
13
|
-
subsets: ["latin", "vietnamese"],
|
|
14
|
-
weight: ["400", "500", "600", "700", "800"],
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export const metadata: Metadata = {
|
|
18
|
-
title: {
|
|
19
|
-
template: "%s",
|
|
20
|
-
default: "Đọc truyện",
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default function ReaderLayout({
|
|
25
|
-
children,
|
|
26
|
-
}: {
|
|
27
|
-
children: React.ReactNode;
|
|
28
|
-
}) {
|
|
29
|
-
return (
|
|
30
|
-
<div className={`${lora.variable} ${jakarta.variable}`}>
|
|
31
|
-
<link
|
|
32
|
-
rel="stylesheet"
|
|
33
|
-
href="https://fonts.googleapis.com/icon?family=Material+Icons+Round"
|
|
34
|
-
/>
|
|
35
|
-
{children}
|
|
36
|
-
</div>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { NextRequest, NextResponse } from "next/server";
|
|
2
|
-
|
|
3
|
-
// Proxies the bookmark toggle to the backend, server-to-server — same shape
|
|
4
|
-
// as the unlock/combo-unlock routes. Response is already flat
|
|
5
|
-
// ({ success, isBookmarked }), no ApiResponse<T> envelope, so it's just
|
|
6
|
-
// forwarded through as-is.
|
|
7
|
-
const API_BASE_URL = process.env.API_BASE_URL;
|
|
8
|
-
|
|
9
|
-
export async function POST(request: NextRequest, { params }: { params: Promise<{ id: string }> }) {
|
|
10
|
-
const { id } = await params;
|
|
11
|
-
|
|
12
|
-
if (!API_BASE_URL) {
|
|
13
|
-
return NextResponse.json(
|
|
14
|
-
{ success: false, message: "API_BASE_URL is not configured." },
|
|
15
|
-
{ status: 500 }
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const jwt = request.cookies.get("jwt")?.value;
|
|
20
|
-
if (!jwt) {
|
|
21
|
-
return NextResponse.json({ success: false, message: "unauthorized" }, { status: 401 });
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
try {
|
|
25
|
-
const res = await fetch(`${API_BASE_URL}/bookmark/${id}/toggle`, {
|
|
26
|
-
method: "POST",
|
|
27
|
-
headers: { Cookie: `jwt=${jwt}` },
|
|
28
|
-
cache: "no-store",
|
|
29
|
-
});
|
|
30
|
-
const body = await res.text();
|
|
31
|
-
return new NextResponse(body, {
|
|
32
|
-
status: res.status,
|
|
33
|
-
headers: { "Content-Type": "application/json" },
|
|
34
|
-
});
|
|
35
|
-
} catch {
|
|
36
|
-
return NextResponse.json(
|
|
37
|
-
{ success: false, message: "Không thể kết nối server" },
|
|
38
|
-
{ status: 502 }
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { NextRequest, NextResponse } from "next/server";
|
|
2
|
-
|
|
3
|
-
// Proxies the "Studio" TTS request to the backend, server-to-server, so the
|
|
4
|
-
// browser never needs API_BASE_URL directly (mirrors backend-data.ts's
|
|
5
|
-
// server-only fetch pattern from the anti-crawl plan).
|
|
6
|
-
const API_BASE_URL = process.env.API_BASE_URL;
|
|
7
|
-
|
|
8
|
-
export async function POST(request: NextRequest, { params }: { params: Promise<{ id: string }> }) {
|
|
9
|
-
const { id } = await params;
|
|
10
|
-
|
|
11
|
-
if (!API_BASE_URL) {
|
|
12
|
-
return NextResponse.json(
|
|
13
|
-
{ success: false, message: "API_BASE_URL is not configured.", data: null },
|
|
14
|
-
{ status: 500 }
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const jwt = request.cookies.get("jwt")?.value;
|
|
19
|
-
|
|
20
|
-
try {
|
|
21
|
-
const res = await fetch(`${API_BASE_URL}/chapter/${id}/audio`, {
|
|
22
|
-
method: "POST",
|
|
23
|
-
headers: jwt ? { Cookie: `jwt=${jwt}` } : undefined,
|
|
24
|
-
cache: "no-store",
|
|
25
|
-
});
|
|
26
|
-
const body = await res.text();
|
|
27
|
-
return new NextResponse(body, {
|
|
28
|
-
status: res.status,
|
|
29
|
-
headers: { "Content-Type": "application/json" },
|
|
30
|
-
});
|
|
31
|
-
} catch {
|
|
32
|
-
return NextResponse.json(
|
|
33
|
-
{ success: false, message: "Không thể kết nối server", data: null },
|
|
34
|
-
{ status: 502 }
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { NextRequest, NextResponse } from "next/server";
|
|
2
|
-
|
|
3
|
-
// Proxies the "Studio" TTS status poll to the backend, server-to-server, so
|
|
4
|
-
// the browser never needs API_BASE_URL directly (mirrors backend-data.ts's
|
|
5
|
-
// server-only fetch pattern from the anti-crawl plan).
|
|
6
|
-
const API_BASE_URL = process.env.API_BASE_URL;
|
|
7
|
-
|
|
8
|
-
export async function GET(request: NextRequest, { params }: { params: Promise<{ id: string }> }) {
|
|
9
|
-
const { id } = await params;
|
|
10
|
-
|
|
11
|
-
if (!API_BASE_URL) {
|
|
12
|
-
return NextResponse.json(
|
|
13
|
-
{ success: false, message: "API_BASE_URL is not configured.", data: null },
|
|
14
|
-
{ status: 500 }
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const jwt = request.cookies.get("jwt")?.value;
|
|
19
|
-
|
|
20
|
-
try {
|
|
21
|
-
const res = await fetch(`${API_BASE_URL}/chapter/${id}/audio-status`, {
|
|
22
|
-
headers: jwt ? { Cookie: `jwt=${jwt}` } : undefined,
|
|
23
|
-
cache: "no-store",
|
|
24
|
-
});
|
|
25
|
-
const body = await res.text();
|
|
26
|
-
return new NextResponse(body, {
|
|
27
|
-
status: res.status,
|
|
28
|
-
headers: { "Content-Type": "application/json" },
|
|
29
|
-
});
|
|
30
|
-
} catch {
|
|
31
|
-
return NextResponse.json(
|
|
32
|
-
{ success: false, message: "Không thể kết nối server", data: null },
|
|
33
|
-
{ status: 502 }
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { NextRequest, NextResponse } from "next/server";
|
|
2
|
-
|
|
3
|
-
// Proxies the chapter unlock request to the backend, server-to-server, so
|
|
4
|
-
// the browser never needs API_BASE_URL directly (mirrors backend-data.ts's
|
|
5
|
-
// server-only fetch pattern from the anti-crawl plan, and the audio route's
|
|
6
|
-
// proxy shape).
|
|
7
|
-
const API_BASE_URL = process.env.API_BASE_URL;
|
|
8
|
-
|
|
9
|
-
export async function POST(request: NextRequest, { params }: { params: Promise<{ id: string }> }) {
|
|
10
|
-
const { id } = await params;
|
|
11
|
-
|
|
12
|
-
if (!API_BASE_URL) {
|
|
13
|
-
return NextResponse.json(
|
|
14
|
-
{ success: false, message: "API_BASE_URL is not configured.", data: null },
|
|
15
|
-
{ status: 500 }
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const jwt = request.cookies.get("jwt")?.value;
|
|
20
|
-
if (!jwt) {
|
|
21
|
-
return NextResponse.json(
|
|
22
|
-
{ success: false, message: "unauthorized", data: null },
|
|
23
|
-
{ status: 401 }
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const clickId = request.headers.get("X-Tracking-Click-Id");
|
|
28
|
-
|
|
29
|
-
try {
|
|
30
|
-
const res = await fetch(`${API_BASE_URL}/chapter/${id}/unlock`, {
|
|
31
|
-
method: "POST",
|
|
32
|
-
headers: {
|
|
33
|
-
Cookie: `jwt=${jwt}`,
|
|
34
|
-
...(clickId ? { "X-Tracking-Click-Id": clickId } : {}),
|
|
35
|
-
},
|
|
36
|
-
cache: "no-store",
|
|
37
|
-
});
|
|
38
|
-
const body = await res.text();
|
|
39
|
-
return new NextResponse(body, {
|
|
40
|
-
status: res.status,
|
|
41
|
-
headers: { "Content-Type": "application/json" },
|
|
42
|
-
});
|
|
43
|
-
} catch {
|
|
44
|
-
return NextResponse.json(
|
|
45
|
-
{ success: false, message: "Không thể kết nối server", data: null },
|
|
46
|
-
{ status: 502 }
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { NextRequest, NextResponse } from "next/server";
|
|
2
|
-
|
|
3
|
-
// Proxies comment creation (top-level or reply, via parentCommentId) to the
|
|
4
|
-
// backend, server-to-server — same shape as the unlock/combo-unlock routes.
|
|
5
|
-
const API_BASE_URL = process.env.API_BASE_URL;
|
|
6
|
-
|
|
7
|
-
export async function POST(request: NextRequest, { params }: { params: Promise<{ id: string }> }) {
|
|
8
|
-
const { id } = await params;
|
|
9
|
-
|
|
10
|
-
if (!API_BASE_URL) {
|
|
11
|
-
return NextResponse.json(
|
|
12
|
-
{ success: false, message: "API_BASE_URL is not configured.", data: null },
|
|
13
|
-
{ status: 500 }
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const jwt = request.cookies.get("jwt")?.value;
|
|
18
|
-
if (!jwt) {
|
|
19
|
-
return NextResponse.json(
|
|
20
|
-
{ success: false, message: "unauthorized", data: null },
|
|
21
|
-
{ status: 401 }
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const bodyText = await request.text();
|
|
26
|
-
|
|
27
|
-
try {
|
|
28
|
-
const res = await fetch(`${API_BASE_URL}/comment/story/${id}`, {
|
|
29
|
-
method: "POST",
|
|
30
|
-
headers: {
|
|
31
|
-
Cookie: `jwt=${jwt}`,
|
|
32
|
-
"Content-Type": "application/json",
|
|
33
|
-
},
|
|
34
|
-
body: bodyText,
|
|
35
|
-
cache: "no-store",
|
|
36
|
-
});
|
|
37
|
-
const body = await res.text();
|
|
38
|
-
return new NextResponse(body, {
|
|
39
|
-
status: res.status,
|
|
40
|
-
headers: { "Content-Type": "application/json" },
|
|
41
|
-
});
|
|
42
|
-
} catch {
|
|
43
|
-
return NextResponse.json(
|
|
44
|
-
{ success: false, message: "Không thể kết nối server", data: null },
|
|
45
|
-
{ status: 502 }
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { NextRequest, NextResponse } from "next/server";
|
|
2
|
-
|
|
3
|
-
const API_BASE_URL = process.env.API_BASE_URL;
|
|
4
|
-
|
|
5
|
-
export async function GET(request: NextRequest, { params }: { params: Promise<{ storyId: string }> }) {
|
|
6
|
-
const { storyId } = await params;
|
|
7
|
-
|
|
8
|
-
if (!API_BASE_URL) return NextResponse.json(null, { status: 500 });
|
|
9
|
-
|
|
10
|
-
const jwt = request.cookies.get("jwt")?.value;
|
|
11
|
-
if (!jwt) return NextResponse.json(null);
|
|
12
|
-
|
|
13
|
-
try {
|
|
14
|
-
const res = await fetch(`${API_BASE_URL}/reading-progress/${storyId}`, {
|
|
15
|
-
headers: { Cookie: `jwt=${jwt}` },
|
|
16
|
-
cache: "no-store",
|
|
17
|
-
});
|
|
18
|
-
const body = await res.text();
|
|
19
|
-
return new NextResponse(body, {
|
|
20
|
-
status: res.status,
|
|
21
|
-
headers: { "Content-Type": "application/json" },
|
|
22
|
-
});
|
|
23
|
-
} catch {
|
|
24
|
-
return NextResponse.json(null, { status: 502 });
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { NextRequest, NextResponse } from "next/server";
|
|
2
|
-
|
|
3
|
-
const API_BASE_URL = process.env.API_BASE_URL;
|
|
4
|
-
|
|
5
|
-
export async function POST(request: NextRequest) {
|
|
6
|
-
if (!API_BASE_URL) {
|
|
7
|
-
return NextResponse.json(
|
|
8
|
-
{ success: false, message: "API_BASE_URL is not configured." },
|
|
9
|
-
{ status: 500 }
|
|
10
|
-
);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const jwt = request.cookies.get("jwt")?.value;
|
|
14
|
-
if (!jwt) {
|
|
15
|
-
return NextResponse.json({ success: false, message: "unauthorized" }, { status: 401 });
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const bodyText = await request.text();
|
|
19
|
-
|
|
20
|
-
try {
|
|
21
|
-
const res = await fetch(`${API_BASE_URL}/reading-progress/sync`, {
|
|
22
|
-
method: "POST",
|
|
23
|
-
headers: { Cookie: `jwt=${jwt}`, "Content-Type": "application/json" },
|
|
24
|
-
body: bodyText,
|
|
25
|
-
cache: "no-store",
|
|
26
|
-
});
|
|
27
|
-
const body = await res.text();
|
|
28
|
-
return new NextResponse(body, {
|
|
29
|
-
status: res.status,
|
|
30
|
-
headers: { "Content-Type": "application/json" },
|
|
31
|
-
});
|
|
32
|
-
} catch {
|
|
33
|
-
return NextResponse.json(
|
|
34
|
-
{ success: false, message: "Không thể kết nối server" },
|
|
35
|
-
{ status: 502 }
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { NextRequest, NextResponse } from "next/server";
|
|
2
|
-
|
|
3
|
-
// Proxies the whole-story combo unlock request to the backend, server-to-
|
|
4
|
-
// server — same shape as chapter/[id]/unlock/route.ts.
|
|
5
|
-
const API_BASE_URL = process.env.API_BASE_URL;
|
|
6
|
-
|
|
7
|
-
export async function POST(request: NextRequest, { params }: { params: Promise<{ id: string }> }) {
|
|
8
|
-
const { id } = await params;
|
|
9
|
-
|
|
10
|
-
if (!API_BASE_URL) {
|
|
11
|
-
return NextResponse.json(
|
|
12
|
-
{ success: false, message: "API_BASE_URL is not configured.", data: null },
|
|
13
|
-
{ status: 500 }
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const jwt = request.cookies.get("jwt")?.value;
|
|
18
|
-
if (!jwt) {
|
|
19
|
-
return NextResponse.json(
|
|
20
|
-
{ success: false, message: "unauthorized", data: null },
|
|
21
|
-
{ status: 401 }
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const clickId = request.headers.get("X-Tracking-Click-Id");
|
|
26
|
-
|
|
27
|
-
try {
|
|
28
|
-
const res = await fetch(`${API_BASE_URL}/chapter/story/${id}/combo-unlock`, {
|
|
29
|
-
method: "POST",
|
|
30
|
-
headers: {
|
|
31
|
-
Cookie: `jwt=${jwt}`,
|
|
32
|
-
...(clickId ? { "X-Tracking-Click-Id": clickId } : {}),
|
|
33
|
-
},
|
|
34
|
-
cache: "no-store",
|
|
35
|
-
});
|
|
36
|
-
const body = await res.text();
|
|
37
|
-
return new NextResponse(body, {
|
|
38
|
-
status: res.status,
|
|
39
|
-
headers: { "Content-Type": "application/json" },
|
|
40
|
-
});
|
|
41
|
-
} catch {
|
|
42
|
-
return NextResponse.json(
|
|
43
|
-
{ success: false, message: "Không thể kết nối server", data: null },
|
|
44
|
-
{ status: 502 }
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
}
|
package/src/app/globals.css
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
@import "tailwindcss";
|
|
2
|
-
|
|
3
|
-
:root {
|
|
4
|
-
--background: #ffffff;
|
|
5
|
-
--foreground: #171717;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
@theme inline {
|
|
9
|
-
--color-background: var(--background);
|
|
10
|
-
--color-foreground: var(--foreground);
|
|
11
|
-
--font-sans: var(--font-geist-sans);
|
|
12
|
-
--font-mono: var(--font-geist-mono);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@media (prefers-color-scheme: dark) {
|
|
16
|
-
:root {
|
|
17
|
-
--background: #0a0a0a;
|
|
18
|
-
--foreground: #ededed;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
body {
|
|
23
|
-
background: var(--background);
|
|
24
|
-
color: var(--foreground);
|
|
25
|
-
font-family: Arial, Helvetica, sans-serif;
|
|
26
|
-
}
|
package/src/app/icon.png
DELETED
|
Binary file
|
package/src/app/layout.tsx
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { Metadata } from "next";
|
|
2
|
-
import { Geist, Geist_Mono } from "next/font/google";
|
|
3
|
-
import "./globals.css";
|
|
4
|
-
|
|
5
|
-
const geistSans = Geist({
|
|
6
|
-
variable: "--font-geist-sans",
|
|
7
|
-
subsets: ["latin"],
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
const geistMono = Geist_Mono({
|
|
11
|
-
variable: "--font-geist-mono",
|
|
12
|
-
subsets: ["latin"],
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export const metadata: Metadata = {
|
|
16
|
-
title: "Góc Nhỏ Nhà Tiêu – Đọc truyện online, tiểu thuyết hay nhất",
|
|
17
|
-
description:
|
|
18
|
-
"Góc Nhỏ Nhà Tiêu – Đọc truyện online, tiểu thuyết hay nhất. Hàng nghìn bộ truyện cập nhật mỗi ngày.",
|
|
19
|
-
robots: { index: false, follow: false },
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default function RootLayout({
|
|
23
|
-
children,
|
|
24
|
-
}: Readonly<{
|
|
25
|
-
children: React.ReactNode;
|
|
26
|
-
}>) {
|
|
27
|
-
return (
|
|
28
|
-
<html
|
|
29
|
-
lang="en"
|
|
30
|
-
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
|
|
31
|
-
>
|
|
32
|
-
<body className="min-h-full flex flex-col">{children}</body>
|
|
33
|
-
</html>
|
|
34
|
-
);
|
|
35
|
-
}
|
package/src/app/page.tsx
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
.line {
|
|
2
|
-
height: 18px;
|
|
3
|
-
border-radius: 8px;
|
|
4
|
-
margin-bottom: 14px;
|
|
5
|
-
background: linear-gradient(
|
|
6
|
-
90deg,
|
|
7
|
-
var(--skeleton-base, rgba(118, 61, 251, 0.08)) 25%,
|
|
8
|
-
var(--skeleton-shine, rgba(118, 61, 251, 0.03)) 37%,
|
|
9
|
-
var(--skeleton-base, rgba(118, 61, 251, 0.08)) 63%
|
|
10
|
-
);
|
|
11
|
-
background-size: 800px 100%;
|
|
12
|
-
animation: shimmer 1.6s infinite linear;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@keyframes shimmer {
|
|
16
|
-
0% {
|
|
17
|
-
background-position: -400px 0;
|
|
18
|
-
}
|
|
19
|
-
100% {
|
|
20
|
-
background-position: 400px 0;
|
|
21
|
-
}
|
|
22
|
-
}
|