Zedric.Book
← All filesStatus: delivered · live

CS-17 // Dossier

AI book-writing application

The production application behind an AI-assisted publishing product — six guided stages from a blank page to a published book, with AI generating chapters, titles, outlines and cover art. Built and hardened across both services: features shipped, regressions root-caused to the exact line, AI spend right-sized per job, and the purchase funnel instrumented end to end.

Exhibit // CS-17

R-02 · interface redrawn from the live build — zero client pixels

Redrawn exhibit — writing console: a six-segment stage progress bar with one active stage, an editor panel of skeleton lines with a generating chip, a 100-API-endpoints stat, and a credits meter
Client
R-01SEALED UNDER NDA. SPECIFICS WALK THROUGH LIVE. → BOOK
Industry
Digital publishing product · sibling of CS-04
System
AI book-writing application
Stack
Next.js · FastAPI · MongoDB · Stripe · LangChain
Trigger
A customer signs up to write their first book
Metrics
System scope

01 // The problem

The product was live and selling, but half-instrumented: an onboarding tutorial that quietly never showed for exactly the new customers it was built for, the largest AI model billed for every job regardless of size, and purchases untracked past the checkout page.

02 // The system

Redrawn — no client data

The system

SIGNUPTRIAL + CREDITSSIX GUIDED STAGESIDEA → PUBLISHED BOOKAI GENERATIONCHAPTERS · TITLES · COVERSTRIAL EXPIRED?ENFORCED IN CODEOFFERS → CHECKOUTPURCHASE → CRM + CAPI

03 // The delta

Before and after go-live

Before

  • A tutorial that marked itself seen and never showed again
  • The largest AI model billed for every job, big or small
  • Purchases untracked past the checkout page
  • Trial limits that existed as policy, not code

With the system

  • Onboarding proven visible to exactly the users it was built for
  • Three models assigned by job — writing, polish, cover art
  • Pixel + server-side conversions + CRM webhooks on every purchase
  • Trial expiry enforced in code, with a kill switch

04 // What got done

6 entries

  1. B-01Structured the web front end as 14 page routes and 37 API handlers acting as a backend-for-frontend, so the browser never talks to the Python service directly
  2. B-02Extracted business rules into eight framework-free logic modules, each with a colocated unit test — trial phases, offer selection, tutorial staging, timezone and phone normalization
  3. B-03Diagnosed the invisible-tutorial regression to a two-step interaction — a popup marking itself seen before a routing rewrite destroyed it — fixed it by moving one write from open-time to close-time, then reproduced the failure live to prove the fix
  4. B-04Right-sized AI spend per job instead of defaulting to the largest model: long-form writing, paragraph polish and cover art each assigned their own model, verified by a code sweep plus the full backend suite
  5. B-05Instrumented the funnel end to end: pixel plus server-side conversion events, CRM purchase webhooks, and a verified three-way offer branch in the CRM
  6. B-06Shipped the trial system whole — countdown banner, expiry enforcement, kill switch — with credits metering the AI features

05 // Outcome

System scope — capability metrics, honestly labeled

Scope
front-end components on one atomic hierarchy
0
Scope
backend tests passing before each deploy
0
Scope
AI models, each assigned to the job it’s priced for
0

06 // The result

From the build log

  • Live in production on both services, web front end and Python API
  • The regression hiding onboarding from new users found, fixed and proven by live reproduction
  • A 35-document spec-and-plan corpus behind the build — designed first, then built

Want a system like this one?

Free · 30 min · leave with a rough scope either way

Book the intro call