Turn a single prompt into a print-ready Amazon KDP book — interiors, covers, and KDP-spec PDFs in one flow.
Run it as your own self-hosted SaaS. Keep 100% of the revenue.
IMPORTANT: external service costs are NOT included in this purchase.
BookraftAI is a self-hosted application that connects to third-party services such as
OpenAI and OpenRouter (for AI text and image generation) and payment gateways
like Stripe, PayPal, Razorpay, and Dodo Payments. These providers bill you
directly for their own API usage and subscription fees. The purchase price of this item does
NOT include any API credits, subscriptions, or usage costs for these external
services — you (and the end users of your SaaS) create your own provider accounts and pay them
separately based on your usage and volume.
What you can do with BookraftAI
- Generate full books (text and image-page) from a single brief in minutes
- Edit any page or block in the workshop editor with live AI rewrites
- Export KDP-ready PDFs (full book, interior-only, cover-only) right from the browser
- Launch your own AI book-generation SaaS and charge users per credit or per plan
Who this is for
- SaaS founders who want a real, vertical product to sell subscriptions, not a weekend script
- Agencies and publishers who can productize AI book generation for clients under their brand
- KDP self-publishers and content operators who need a faster path from idea to manuscript
- Operators who want BYOK (bring your own keys) so end-user inference costs never hit the operator



Browse the full documentation online:
https://bookraft-ai-docs.vercel.app/

How it works: a real-world flow (step by step)
- Brief: a user picks a book type (journal, picture book, comic, planner, devotional, cookbook, and 17 more) and writes a one-line idea.
- Plan: BookraftAI drafts the structure, page count, and (for image-page books) per-page visual briefs.
- Generate: pages stream live into the workshop using the user’s own OpenRouter or OpenAI key.
- Edit: regenerate any page, rewrite individual blocks, swap cover styles, or pull from the persistent asset library.
- Preview: see the manuscript composed with KDP-style backgrounds, page numbers, and trim sizes.
- Export: download full book, interior-only, or cover-only PDFs that drop straight into KDP upload forms.
- Bill: end users buy credits via Stripe, PayPal, Razorpay, or Dodo Payments; failed generations auto-refund credits.
Try Live
Browse a live deployed instance of the platform to see how it behaves in production. Sign up directly to generate your first book.
URL: https://bookraft.wixzel.com/


Feature highlights
Two AI book engines
- Text books for prose-heavy formats (non-fiction, journals, planners, study guides, devotionals, memoirs, self-help)
- Image-page books for visual formats (picture books, comics, coloring books, sketchbooks, activity books)
23 book types out of the box
- Non-fiction, fiction, journal, planner, activity, workbook, coloring book, puzzle book, cookbook, poetry, picture book, devotional, memoir, self-help, notebook, sketchbook, logbook, guidebook, study guide, quote book, comic, children’s fiction, and a free-form “other” type
- Each type tunes structure, pacing, tone, and recommended page count
Workshop editor with six tabs
- Details, Content, Cover, Assets, Preview, Export — covers the full book production lifecycle
- Regenerate any page, rewrite single blocks (text, heading, image-prompt), insert / duplicate / delete pages
KDP-ready PDF export
- Three export modes: full book, interior-only, cover-only
- KDP-compliant trim sizes (6×9”, 8.5×11”, custom), safe-zone margins, 0.125” bleed for image-page books
- Configurable page numbering position, font, color, and start offset
Two-phase image pipeline with character continuity
- Step 1: a planning pass drafts a per-page visual brief
- Step 2: images render sequentially with the previous page injected as a reference for palette and character continuity
- Three coherence modes: sequential-story, thematic-series, individual-pages
Live streaming page generation
- Real-time SSE streaming so pages appear in the workshop as they are drafted
- Lets buyers and their end users watch progress instead of waiting on a spinner
Persistent asset library and cover styling
- Every generated image is saved to a per-book asset library and can be reused across pages
- Cover generator with remix and style-guide control to match the book’s interior
Credits billing with auto-refund
- Pay-per-credit model with admin-defined plans (name, price, generations granted, gateway IDs, popular flag)
- Failed generations automatically refund the credit so end users are never charged for broken runs
- Full purchase audit trail (pending, completed, failed, refunded)
Admin panel
- Users (edit credits, toggle active/deactivated), Plans, Gateways, Purchases, Analytics, Settings
- Workspace currency, support email, contact info, social links, and default signup credits all admin-configurable
Payment gateways
- Stripe, PayPal, Razorpay, Dodo Payments — admins enable any combination per workspace
- Webhooks on each gateway mark purchases complete and grant credits automatically
BYOK inference (operator never pays for AI)
- End users plug in their own OpenRouter and optional OpenAI keys from Settings
- Per-user keys override workspace defaults; operators never carry inference costs
Self-hosted SaaS with centralized branding
- You control hosting, data, and branding
- App name, tagline, support and legal emails, logos, and favicon all live in one constants file
- System-aware dark and light themes via next-themes
Key features (detail)
AI stack and providers
- Text models: any model exposed through OpenRouter (default
anthropic/claude-sonnet-4.6)
- Image models: OpenRouter image-capable chat models (default
google/gemini-3.1-flash-image-preview), with optional OpenAI gpt-image-1 for strict trim sizes (1024×1024, 1024×1536, 1536×1024)
- BYOK at the user level: per-user keys override workspace defaults, with a
forceOpenRouterForImages escape hatch
Book workshop
- Details tab: title, subtitle, author, series, ISBN, publication date, language, age/grade range, KDP keywords, Amazon category
- Content tab: stream new pages, regenerate any page with a custom prompt, rewrite individual blocks
- Cover, Assets, Preview, Export tabs: cover remix, persistent asset library, KDP-style preview, three PDF export modes
KDP export pipeline
- Client-side PDF generation via jsPDF; manuscripts never leave the browser during export
- Asset deduplication so repeated images share a single embedded resource
- Background image composition per page or per page-group
SaaS monetization and administration
- Credit plans with per-gateway product IDs and a “popular” flag
- Payment gateways: Stripe, PayPal, Razorpay, Dodo Payments (configure what you need)
- Branding: app name, primary visuals, logos, favicon, and landing experience all editable in one place
- Analytics: total users, revenue, purchase counts, and last-7-days breakdown
Authentication and security
- Email + password with bcrypt hashing and Joi validation
- Google OAuth 2.0 via Passport (auto-disables cleanly when OAuth env vars are unset)
- JWT sessions with a 30-day expiry
- RBAC: admin and user roles, with the first signup auto-promoted to admin for safe bootstrap
- Helmet security headers and express-rate-limit on auth and contact endpoints
- Production safeguard: backend refuses to boot with the placeholder JWT secret
Integrations and extensibility
- SMTP: deliver public Contact form messages via Nodemailer
- REST APIs: build custom integrations on top of the Express backend
- BYOK providers (choose your stack):
- Text and image inference via OpenRouter
- Optional OpenAI for precise image sizing
- Optional Google OAuth credentials for social sign-in
- Optional Stripe, PayPal, Razorpay, and Dodo Payments for monetization
Perfect for SaaS and agencies
- Run BookraftAI as your hosted product with your branding
- Package credit tiers, enforce signup grants, and grow MRR with subscriptions
- Deliver AI book generation as a managed service to clients (where your license allows)
- Extended License: sell access as a service under your brand per Envato terms
Important notice (external service costs)
BookraftAI is a self-hosted application that integrates with third-party services such as OpenRouter, OpenAI, and your chosen payment gateways (Stripe, PayPal, Razorpay, Dodo Payments).
The purchase price of this item does NOT include any credits, subscriptions, or usage costs for these external
services.
Buyers (and the end users of the SaaS) are required to create their own accounts and pay separately for usage based on their needs and volume.
Pricing varies by provider.
Self-hosting with BYOK means you stay in control of providers and can optimize spend for your volume – but those
provider bills are separate from the license price.


