Context
Readers often follow serial fiction on their phones in short sittings. Chapter comments give them a place to discuss the story with each other.
Taleverse uses 17 public-domain classics split into 492 chapters. The reader shows the books’ actual text.
Problem
Readers need a clear choice: pay to read early or wait for free access.
Locked text needs to stay on the server. Payment retries must not add credits twice. Free readers also need to know when they can read the chapter.
What it does
Read
Scroll or pages with a 3D page flip, auto-scroll, read-aloud with the line highlighted, and type, spacing, width and theme settings.
Talk
Comment on a single paragraph from the margin, or join threaded chapter discussions with votes.
Early access
See a preview, the price and the date the chapter becomes free. Read it early for 5 credits.
Publish
Admins write in a block editor and schedule the release and early-access window.
Engineering
A transaction record for credits
A balance is the sum of ledger entries, and every write carries an idempotency key, so a retried webhook or a double click can’t credit twice.
Access in one pure function
A chapter is draft, scheduled, early access or free, derived from two timestamps at query time. No cron job has to flip a flag.
Paywalled text never leaves the server
A locked chapter only receives a short preview, rendered by a small server-side renderer that allows known block types only.
Works with zero config
Without keys it runs read-only, and purchases go through a simulated provider on the same ledger path.
Major decisions
When a chapter goes free
- Chose
- Two timestamps, published and free-at, read at request time.
- Over
- A scheduled job that flips a flag.
- Because
- No scheduled job needs to run. The chapter list, reader and purchase action check the same timestamps.
How payments are fulfilled
- Chose
- Both the signed webhook and the success redirect, whichever arrives first.
- Over
- The webhook only.
- Because
- The reader gets credits as soon as either arrives. If the other arrives later, the ledger key prevents a second credit.
Where content comes from
- Chose
- Public-domain novels with their first-edition covers.
- Over
- Placeholder text.
- Because
- Full chapters let me check the reader with the text people will read.
Try it
The live demo and the source code.