|
2 | 2 |
|
3 | 3 | BookAI is a revolutionary web application that harnesses the power of artificial intelligence to generate high-quality, professional books in minutes. Our cutting-edge AI technology empowers authors, content creators, and businesses to streamline their writing process and produce market-ready books with unprecedented speed and efficiency.
|
4 | 4 |
|
5 |
| - |
| 5 | + |
6 | 6 |
|
7 |
| -[](https://github.com/Adarshagupta/BookAI/blob/main/LICENSE) |
8 |
| -[](https://github.com/Adarshagupta/BookAI/releases/) |
9 |
| -[](https://github.com/Adarshagupta/BookAI/stargazers) |
10 |
| -[](https://github.com/Adarshagupta/BookAI/issues/) |
| 7 | +[](https://github.com/adarshagupta/trybookai/blob/main/LICENSE) |
| 8 | +[](https://github.com/adarshagupta/trybookai/releases/) |
| 9 | +[](https://github.com/adarshagupta/trybookai/stargazers) |
| 10 | +[](https://github.com/adarshagupta/trybookai/issues/) |
11 | 11 |
|
12 |
| -## 🌟 Features |
| 12 | +AI-Powered Book Generation and Management System |
| 13 | +================================================ |
13 | 14 |
|
14 |
| -* 📖 Book Generation |
15 |
| -* 🌍 Multiple Language Support |
16 |
| -* 🗣️ Text-to-Speech Functionality |
17 |
| -* 📄 PDF Download |
18 |
| -* 📊 Analytics Dashboard |
| 15 | +Table of Contents |
| 16 | +----------------- |
19 | 17 |
|
20 |
| -## 🚀 Usage |
| 18 | +1. [Overview](#overview) |
| 19 | + |
| 20 | +2. [Features](#features) |
| 21 | + |
| 22 | +3. [Technologies Used](#technologies-used) |
| 23 | + |
| 24 | +4. [System Architecture](#system-architecture) |
| 25 | + |
| 26 | +5. [API Endpoints](#api-endpoints) |
| 27 | + |
| 28 | +6. [Authentication and Security](#authentication-and-security) |
| 29 | + |
| 30 | +7. [Database](#database) |
| 31 | + |
| 32 | +8. [PDF Generation](#pdf-generation) |
| 33 | + |
| 34 | +9. [Email Notifications](#email-notifications) |
| 35 | + |
| 36 | +10. [Deployment](#deployment) |
| 37 | + |
| 38 | + |
| 39 | +1\. Overview |
| 40 | +------------ |
| 41 | + |
| 42 | +This project is an AI-powered book generation and management system that allows users to create, download, and manage AI-generated books. It incorporates various AI models, authentication systems, and database management to provide a comprehensive solution for automated book creation. |
| 43 | + |
| 44 | +2\. Features |
| 45 | +------------ |
| 46 | + |
| 47 | +* AI-powered book generation using OpenAI and Together AI models |
| 48 | + |
| 49 | +* Multi-language support for book generation |
| 50 | + |
| 51 | +* PDF creation and management |
| 52 | + |
| 53 | +* User authentication and registration with OTP verification |
| 54 | + |
| 55 | +* API key generation for programmatic access |
| 56 | + |
| 57 | +* Email notifications for user actions |
| 58 | + |
| 59 | +* Progress tracking for book generation |
| 60 | + |
| 61 | +* Saved PDF management and download functionality |
| 62 | + |
| 63 | +* Web-based user interface for book generation and management |
| 64 | + |
| 65 | +* RESTful API for programmatic access to book generation features |
| 66 | + |
| 67 | + |
| 68 | +3\. Technologies Used |
| 69 | +--------------------- |
| 70 | + |
| 71 | +* **Backend**: Python, Flask |
| 72 | + |
| 73 | +* **Database**: SQLite |
| 74 | + |
| 75 | +* **Authentication**: Firebase Authentication |
| 76 | + |
| 77 | +* **AI Models**: OpenAI API, Together AI API |
| 78 | + |
| 79 | +* **PDF Generation**: ReportLab |
| 80 | + |
| 81 | +* **Email**: Flask-Mail |
| 82 | + |
| 83 | +* **Frontend**: HTML, CSS, JavaScript (assumed, not shown in the provided code) |
| 84 | + |
| 85 | +* **API Documentation**: Not specified, but could be implemented using Swagger/OpenAPI |
| 86 | + |
| 87 | +* **Logging**: Python's built-in logging module |
| 88 | + |
| 89 | +* **Environment Variables**: python-dotenv |
| 90 | + |
| 91 | +* **Asynchronous Programming**: asyncio, aiohttp |
| 92 | + |
| 93 | + |
| 94 | +4\. System Architecture |
| 95 | +----------------------- |
| 96 | + |
| 97 | +The system follows a modular architecture with the following components: |
| 98 | + |
| 99 | +* Web Server (Flask) |
| 100 | + |
| 101 | +* Authentication Service (Firebase) |
| 102 | + |
| 103 | +* Database Service (SQLite) |
| 104 | + |
| 105 | +* AI Integration Services (OpenAI, Together AI) |
| 106 | + |
| 107 | +* PDF Generation Service |
| 108 | + |
| 109 | +* Email Notification Service |
| 110 | + |
| 111 | +* API Key Management Service |
| 112 | + |
21 | 113 |
|
22 |
| -### 📚 Generating a Book |
| 114 | +5\. API Endpoints |
| 115 | +----------------- |
23 | 116 |
|
24 |
| -1. Access the application at the provided URL. |
25 |
| -2. Fill out the form with the following details: |
26 |
| - * 🤖 Model: Choose between GPT-3.5 Turbo, GPT-4o Mini, or GPT-4o Mini (2024-07-18) |
27 |
| - * 🌐 Language: Select English, Hindi (Experimental), or Spanish |
28 |
| - * 📝 Book Topic: Enter the main subject of your book |
29 |
| - * 📏 Target Word Count: Specify the desired length of your book |
30 |
| -3. Click "Generate Book" to start the process. |
31 |
| -4. Wait for the generation to complete. Progress will be displayed in real-time. |
| 117 | +* /: Home page |
| 118 | + |
| 119 | +* /about: About page |
| 120 | + |
| 121 | +* /fr: French version of the home page |
| 122 | + |
| 123 | +* /jobs: Jobs page |
| 124 | + |
| 125 | +* /playground: Interactive playground |
| 126 | + |
| 127 | +* /generate (POST): Generate book content |
| 128 | + |
| 129 | +* /progress: Server-Sent Events for progress tracking |
| 130 | + |
| 131 | +* /download-pdf (POST): Generate and download PDF |
| 132 | + |
| 133 | +* /save-pdf (POST): Save generated PDF |
| 134 | + |
| 135 | +* /get-saved-pdfs (GET): Retrieve saved PDFs |
| 136 | + |
| 137 | +* /download-saved-pdf/ (GET): Download a specific saved PDF |
| 138 | + |
| 139 | +* /generate-api-key (POST): Generate API key for a user |
| 140 | + |
| 141 | +* /api/generate-book (POST): API endpoint for book generation |
| 142 | + |
| 143 | +* /api: API documentation page |
| 144 | + |
| 145 | +* /login (POST): User login |
| 146 | + |
| 147 | +* /verify-login (POST): Verify login OTP |
| 148 | + |
| 149 | +* /register (POST): User registration |
| 150 | + |
| 151 | +* /verify-registration (POST): Verify registration OTP |
| 152 | + |
| 153 | +* /auth: Authentication page |
| 154 | + |
32 | 155 |
|
33 |
| -### 🗣️ Text-to-Speech |
| 156 | +6\. Authentication and Security |
| 157 | +------------------------------- |
34 | 158 |
|
35 |
| -1. Once the book is generated, use the play/pause button to start or stop the text-to-speech feature. |
36 |
| -2. Select a voice from the dropdown menu to change the speaking voice. |
| 159 | +* Firebase Authentication for user management |
| 160 | + |
| 161 | +* OTP (One-Time Password) verification for login and registration |
| 162 | + |
| 163 | +* Session management using Flask sessions |
| 164 | + |
| 165 | +* API key authentication for programmatic access |
| 166 | + |
| 167 | +* HTTPS recommended for production deployment (not implemented in the provided code) |
| 168 | + |
| 169 | + |
| 170 | +7\. Database |
| 171 | +------------ |
| 172 | + |
| 173 | +* SQLite database for storing PDF metadata and API keys |
| 174 | + |
| 175 | +* Tables: |
| 176 | + |
| 177 | + * pdfs: Stores information about generated PDFs |
| 178 | + |
| 179 | + * api\_keys: Stores API keys associated with users |
| 180 | + |
37 | 181 |
|
38 |
| -### 📥 Downloading the Book |
| 182 | +8\. PDF Generation |
| 183 | +------------------ |
39 | 184 |
|
40 |
| -1. After generation, click the "Download Your Book" button. |
41 |
| -2. The book will be downloaded as a PDF file. |
| 185 | +* Uses ReportLab library to create PDF documents |
| 186 | + |
| 187 | +* Supports custom styling and formatting |
| 188 | + |
| 189 | +* Generates PDFs from AI-generated content |
| 190 | + |
42 | 191 |
|
43 |
| -### 📊 Analytics Dashboard |
| 192 | +9\. Email Notifications |
| 193 | +----------------------- |
44 | 194 |
|
45 |
| -After book generation, an analytics dashboard will display: |
| 195 | +* Uses Flask-Mail for sending emails |
| 196 | + |
| 197 | +* Sends notifications for user registration and login |
| 198 | + |
| 199 | +* Sends OTP for user verification |
| 200 | + |
46 | 201 |
|
47 |
| -* 📊 Word Count |
48 |
| -* 📈 Readability Score |
49 |
| -* 🏷️ Genre Classification |
50 |
| -* 😊 Sentiment Analysis |
| 202 | +10\. Deployment |
| 203 | +--------------- |
| 204 | + |
| 205 | +* The application is designed to run on a Flask development server |
| 206 | + |
| 207 | +* For production, it's recommended to use a production-grade WSGI server like Gunicorn |
| 208 | + |
| 209 | +* Environment variables should be properly set in production for sensitive information |
| 210 | + |
| 211 | + |
| 212 | +Additional Notes |
| 213 | +---------------- |
| 214 | + |
| 215 | +* The system uses asynchronous programming for handling concurrent book generation requests |
| 216 | + |
| 217 | +* Progress tracking is implemented using Server-Sent Events |
| 218 | + |
| 219 | +* The code includes error handling and logging for better debugging and monitoring |
| 220 | + |
| 221 | +* The system is designed to handle rate limiting and API usage tracking |
| 222 | + |
51 | 223 |
|
52 |
| -## 💻 Local Setup |
| 224 | +This documentation provides an overview of the main components and features of the AI-powered book generation and management system. For more detailed information on each component or feature, additional documentation may be necessary. |
53 | 225 |
|
54 | 226 | ### Requirements
|
55 | 227 |
|
@@ -185,7 +357,7 @@ Show ImageShow ImageShow Image
|
185 | 357 | 🙌 Contributors
|
186 | 358 | ---------------
|
187 | 359 |
|
188 |
| -[](https://github.com/Adarshagupta/BookAI/graphs/contributors) |
| 360 | +[](https://github.com/adarshagupta/trybookai/graphs/contributors) |
189 | 361 |
|
190 | 362 | Made with [contrib.rocks](https://contrib.rocks).
|
191 | 363 |
|
|
0 commit comments