The tech stack
- Backend: Node.js and Express 5 (streaming-friendly API architecture, SSE for page streaming)
- Frontend: Next.js 16 (App Router, Turbopack), React 19, TypeScript, Tailwind CSS v4
- UI components: shadcn/ui over Radix UI primitives, Framer Motion 12 for transitions
- Database: MongoDB via Mongoose 9 for users, books, plans, purchases, and configuration
- Authentication: Passport.js with Google OAuth, email and password, JWT
- AI SDK: OpenAI v6 client (also used as the OpenRouter client)
- Payments: Stripe, PayPal (REST), Razorpay, Dodo Payments
- Image processing: Sharp 0.34
- PDF: jsPDF (client-side)
- Email: Nodemailer (SMTP)
- Security: Helmet, express-rate-limit
What’s in the box?
- Complete backend source code (Node.js / Express 5)
- Complete frontend source code (Next.js 16 / React 19, TypeScript)
- Full documentation (interactive index.html with visual guides and screenshots)
- Environment templates (
.env.example for both backend and frontend)
Start building your AI book-generation SaaS today. Ship more titles. Charge per credit. Scale faster.
Changelog
Version 1.0.0 | Initial release
- NEW: Two AI book engines (text and image-page)
- NEW: 23 book types out of the box (journal, planner, picture book, comic, coloring book, devotional, cookbook, and more)
- NEW: Six-tab workshop editor (Details, Content, Cover, Assets, Preview, Export)
- NEW: KDP-ready PDF export (full book, interior-only, cover-only) with client-side jsPDF
- NEW: Two-phase image pipeline with character continuity and three coherence modes
- NEW: BYOK inference via OpenRouter with optional OpenAI for precise image sizing
- NEW: Live SSE page streaming in the workshop
- NEW: Pay-per-credit billing with Stripe, PayPal, Razorpay, and Dodo Payments
- NEW: Admin panel with users, plans, gateways, purchases, analytics, and settings
- NEW: Email + Google OAuth authentication, JWT sessions, RBAC (admin / user)
- NEW: Centralized branding constants (app name, tagline, support emails, logos, favicon)
- NEW: Contact form with Nodemailer SMTP delivery
- NEW: Helmet + express-rate-limit on auth and contact endpoints
- NEW: Production safeguard - backend refuses to boot with placeholder JWT secret