> 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.
---
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.
---
The "Fable Mode audit" is now a self-firing part of the safety net:
reference/fable-mode-money-path-audit.md β NEW. The living money-path checklist +dated Findings Log (seeded with today's BookifAI + P2P findings). Designed to GROW: every new hole any audit finds gets appended here.
.claude/commands/app-safety-check.md β added Phase 2d (money-path deep audit runs forany app OR website that takes money) + a MONEY-PATH line in the verdict block.
reference/vibe-coding-safety-net.md β added Section E pointing to the checklist.~/.claude/skills/fable-mode/SKILL.md β added a Notes pointer to the checklist.reference_fable_mode_money_path_audit.md + MEMORY.md index line.PROJECTS/Bookify AI Studio/knowledge/bookifai-market-research-report-2026-07-10.html βNEW. The market-research + pricing report (opened in Edge).
knowledge/market-research-competitors-pricing-2026.html.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.
---
Adversarial audit of BookifAI's webhook, edge functions, RLS, and billing/download path. Ranked most-severe first. Nothing fixed yet.
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).
meter_imagereturns free_page_locked), so a bypassed free export is text + up to 3 cover attempts, not a fully-illustrated book. Real, but not the whole product.
server-side, behind the existing entitlement==='paid' check. A client gate can never secure a file whose source data is already in the browser. NOT a drop-in: export-ebook today is text-only (no illustrations, no KDP bleed) β the jsPDF/kdp-print illustrated assembly must be reproduced server-side (or the server issues a short-lived signed authorization the generator requires).
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).
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.
constructEventAsync, 400 on bad sig) + idempotent(unique stripe_event_id + apply_purchase on-conflict-do-nothing guard). SOLID.
profiles, book_meters, purchases)is read-only to the client; all writes via service-role SECURITY DEFINER fns. update profiles set credits=9999 is blocked. SOLID.
SELECT ... FOR UPDATE, proper reserve-then-refund.SOLID.
projects/chapters UPDATE policies lack WITH CHECK (couldreassign user_id) β no paid access gained, but worth adding for hygiene.
Fix priority: #1 server-side export (highest) β #2 refund handler β #3 rate-limit text endpoints. Then re-verify adversarially + /app-safety-check.
---
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:
+ KDP formatting are real value (replaces a $2,500β6,000 illustrator). Price band: $29β49/mo or $99β249 one-time.
displacing a $15kβ100k ghostwriter. Could pay $297β997/book or a premium annual tier. A LOW price actively hurts credibility here. This buyer is basically Sondra's existing Amplif-AI audience β and nobody in the market is capturing them with AI software (all priced $15β50/mo, compared to ChatGPT). Open lane.
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.
---
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."
---
(both quick β do first), then β move book generation server-side (the big build). Re-verify + /app-safety-check.
its own sidebar, so Sign Out exists on the Dashboard page ONLY, Support isn't in the nav, Buy Credits is buried in "Account," and the "tiny home page" = landing locked to max-w-6xl. Build ONE shared shell (like P2P's Shell.jsx) with: Dashboard Β· My Books Β· Templates Β· Buy Credits Β· KDP Resources Β· Account Β· Help & Support Β· Sign Out Β· (hidden Admin for her email). Widen the landing page. ~7 files. Fixes 4 complaints at once.
* β bookifai.app; the shared_shared/constants.ts + export-ebook's own copy) Β· install DOMPurify + sanitize the markdownβHTML of AI chapter content (book-export.ts, ChapterEditor.tsx) Β· flip the Supabase breached-password toggle (settings, not code). [DOMPurify also closes the localStorage-token concern β same battle. Skip a localStorage rewrite; no real gain.]
admin edge fn +Admin.jsx) Β· first-run onboarding + post-purchase guidance Β· add Children's/Fiction template cards (Templates page only has 6 non-fiction) Β· clarify "any book" on sales page.
/app-safety-check before calling it shipped.
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).
---
server-side export). Not yet greenlit to edit code.
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.
leaned: make the app solid first.)
priority she chose to set aside for BookifAI; flagged, her call.
---
#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.
after the earlier storage-security fix.
reference/fable-mode-money-path-audit.md)+ /app-safety-check. Append any new hole to that checklist.
---
PROJECTS/Bookify AI Studio/app/ (React+Vite+TS, Supabase umnlokuehteqwrheoyai,Cloudflare Pages bookifai, repo AmplifAI-Your-Business/amplifai-bookifai).
app/src/components/create-book/ExportOptions.tsx, app/src/lib/book-export.ts,app/src/lib/kdp-print.ts, app/supabase/functions/export-ebook/index.ts (correct but unused).
app/supabase/functions/stripe-webhook/index.ts,app/supabase/migrations/20260710000100_catchup_schema_drift_and_hardening.sql (apply_purchase; add revoke_purchase sibling).
app/supabase/functions/{ideation-chat,generate-title,generate-toc,generate-chapter}/index.ts.app/supabase/functions/_shared/constants.ts (line 17 *) + export-ebook/index.ts (own copy).PROJECTS/Bookify AI Studio/knowledge/*.html.reference/fable-mode-money-path-audit.md.Generated for the CEO Dashboard · source: PROJECTS/Bookify AI Studio/handoffs/fable-mode-audit-market-research-and-money-path-2026-07-10.md π€