Skip to content

gmalbert/bookclub

Repository files navigation

Book Club Selections

A complete web application for discovering, managing, and tracking your book club's reading selections.

What It Does

This app helps book clubs find perfect books, organize reading lists, and track selections over time. It connects to the Hardcover book database to give you access to thousands of books with detailed information, ratings, and covers.

How It Works

Search for Books

  • Search by author, title, or genre - Use the search boxes in the sidebar
  • Browse results - View book covers, descriptions, ratings, and publication details
  • See comprehensive info - Each book shows author, year, page count, ratings, and genres

Build Your Reading List

  • Select books - Use checkboxes to choose books from search results
  • Add to list - Selected books are automatically added to your book club's list
  • Remove books - Mark books for removal and delete them with one click
  • View current selections - The sidebar shows how many books you've chosen
  • Manual entry - Add books manually if they're not in the database

Pick Your Next Book

  • Random selection - Let the app pick a book for you from your list
  • Smart filtering - Avoids repeating authors or genres from recent selections
  • Selection tracking - Keeps a history of which books you've chosen and when
  • Round management - Organizes selections by book club rounds

Export Your Selections

  • PDF - Professional landscape format table for printing or sharing
  • Excel/CSV - Spreadsheet format for further analysis or record-keeping
  • Text - Simple bullet list format for easy sharing

Key Features

Search & Discovery

  • Real-time search - Instant results from Hardcover's extensive book database
  • Persistent selections - Your chosen books stay selected even if you search for more
  • Rich book details - See covers, ratings, descriptions, and publication info

List Management

  • Duplicate prevention - Can't accidentally add the same book twice
  • Easy removal - Mark multiple books for removal and delete them at once
  • Auto-cleanup - Remove duplicate entries with one click

Smart Selection System

  • Random book picker - Perfect for when you can't decide what to read next
  • Variety enforcement - Automatically avoids repeating recent authors or genres
  • Selection history - Track all your past book club choices by round
  • Undo selections - Remove the last pick if you change your mind

User Experience

  • Mobile-friendly - Works perfectly on phones, tablets, and desktops
  • Toast notifications - Get instant feedback when you add or remove books
  • Clean interface - Simple, intuitive design that's easy to use
  • Sidebar quick actions - Add or clear selected books from anywhere on the page without scrolling

Recent Improvements (October 2025)

Enhanced Search Accuracy

  • Field-specific search - Improved search precision with dedicated author, title, and genre filtering
  • Better results quality - Client-side filtering ensures search results match your exact criteria
  • Expanded pagination - Increased from 54 to 221+ total results with multi-page fetching
  • Cross-contamination fixes - Eliminated issues where author searches returned books with search terms in titles

Improved User Interface

  • Sidebar quick actions - Always-visible "ADD" and "CLEAR" buttons for selected books
  • No-scroll workflow - Add books to your list from anywhere on the page without scrolling to top/bottom
  • Streamlined buttons - Clean, symmetrical action buttons with consistent styling
  • Multiple access points - Action buttons available in sidebar, top of results, and bottom of results

Technical Enhancements

  • Dependency management - Added reportlab for PDF export functionality
  • Session state optimization - Improved book selection tracking and state management
  • Error handling - Better handling of API responses and edge cases

March 2026 – Email Submission & Review Queue

Automated Email Ingestion

  • Email your book links – Send Amazon product sharing URLs to books@bookclub-selections.com and they’ll automatically be added.
  • Cloudflare Workers – A two‑worker pipeline parses incoming emails (email-worker), resolves ASINs, and communicates with the main app (book-processor).
  • Robust parsing – Handles quoted‑printable encoding, short a.co/amzn.to links, and Kindle‑only (B‑ASIN) titles via page scraping.

Review Queue for Failures

  • Pending queue CSV – Failed/unknown submissions are logged in data_files/pending_queue.csv on GitHub.
  • In‑app review UI – Sidebar shows a “📬 Review Queue” with expandable items, search buttons, and direct dismissal links. Searches are auto‑filled with scraped metadata.
  • One‑click fixes – Search from the queue, add the correct book, and dismiss the entry without manual copy‑paste.

Data Persistence & Sync

  • GitHub Contents API – All CSV writes (book_selections.csv, selection_history.csv, pending_queue.csv) automatically commit back to the repo to survive Streamlit Cloud’s ephemeral filesystem.
  • Secrets requiredGITHUB_TOKEN (repo contents write) and GITHUB_REPO must be set in Streamlit secrets or environment.

Infrastructure Notes

  • Data flows – Email → Cloudflare email-worker → book-processor → GitHub CSV → Streamlit app
  • Local testing – You can inject dummy rows into pending_queue.csv to exercise the review UI before sending real emails.
  • Deployment – Workers live under cloudflare/email-worker and cloudflare/book-processor; deploy with wrangler deploy from each subdirectory.

Feel free to update these sections as new features are added or architecture evolves.

Getting Started

Building Your Book List

  1. Search for books - Use the search boxes to find books by author, title, or genre
  2. Select favorites - Check the boxes next to books you want to add
  3. Add to list - Click "Add Selected Books" to save them to your book club list
  4. Manage your list - View, remove, or reorganize books as needed

Picking Your Next Read

  1. Build your list - Add several books you're interested in reading
  2. Use random selection - Click "Pick Random Book" to let the app choose
  3. Confirm your pick - Review the selected book and confirm your choice
  4. Track your history - See all past selections organized by round

Sharing Your Selections

  1. View your list - Click "View My Book List" to see all chosen books
  2. Export options - Download as PDF for printing, CSV for spreadsheets, or text for easy sharing
  3. Clean up - Use the maintenance tools to remove duplicates or manage your selection history

The app automatically saves everything, so you can close it and come back anytime to continue where you left off!

About

Book Club Selections

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors