An intelligent, AI-powered book reading application that transforms the digital reading experience through advanced natural language processing, text-to-speech, text-to-image generation, and chapter summarization capabilities.
- Overview
- Features
- Architecture
- Technology Stack
- API Documentation
- Installation
- Usage
- Testing
- Deployment
- Contributing
- Team
The AI-Powered Book Reader is a cutting-edge application designed to bridge the gap between traditional digital reading and modern AI capabilities. Built as part of CMPE 273 - Enterprise Distributed Systems, this platform leverages Large Language Models (LLMs) to provide an enhanced, accessible, and interactive reading experience.
- Enhanced Accessibility: Make reading accessible for visually impaired users through AI-driven features
- Real-Time NLP: Implement LLMs for instant text processing and comprehension
- Open-Source Integration: Seamless access to vast literature collections
- Intuitive Interface: User-friendly design with personalized reading experiences
- AI-Powered Features: Text-to-speech, text-to-image, and intelligent summarization
- Text-to-Speech (TTS): Convert text to natural-sounding speech using Microsoft Edge TTS
- Text-to-Image (TTI): Generate AI-powered visual representations using Amazon SageMaker Dreamlike Diffusion
- Chapter Summarization: Automated chapter summaries using DistilBART CNN 6-6 model
- Real-Time Processing: Instant AI model responses for enhanced user experience
- Multi-Source Integration: Access books from Project Gutenberg (Gutendex API) and WuxiaWorld
- Personal Library: Create custom reading lists and organize books by preferences
- Reading Progress: Track reading history and bookmark favorite passages
- Review System: Rate and review books with community feedback
- Custom Authentication: Secure email/password registration and login
- Google OAuth2: Seamless integration with Google accounts
- Secure Storage: Encrypted credential management and session handling
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Customizable Interface: Adjustable fonts, themes, and reading preferences
- Offline Support: Client-side caching for uninterrupted reading
- Accessibility Features: High contrast modes, adjustable text sizes, and screen reader support
Here are some screenshots of the application:
(High-level architecture of the system)
(End-to-end data flow from input sources to analytics and output)
- React 18: Modern UI framework with hooks and context
- Tailwind CSS: Utility-first CSS framework for responsive design
- IndexedDB: Client-side database for offline functionality
- Webpack: Module bundler and build tool
- Django 4.0+: Python web framework with REST API support
- Django REST Framework: API development toolkit
- Celery: Asynchronous task processing
- Redis: In-memory data structure store for caching
- Amazon SageMaker: Managed ML platform for model deployment
- Edge TTS: Microsoft's text-to-speech service integration
- Dreamlike Diffusion 1.0: Text-to-image generation model
- DistilBART CNN 6-6: Text summarization model
- AWS ECS: Container orchestration service
- AWS RDS: Managed MySQL database
- AWS S3: Object storage for static files
- AWS CloudFront: Content delivery network
- AWS Application Load Balancer: Traffic distribution
| Endpoint | Method | Parameters | Description | Response |
|---|---|---|---|---|
/auth/signup/ |
POST | {"email": "string", "password": "string", "first_name": "string", "last_name": "string"} |
Register new user | {"response.data": true/false, "response.message": "string"} |
/auth/login/ |
POST | {"email": "string", "password": "string"} |
User authentication | {"access": "string", "refresh": "string", "response.message": "string"} |
/auth/google-login/ |
POST | {"token": "string"} |
Google OAuth validation | {"access": "string", "refresh": "string", "response.message": "string"} |
| Endpoint | Method | Parameters | Description | Response |
|---|---|---|---|---|
/main/books/with-genres/ |
GET | None | Get all books with genres | List of book objects |
/main/books/with-genres/<book_id>/ |
GET | book_id (path) |
Get specific book details | Book object |
/main/books/with-genres/search/ |
GET | query=<keyword> |
Search books by keyword | List of matching books |
/main/reviews/ |
POST | {"book_id": int, "user_id": int, "review": "string", "rating": int} |
Add book review | Success/error message |
| Endpoint | Method | Parameters | Description | Response |
|---|---|---|---|---|
/library/get_library_data/ |
GET | user_id |
Get user's library data | Library object with books and shelves |
/library/get_shelf_list/ |
GET | user_id |
Get user's shelf list | List of shelf objects |
/library/add_shelf/ |
POST | {"user_id": int, "shelf": {"shelf_id": int, "name": "string"}} |
Create new shelf | Success/error message |
/library/add_book_to_shelf/ |
POST | {"user_id": int, "shelf_id": int, "book_id": int} |
Add book to shelf | Success/error message |
/library/remove_book_from_shelf/ |
DELETE | {"shelf_id": int, "book_id": int} |
Remove book from shelf | Success/error message |
| Endpoint | Method | Parameters | Description | Response |
|---|---|---|---|---|
/book/{book_id}/{chapter_number} |
GET | book_id, chapter_number (path) |
Get chapter content | Chapter content object |
/book/tts/{book_id}/{chapter_number} |
POST | {"chapter_number": int, "book_id": int} |
Stream TTS audio | Streaming audio URL and paragraph index |
/book/aiimage/{book_id}/{chapter_number} |
POST | {"chapter_number": int, "book_id": int} |
Generate AI images | JSON with AI-generated chapter images |
- Node.js 18+ and npm
- Python 3.8+
- Redis server
- MySQL database
- MongoDB instance
-
Clone the repository
git clone https://github.com/DJJ547/CMPE273-Book-Reader-React.git cd cmpe273-book-reader-react -
Install dependencies
npm install
-
Environment Configuration
- Download the
.envfile from the provided link - Place it in the root directory
- Configure your API endpoints and authentication keys
- Download the
-
Start development server
npm start
-
Clone the backend repository
git clone https://github.com/DJJ547/CMPE273-Book-Reader-Django.git cd cmpe273-book-reader-django -
Install Python dependencies
pip install -r requirements.txt
-
Configure database connections
- Update database settings in
settings.py - Configure Redis connection
- Set up AWS credentials for SageMaker
- Update database settings in
-
Run migrations
python manage.py migrate
-
Start the server
python manage.py runserver
- Authentication: Sign up with email/password or use Google OAuth
- Browse Books: Explore trending books and new releases on the main page
- Search: Use the search functionality to find specific books or genres
- Reading: Open any book to access AI-powered reading features
- Library Management: Organize books into custom shelves and track reading progress
- Text-to-Speech: Click the TTS button to have the book read aloud
- Text-to-Image: Generate visual representations of chapter content
- Summarization: Get AI-generated chapter summaries for quick understanding
npm testpython -m pytest- JMeter: Configured for up to 200 concurrent users
- Performance: Optimized for sub-2000ms response times
- AWS S3: Static file hosting
- AWS CloudFront: Content delivery network
- CI/CD: Automated deployment pipeline
- AWS ECS: Container orchestration
- AWS Application Load Balancer: Traffic distribution
- AWS RDS: Managed MySQL database
- AWS EC2: MongoDB hosting
- AWS SageMaker: Model deployment and inference
- AWS Lambda: Serverless AI processing
- API Gateway: RESTful API management
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
CMPE 273 - Enterprise Distributed Systems
- Jiajian Liu - Frontend Development & UI/UX
- Yifu Fang - Backend Development & API Design
- Dina Liao - AI Integration & Machine Learning
- Jiajun Dai - Infrastructure & DevOps
This project is developed as part of CMPE 273 coursework at San JosΓ© State University.
- Frontend Repository: https://github.com/DJJ547/CMPE273-Book-Reader-React.git
- Backend Repository: https://github.com/DJJ547/CMPE273-Book-Reader-Django.git
- Course: CMPE 273 - Enterprise Distributed Systems
- Instructor: Dr. Chandrasekar Vuppalapati
Built with β€οΈ by the CMPE 273 Team
Fall 2024 β’ San JosΓ© State University








