Welcome to BookSense AI, an intelligent book recommendation system designed to help you discover your next great read based on your taste, mood, and current trends.
BookSense AI is a modern web application that bridges the gap between traditional book catalogs and personalized discovery. By combining collaborative filtering techniques with state-of-the-art Generative AI (Google Gemini), BookSense offers a unique "Mood-to-Book" experience alongside classic popularity-based recommendations.
In the digital age, readers suffer from decision paralysis. With millions of books available, choosing one can be overwhelming.
- Generic Suggestions: Traditional platforms often push "bestsellers" that don't match individual tastes.
- Lack of Emotional Context: Most algorithms ignore the reader's current emotional state.
- Static Search: Finding a book requires knowing exactly what you're looking for.
BookSense AI solves this by offering:
- Mood-Based Discovery: Analyze your facial expression or describe your mood to get tailored suggestions.
- Hybrid Recommendations: Blends statistical popularity with AI-powered semantic understanding.
The project follows a Hybrid Microservices-like Architecture:
- Framework: React 19 (Vite)
- Role: Handles the user interface, routing, and direct interactions with AI services.
- AI Integration: The frontend communicates directly with the Google Gemini API for:
- Mood Detection: Analyzing facial cues from the webcam.
- Summarization: Generating engaging book summaries on the fly.
- Personalization: generating recommendations based on reading history.
- Framework: Python Flask
- Role: API server for the local dataset.
- Core Engine:
- Collaborative Filtering: Uses pre-trained Pickle (
.pkl) models to find books similar to user inputs based on historical user ratings. - Dataset Search: Efficiently queries the processed dataset of 50 top books and thousands of others.
- Collaborative Filtering: Uses pre-trained Pickle (
- Model: Google Gemini 2.5 Flash
- Function: Provides real-time, context-aware intelligence that goes beyond the static dataset.
- React 19: Latest version for robust UI state management.
- Vite: Ultra-fast build tool and development server.
- TypeScript: Ensures type safety across the codebase.
- Google GenAI SDK: For seamless integration with Gemini models.
- Python 3.x: The core logic language.
- Flask: Lightweight WSGI web application framework.
- Pandas & NumPy: For efficient data manipulation.
- Scikit-learn: For implementing the recommendation algorithms (Cosine Similarity).
Follow these steps to set up the project locally.
- Node.js (v18+)
- Python (v3.8+)
git clone <repository-url>
cd BookSense-V3.0- Navigate to the backend directory:
cd backend - Install dependencies:
pip install -r requirements.txt
- Put Your GEMINI API Key
BookSense-V3.0/frontend/services/geminiService.ts
- Start the Flask server:
The server will start on
python app.py
http://127.0.0.1:5001
- Open a new terminal and navigate to the frontend directory:
cd frontend - Install dependencies:
npm install
- Start the development server:
npm run dev
- Open your browser and visit the URL shown (usually
http://localhost:5173).
- Enhanced Reading Culture: Making discovery fun encouraging more people to read.
- Emotional Well-being: Helping users find books that validate or uplift their current mood.
- User Authentication: Save your reading history and favorites to the cloud.
- Social Features: Share your "Mood Shelves" with friends.
- Mobile App: A React Native version for on-the-go discovery.
- Expanded Dataset: Integrating real-time pricing and availability from major bookstores.
Built with ❤️