03 · Reading platform · Payments

Taleverse

Early chapters for paying readers, with free access a week later.

Type
Web app · portfolio project
Stack
Next.js 16, Prisma + PostgreSQL, Clerk, Stripe Checkout
Role
Product, design, build
19.8-second launch film. A book cover opens into the reader. It shows a paragraph comment and an early-access chapter bought for 5 credits. I drew it in code using the product’s screens, rendered each frame and timed the sound to the animation.
01Context

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.

02Problem

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.

03What it does

What it does

Follow the steps in a walkthrough based on the app’s screens. Open it full size

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.

04Engineering

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.

05Major decisions

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.