CodeForge
← All projects

Product Suite · Publishing & Web Fiction

Shared-account ebook store & serial fiction platform

Two separate products, two separate databases — a pay-once ebook store and a coin-based serial fiction platform — sharing one login so a reader signs in once and uses both.

Next.jsFastifyPostgreSQLPrismaRedisCloudflare R2PWA / Capacitor

2

Products, one shared account system

70/30

Default publisher revenue split

10MB

Max upload, type-checked server-side

Overview

A single authentication layer — one account, one password — sits in front of two independently built products: a pay-once ebook store and an episodic web fiction platform, each with its own database and its own engineering problems.

Ebook store — readers

Reader

Browse, preview, and buy

Category filters, live search, a dedicated bestsellers view, and real PromptPay checkout — QR generation with cent-level amount tweaks to prevent order collisions, confirmed automatically via a real bank webhook, not a mocked screen.

Reader

Free previews, real formats

The first 3 chapters (EPUB) or 3 pages (PDF) are cut server-side before the file ever leaves the server. Two dedicated readers — paginated EPUB and zoom/pan PDF — preserve original layout so Thai fonts never break on conversion. Installable as a PWA or a real mobile app via Capacitor.

Ebook store — publishers & admin

Publisher

Manuscript upload portal

Publishers upload EPUB/PDF with cover art and a built-in crop tool, set their own price and category, and submissions sit in a review queue before going live.

Admin

Commission & moderation

Full catalog control with delete protection for already-purchased titles, per-publisher commission rates (default 70/30), user management with forced-reset temporary passwords, and separate audit logs for logins and admin actions.

Engineering

Resilient by design

Redis caching on high-traffic pages with automatic DB fallback if Redis goes down, a store-wide feature flag that removes routes entirely when disabled (not just hides them), and a pre-launch access-code lock that reveals nothing about the catalog to outsiders.

Fiction platform — readers & writers

Reader

Thai-aware search & coin unlocks

Search tuned specifically for Thai character ordering, auto-saved scroll position to resume exactly where you left off, and a coin-unlock system with a full transaction ledger that prevents double-spending or negative balances during simultaneous unlocks.

Writer

Scheduled publishing & pricing

A rich-text editor with inline images (drag-to-resize from the corner), publish-ahead scheduling that releases chapters automatically with no separate background worker, per-chapter coin pricing (0 = free), and a Thai-aware word count that counts characters instead of whitespace-delimited words.

Fiction platform — admin

Admin

Content moderation & dashboard

Totals across stories, chapters, priced chapters, readers, and coins spent; suspend/restore problem stories and edit any chapter's content or price directly.

Shipped

  • Both platforms live with shared login across separate databases
  • Real PromptPay checkout with automatic payment detection (ebook store)
  • Coin-based chapter unlocking with a full transaction ledger (fiction platform)
  • Publisher/writer tooling and admin moderation on both sides

Next phase

  • Wallet / refunds / publisher royalty payout — data model is in place, no UI or API yet
  • Cross-device reading position and highlight sync — table exists, current reader is local-only
  • Credit/debit card payment — shown as an option in the UI, disabled pending launch

Ready to build something?

We take on a limited number of projects per quarter. Let's talk before the spots fill up.