An intelligent book management web application built using Flask, SQLite, and Google Gemini AI.
The application allows users to maintain their personal reading library, track reading progress, search books, edit book details, and receive personalized AI-powered reading recommendations based on their reading history and current interests.
- Add new books to your personal library
- Store:
- Title
- Author
- Genre
- Reading Status
- Update book information anytime
- Delete books from the collection
Search books by:
- Title
- Author
- Genre
The search updates dynamically from the database and helps users quickly locate books in large collections.
Each book can be categorized as:
- Unread
- Reading
- Completed
This helps users monitor their reading progress efficiently.
Books can be edited directly from the library page:
- Modify title
- Change author
- Update genre
- Change reading status No separate edit page is required.
Powered by Google Gemini 2.5 Flash.
The recommendation engine:
- Analyzes completed books
- Examines books currently being read
- Understands reading preferences
- Suggests books that align with the user's interests
Users can also request recommendations for a specific genre.
Example:
Mystery
Science Fiction
Fantasy
Thriller
Business
Biography
- HTML5
- CSS3
- Jinja2 Templates
- Python
- Flask
- SQLite3
- Google Gemini API
- Gemini 2.5 Flash Model
- python-dotenv
BOOK-TRACKER/
β
βββ codes/
β β
β βββ static/
β β βββ style.css
β β
β βββ templates/
β β βββ index.html
β β
β βββ app.py
β βββ init_db.py
β βββ requirements.txt
β βββ .env
β βββ .gitignore
β βββ booktracker.db
β
βββ OutputImages/
β βββ AddingBook.png
β βββ BookAdded.png
β βββ BookDeleted.png
β βββ DashBoard.png
β βββ AIRecommendation.png
β βββ AIRecommendationBasedonGenre.png
β βββ SearchResultFantasyGenre.png
β βββ SearchResultGamesGenre.png
β
βββ README.md
The application uses a SQLite database named:
booktracker.db
Table:
CREATE TABLE books (
book_id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL,
author TEXT NOT NULL,
genre TEXT,
status TEXT
);User enters:
- Title
- Author
- Genre
- Reading Status Book is stored in SQLite database.
Users can:
- View all books
- Edit existing books
- Delete books
- Update reading progress
Search functionality queries:
title
author
genreusing SQL LIKE operations.
The system:
- Retrieves unfinished books.
- Retrieves completed books.
- Builds a reading profile.
- Sends the profile to Gemini.
- Gemini returns a personalized recommendation.
The recommendation engine considers:
Books marked:
Unread
Reading
These represent the user's future reading intentions.
Books marked:
Completed
These represent previously enjoyed books.
Users can optionally provide a genre. Example:
Fantasy
The AI then generates recommendations specifically within that genre.
Create a .env file inside the project directory.
GEMINI_API_KEY=YOUR_GEMINI_API_KEY
FLASK_SECRET_KEY=YOUR_SECRET_KEYgit clone https://github.com/your-username/book-tracker.git
cd book-tracker/codespython -m venv venv
venv\Scripts\activatepython3 -m venv venv
source venv/bin/activatepip install -r requirements.txtpython app.pyOpen:
http://127.0.0.1:5000
- User Authentication
- Multiple User Libraries
- Book Cover Integration
- Goodreads API Integration
- Reading Analytics Dashboard
- Reading Streak Tracking
- Favorite Books Collection
- Dark Mode
- Export Library to CSV/PDF
- AI Reading Plan Generator
This project demonstrates:
- CRUD Operations using Flask
- SQLite Database Integration
- Environment Variable Management
- AI API Integration
- Prompt Engineering
- Search Functionality
- Full Stack Web Development
Madhuchhanda Das
B.Tech Computer Science & Engineering
Project: AI Book Tracker & Reading Advisor
This project is created for educational and learning purposes.







