← All projects
Session Handoff · Bookify AI Studio

BookifAI β€” Session Handoff (2026-07-10)

Saved 2026-07-10

Paste it into a fresh Claude Code session and say “resume from this handoff.” It's briefing only — Claude will wait for your next instruction.

BookifAI β€” Session Handoff (2026-07-10)

Fable Mode audit methodology + market research + money-path audit

> This is a briefing, not an instruction set. Nothing here auto-executes. Sondra decides > what to act on. No code on the live app was touched this session β€” only research + audit docs.

---

0. Where we are in one paragraph

BookifAI is LIVE (bookifai.app, real Stripe). This session did NOT touch the app code β€” it did three things: (1) built and wired a permanent "Fable Mode" money-path audit methodology into the safety system; (2) ran the market research BookifAI never got (it was a PushTen template sold as-is), which reframed the whole product; (3) ran an adversarial money-path audit that found a real paywall hole. The plan was reordered: money-path fixes come BEFORE the nav/UX polish. No fixes are applied yet β€” clean pickup point.

---

1. What was BUILT this session (the only files changed)

The "Fable Mode audit" is now a self-firing part of the safety net:

Standing rule now in force: any app/site that touches money gets the money-path audit BEFORE nav polish, and re-run after any payment/credit/entitlement change. It's automatic in /app-safety-check.

---

2. Money-path audit β€” FINDINGS (the important part)

Adversarial audit of BookifAI's webhook, edge functions, RLS, and billing/download path. Ranked most-severe first. Nothing fixed yet.

πŸ”΄ #1 HIGH β€” Client-side paywall: the $29 book can be taken for free

The paid deliverable (PDF / Word / KDP print pack + publishing kit) is generated entirely in the browser (src/lib/book-export.ts, src/lib/kdp-print.ts). The paid flag only decides which buttons render (src/components/create-book/ExportOptions.tsx). A free user can flip the entitlement state in DevTools or call the export function from the console β†’ full product, $0, never touching the DB (so the solid server rules never fire). The server function that WOULD enforce it (supabase/functions/export-ebook/index.ts, checks entitlement==='paid') is dead code β€” never called (grep export-ebook src/ = nothing).

🟠 #2 MEDIUM β€” No refund/chargeback clawback

stripe-webhook/index.ts handles ONLY checkout.session.completed. No charge.refunded / charge.dispute.created handler, no revoke_purchase RPC. Buyer can pay β†’ download β†’ refund β†’ keep the unlock + unused credits. Fix: add a refund branch + a service-role revoke_purchase RPC that reverses the grant (you already store stripe_session_id/stripe_event_id in purchases, so reverse-lookup is cheap).

🟠 #3 MEDIUM β€” AI-bill drain on unmetered text endpoints

No ANONYMOUS drain (all AI fns require a signed-in user) and images ARE metered. BUT several text endpoints run paid Claude-Sonnet calls on auth alone, with no per-call meter and no rate limit: generate-title, generate-toc (per-call ceiling only), generate-chapter legacy edit path ("stays free and unmetered"), and ALL ideation-chat actions. One free signup + a loop β†’ runs up her OpenRouter/Anthropic bill. Fix: wrap them in the daily-quota guard she already wrote for research (claim_research_quota pattern), or require an active book slot; at minimum rate-limit per account/day.

βœ… VERIFIED SAFE (checked in code, not trusted from old notes β€” the prior work was real)

Fix priority: #1 server-side export (highest) β†’ #2 refund handler β†’ #3 rate-limit text endpoints. Then re-verify adversarially + /app-safety-check.

---

3. Market research β€” the strategic reframe

Full report: knowledge/bookifai-market-research-report-2026-07-10.html (in Edge). Three scouts (competitors/pricing, audience demand via Reddit+forums, buyer willingness-to-pay).

Headline: BookifAI is priced for the wrong buyer. There are TWO different customers:

