This is a FastAPI + Streamlit project that allows users to search for books, track their reading, and receive AI-generated book recommendations.
Checkout the live application on Streamlit: ReadRadar
-
📖 Search Books: Search for books using the Google Books API.
-
📚 Track Your Reads: Save books to a personal reading list.
-
🤖 AI Recommendations: Get book recommendations based on your interests.
-
📊 Interactive UI: A user-friendly interface built with Streamlit.
Searches for books using the Google Books API.
- Query Params:
term
(book title, author, or keyword) - Response: Returns a list of the top 10 or so matching books.
Adds a book to the user's personal collection.
- Body:
{ "title": "Book Name", "author": "Author", }
- Response: Returns the saved book details.
Retrieves all books in the user's saved collection.
Removes a book from the collection. Response: { "message": "Book deleted successfully" }
Generates book recommendations based on a user's saved books.
-Body:
{ "books": ["Book 1", "Book 2"] }
Response: A list of recommended books.
This app uses Marvin AI to generate personalized book recommendations.
How It Works:
- The user saves books they’ve read or are interested in.
- The backend sends this data to the AI recommendation system.
- The AI suggests books based on themes, genres, and patterns.
Example Output:
{
"recommendations": [
{ "title": "The Hobbit", "author": "J.R.R. Tolkien" },
{ "title": "The Name of the Wind", "author": "Patrick Rothfuss" }
]
}
-
Clone the Repository:
git clone https://github.com/Zmerrill1/book-tracker.git cd book-tracker
-
Set Up Backend (FastAPI): Ensure you have Python installed, then create a virtual environment:
uv venv
Install dependencies:
uv sync
Set up environment variables:
cp .env.example .env
Then edit .env with your API keys and database settings.
Run database migrations:
alembic upgrade head
Start the FastAPI server:
uvicorn app.main:app --reload
-
Set Up Frontend (Streamlit): This will be in a separate concurrent terminal. Navigate to the frontend directory and install dependencies:
cd frontend uv sync
Run the Streamlit app:
streamlit run app.py
- Backend: FastAPI, PostgreSQL, Alembic (for migrations)
- Frontend: Streamlit
- External APIs: Google Books API, Marvin AI (for recommendations)
- Deployment: Fly.io (backend), Streamlit Cloud (frontend)
To deploy updates:
- For backend:
flyctl deploy
- For frontend if linked to Streamlit cloud:
git push origin main
- 📅 Reading progress tracking
- 🏆 Challenges & goals
- 📝 Contributing
This project is licensed under the MIT License.
Feel free to suggest any improvements or share your feedback by logging an issue against this repo!