A modern web application for managing your book collection, built with Flask and SQLAlchemy.
- Book Management: Add/View books with ISBN, title, publication year, and ratings
- Author Management: Add/View authors with birth/death dates
- Search Functionality: Find books by title or author name
- Sorting: Organize books by title or author
- Responsive UI: Modern design with Tailwind CSS
- Cover Images: Automatic book covers via OpenLibrary API
- 🎨 Modern UI Design
- 🔍 Detailed Book/Author Pages
- ❌ Cascade Author Deletion
- ⭐ Book Ratings (1-10)
- 🤖 AI Book Recommendations (OpenAI integration)
- Python 3.9+
- pip package manager
- SQLite database
-
Clone the repository:
git clone https://github.com/rtaran/book-alchemy.git cd book-alchemy -
Install dependencies:
pip install -r requirements.txt
-
Create a
.envfile in the root directory with the following variables:SECRET_KEY=your_secret_key_here RAPIDAPI_KEY=your_rapidapi_key_here-
SECRET_KEY: A random string used by Flask for session security. You can generate one with:python -c "import secrets; print(secrets.token_hex(16))" -
RAPIDAPI_KEY: Required for AI book recommendations. Get your key by:- Sign up at RapidAPI
- Subscribe to the ChatGPT API
- Copy your API key from the dashboard
-
-
Initialize the database and run the application:
python app.py
The application will be available at http://localhost:5001
- Home Page: Browse your book collection, search, and sort books
- Add Author: Create new author profiles with biographical information
- Add Book: Add new books to your library with details and ratings
- Book Details: Click on any book title to view detailed information
- AI Recommendations: Get personalized book recommendations based on your library
- Session Error: If you see "The session is unavailable because no secret key was set", make sure you've created the
.envfile with a SECRET_KEY as described in the setup instructions. - Recommendation Error: If book recommendations don't work, verify your RAPIDAPI_KEY is correctly set in the
.envfile.