Which job people want: NOT "one sentence β†’ finished book." Both buyers lean toward "shape the material I already have." The "already have a draft" crowd is the fundable one β€” specific, already-funded pain (KDP formatting rejection, AI won't edit their own chapter, illustration inconsistency), lower stigma. The "always wanted to write a book" crowd is bigger but flakier, cheaper, and takes the most stigma β†’ best as a free/cheap on-ramp, not the paid core.

Guardrail: position as editor/formatter, never ghostwriter. Self-publishing community cheers AI-as-editor, mocks AI-as-author. Editing stays opt-in. Meter on IMAGES (existing model), not on writing.

White space confirmed: nobody bundles import + AI-edit + illustrations + KDP-ready. Adult-book illustration is wide open (all rivals are children's-only). Illustration consistency is the unsolved pain β€” BookifAI already cracked cover-as-reference consistency = a differentiator.

Honesty flag: the ONE unverified assumption is whether Buyer B pays four figures for software specifically (vs a human ghostwriter). Validate with a few real conversations / /roast before locking premium pricing.

---

4. "Import your existing book" feature β€” viability

Verdict: highly viable + cheap β€” the expensive 90% already exists and is book-type-general (AI edit = ReviewPolish; illustrations = per-chapter; KDP export). The DB field uploaded_content already exists AND is already fed into generate-chapter. Missing = only the front door: a paste/upload screen + Word .docx reading (mammoth.js β€” small, free; ASK before installing) + chapter chunking (the one fiddly part). PDF import = harder, defer. Decision: it earns its own PRD + Fable prompt, built for the RIGHT buyer/positioning β€” write it AFTER the app is made solid, NOT before. Slot as "Phase 3.5."

---

5. THE PLAN (reordered this session)

P2P quality bar reference (studied this session): shared Shell.jsx (sidebar w/ credits box + buy-more in 2 places, Sign Out in footer) Β· StarGate.jsx un-skippable first-run β†’ drops user into first action Β· post-purchase confirmation folded into Account w/ auto-refresh Β· admin edge fn gated to srverva@gmail.com (server-side ADMIN_EMAILS) Β· Support.jsx in nav Β· CreditGuide.jsx single source of truth for cost chips Β· ErrorBoundary Β· route fallback (no 404s).

---

6. OPEN DECISIONS (all Sondra's calls)

  1. Start Phase 0? (money-path fixes on the live app β€” begin with refund + rate-limit, then
  2. server-side export). Not yet greenlit to edit code.

  3. Two-product strategy β€” cheap tool (Buyer A) + premium "Authority Book Engine" (Buyer B).
  4. Product #2 is PARKED by her call ("finish the app I have first"). /roast the premium pricing ONLY when she's ready to pursue #2 β€” NOT now.

  5. Import-Your-Book PRD + Fable prompt β€” write it as part of this work, or keep flagged? (She
  6. leaned: make the app solid first.)

  7. mammoth.js for Word import β€” needs her OK before install (Phase 3.5).
  8. Agent Opus credits expire TODAY (2026-07-10) β€” the dachshund render backlog is a competing
  9. priority she chose to set aside for BookifAI; flagged, her call.

---

7. Next-session pickup checklist

  1. Re-open this handoff + the money-path findings (Β§2). Confirm nothing changed on bookifai.app.
  2. If she greenlights Phase 0: start with #2 refund handler + #3 rate-limits (quick, safe), then
  3. #1 server-side export (design decision: reproduce KDP assembly server-side vs signed-auth token). Test each with the verify-loop (real card round-trip where safe), then re-audit.

  4. 10-sec regression check already PASSED this session: cover + chapter-3 images still display
  5. after the earlier storage-security fix.

  6. Every money change β†’ re-run the money-path audit (reference/fable-mode-money-path-audit.md)
  7. + /app-safety-check. Append any new hole to that checklist.

---

8. Key files

Generated for the CEO Dashboard · source: PROJECTS/Bookify AI Studio/handoffs/fable-mode-audit-market-research-and-money-path-2026-07-10.md 🀍