A modern, full-stack web application for creating e-books with AI-powered content generation. Built with React, Node.js, Express, and MongoDB.
- 🎨 Modern UI/UX - Beautiful glassmorphic design with smooth animations
- 🤖 AI Content Generation - Generate chapters using Google Gemini AI
- 📝 Rich Text Editor - Intuitive chapter editing interface
- 📚 Book Management - Create, edit, and organize multiple books
- 📄 Export Options - Download books as PDF or DOCX
- 🔐 Authentication - Secure user authentication with JWT
- 📱 Responsive Design - Works seamlessly on all devices
- 🌙 Dark Theme - Eye-friendly dark mode interface
- React 19 - UI library
- React Router - Client-side routing
- Tailwind CSS - Utility-first CSS framework
- Vite - Build tool and dev server
- React Hot Toast - Toast notifications
- Node.js - Runtime environment
- Express - Web framework
- MongoDB - Database
- Mongoose - ODM
- JWT - Authentication
- Google Gemini AI - Content generation
- PDFKit & DOCX - Document export
- Node.js (v16 or higher)
- MongoDB (local or Atlas)
- Google Gemini API key (Get one here)
git clone <repository-url>
cd ai-ebook-creatorcd backend
npm install
# Create .env file
cp .env.example .env
# Edit .env and add your configurationBackend .env Configuration:
PORT=5000
MONGO_URI=mongodb://127.0.0.1:27017/ai-ebook
JWT_SECRET=your_super_secret_jwt_key
GEMINI_API_KEY=your_gemini_api_key_here
CORS_ORIGIN=http://localhost:5173Start Backend:
npm startcd frontend
npm install
# Create .env file
cp .env.example .env
# Edit .env if neededFrontend .env Configuration:
VITE_API_URL=http://localhost:5000Start Frontend:
npm run devOpen your browser and navigate to: http://localhost:5173
See DEPLOYMENT.md for detailed deployment instructions for:
- Frontend (Vercel)
- Backend (Render/Railway)
- Database (MongoDB Atlas)
- Sign Up - Create a new account
- Create Book - Click "Create New Book" and fill in details
- Add Chapters - Use the editor to add and organize chapters
- Generate Content - Use AI to generate chapter content
- Export - Download your book as PDF or DOCX
ai-ebook-creator/
├── frontend/
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components
│ │ ├── context/ # React context providers
│ │ ├── utils/ # Utility functions
│ │ └── index.css # Global styles
│ └── package.json
├── backend/
│ ├── config/ # Database configuration
│ ├── controller/ # Route controllers
│ ├── models/ # Mongoose models
│ ├── routes/ # API routes
│ ├── middlewares/ # Custom middlewares
│ └── index.js # Entry point
└── README.md
VITE_API_URL- Backend API URL
PORT- Server port (default: 5000)MONGO_URI- MongoDB connection stringJWT_SECRET- Secret key for JWT tokensGEMINI_API_KEY- Google Gemini API keyOPENROUTER_API_KEY- (Optional) OpenRouter API keyCORS_ORIGIN- Allowed CORS origin
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
- Google Gemini AI for content generation
- Tailwind CSS for the design system
- React community for amazing tools
For support, email your-email@example.com or open an issue on GitHub.
Made with ❤️ by Your Name