● LIVE
OpenAI releases GPT-5 APIIndia AI startup raises $120MBitcoin ETF hits record inflowsMeta Llama 4 benchmarks leakedOpenAI releases GPT-5 APIIndia AI startup raises $120MBitcoin ETF hits record inflowsMeta Llama 4 benchmarks leaked
📅 Sat, 21 Mar, 2026✈️ Telegram
AiFeed24

AI & Tech News

🔍
✈️ Follow
🏠Home🤖AI💻Tech🚀Startups₿Crypto🔒Security🇮🇳India☁️Cloud🔥Deals
✈️ News Channel🛒 Deals Channel
Home/Cloud & DevOps/I built a book generator that runs entirely in your browser — no server, no account, no backend
☁️Cloud & DevOps

I built a book generator that runs entirely in your browser — no server, no account, no backend

A few months ago I posted here about EbookForge — a JSON-to-PDF engine I built because formatting ebooks was driving me insane. That post got zero comments. Fair enough. The product was rough, the pitch was confusing, and honestly — asking people to write books as JSON was a hard sell. But the forma

⚡Quick SummaryAI generating...
E

EbookForge

📅 Mar 21, 2026·⏱ 4 min read·Dev.to ↗
✈️ Telegram𝕏 TweetWhatsApp
📡

Original Source

Dev.to

https://dev.to/mxprs/i-built-a-book-generator-that-runs-entirely-in-your-browser-no-server-no-account-no-backend-3llc
Read Full ↗

A few months ago I posted here about EbookForge — a JSON-to-PDF engine I built because formatting ebooks was driving me insane.

That post got zero comments. Fair enough. The product was rough, the pitch was confusing, and honestly — asking people to write books as JSON was a hard sell.

But the formatting problem was real. So I kept building. And the project got completely out of hand.

What started as a formatter became something else

The original pain: I had structured content and no clean way to turn it into a typeset PDF with a cover page, justified text, embedded fonts, and a table of contents with actual page numbers. Everything I tried required a server, looked terrible, or both.
So I built a client-side PDF engine. That worked. But then I realized: the formatting was the easy part. The hard part was making the input worth formatting.

So I kept going.

EbookForge today

EbookForge now generates complete books from scratch — entirely in your browser.

You describe your taste:

  1. Pick up to 3 genres
  2. Place a dot on a 2D emotional axis (comforted ↔ disturbed, devastated ↔ euphoric)
  3. Describe your protagonist in one sentence
  4. Drop in a "wildcard seed" — a sensory image, a memory, a vibe

The AI then architects a full book blueprint (title, plot, chapter arcs, themes, trigger warnings), generates a painterly cover illustration, and writes the first chapter. You read it, then forge the next chapters one by one.

The twist: between chapters, you can inject "Director's Notes" — creative instructions like "a sudden betrayal" or "the rain stops and the silence becomes deafening." The system rewrites the remaining chapter plan to stay coherent with your intervention.

Then you download the whole thing as a typeset PDF with embedded fonts, cover art, synopsis page, and numbered table of contents.

No server. No account. No database. Your Gemini API key lives in sessionStorage and dies when you close the tab. There's a full demo book you can browse without any key.

The stack

Zero backend. Zero dependencies beyond the browser and a Gemini key.

Getting AI to generate images without text.

I needed painterly cover illustrations with zero typography. Image models desperately want to put words on images. The prompt has to be adversarial — "ABSOLUTELY NO TEXT, NO LETTERS, NO WORDS" — and it still fails maybe 20% of the time. This single problem took more iterations than the rest of the app combined.

Multi-chapter coherence with human interventions. When you inject a Director's Note that contradicts the planned story arc, every downstream chapter summary needs to adapt. The system sends the generated chapter text + the user's note back to the AI and asks it to rewrite the remaining chapter metadata. It works surprisingly well. When it doesn't, the prose still adapts through context because each chapter prompt includes the tail end of the previous chapter.

Two-pass PDF rendering. The table of contents needs page numbers, but you don't know the page numbers until you've rendered all the chapters. So: first pass renders everything and tracks where each chapter lands, second pass goes back to the TOC page and fills in the numbers. Justified text is done via manual word-spacing calculation — split each line into words, measure the leftover space, distribute it evenly.

Persistence without a backend. Cover images are multi-megabyte base64 strings that blow up localStorage. Solution: metadata goes to localStorage, covers go to IndexedDB, and the library view stitches them back together on load. Delete a book and both stores get cleaned up.

What it's NOT

It's not a publishing pipeline. It's not meant to flood Amazon with AI novels. It's a creative toy — closer to AI Dungeon for long-form fiction than a KDP tool.

The question I was chasing: can a human and an AI co-direct a narrative across multiple chapters, with the human's choices propagating forward coherently?

The answer is "sometimes, and it's genuinely fascinating when it works."

Try it ebookforge.app

You can browse the full demo book (English or French) without entering any API key. Bring your own Gemini key to forge one from scratch.
Bilingual EN/FR.

The whole thing is a solo side project that started as a formatting script and turned into whatever this is. If you've ever fought with PDF generation in the browser, or tried to make AI-generated text stay coherent across 10+ chapters — I'd love to hear how you approached it.

Tags:#cloud#dev.to

Found this useful? Share it!

✈️ Telegram𝕏 TweetWhatsApp

Read the Full Story

Continue reading on Dev.to

Visit Dev.to ↗

Related Stories

☁️
☁️Cloud & DevOps

Majority Element

about 2 hours ago

☁️
☁️Cloud & DevOps

Building a SQL Tokenizer and Formatter From Scratch — Supporting 6 Dialects

about 2 hours ago

☁️
☁️Cloud & DevOps

Markdown Knowledge Graph for Humans and Agents

about 2 hours ago

Moving Beyond Disk: How Redis Supercharges Your App Performance
☁️Cloud & DevOps

Moving Beyond Disk: How Redis Supercharges Your App Performance

about 2 hours ago

📡 Source Details

Dev.to

📅 Mar 21, 2026

🕐 about 5 hours ago

⏱ 4 min read

🗂 Cloud & DevOps

Read Original ↗

Web Hosting

🌐 Hostinger — 80% Off Hosting

Start your website for ₹69/mo. Free domain + SSL included.

Claim Deal →

📬 AiFeed24 Daily

Top 5 AI & tech stories every morning. Join 40,000+ readers.

✦ 40,218 subscribers · No spam, ever

Cloud Hosting

☁️ Vultr — $100 Free Credit

Deploy cloud servers in 25+ locations. From $2.50/mo. No contract.

Claim $100 Credit →
AiFeed24

India's AI-powered tech news hub. Daily coverage of AI, startups, crypto and emerging technology.

✈️🛒

Topics

Artificial IntelligenceStartups & VCCryptocurrencyCybersecurityCloud & DevOpsIndia Tech

Company

About AiFeed24Write For UsContact

Daily Digest

Top 5 AI stories every morning. 40,000+ readers.

No spam, ever.

© 2026 AiFeed24 Media.Affiliate Disclosure — We earn commission on qualifying purchases at no extra cost to you.
PrivacyTermsCookies