Full Stack AI-Powered eBook Creator App with MERN Stack
Build a full-stack AI-powered eBook Creator application using MongoDB, Express, React, and Node.js. Uses Google Gemini AI to generate complete ebook outlines and full chapter content from a title alone. Features a markdown editor with real-time preview, drag-and-drop chapter reordering, custom cover image upload, and PDF and DOCX export — a genuinely useful content creation tool built entirely from scratch with the MERN stack.
What You'll Build
What You'll Learn
Video Chapters
Tech Stack
Frequently Asked Questions
How does the AI outline generator work?
You enter your ebook title and click Generate Outline. The Express backend sends the title to Gemini with a prompt instructing it to return a structured list of chapter titles and short descriptions. These are saved as chapter objects in your MongoDB book document — ready to expand with the chapter writer.
How does the AI chapter writer work?
For any chapter in your outline, you can click Generate Content. The chapter title and book context are sent to Gemini, which returns fully written markdown content. This populates the markdown editor for that chapter — you can edit, expand, or publish it as-is.
How does the PDF and DOCX export work?
Both exports are generated server-side in Express using Node.js document libraries. The backend assembles the full ebook content, generates the file, and streams it back to the browser as a download — no client-side generation or third-party SaaS needed.
How does the drag-and-drop chapter reordering work?
The chapter list uses a React drag-and-drop implementation. When you drop a chapter in a new position, the updated order is saved to MongoDB via the update ebook API — so the order persists across sessions.
What prior knowledge do I need?
Intermediate MERN experience is recommended. If you have completed the AI Interview Prep App or Invoice Generator, the auth, context, and Gemini integration sections will feel familiar. The markdown editor, drag-and-drop, and export features are explained from scratch.
What is included in the source code?
You get the full React frontend, Express backend, Mongoose schemas for users and books, all AI and export utility functions, a .env.example with all required keys, and a README with local setup and deployment instructions.
