π MyBibliotheca
MyBibliotheca is a self-hosted personal library and reading-trackerβyour open-source alternative to Goodreads, StoryGraph, and Fable! It lets you log, organize, and visualize your reading journey. Add books by ISBN, track reading progress, log daily reading, and generate monthly wrap-up images of your finished titles.
β¨ Features
- π Add Books: Add books quickly by ISBN with automatic cover and metadata fetching. Now featuring bulk-import from Goodreads and other CSV files!
- β Track Progress: Mark books as Currently Reading, Want to Read, Finished, or Library Only.
- π Reading Logs: Log daily reading activity and maintain streaks.
- πΌοΈ Monthly Wrap-Ups: Generate shareable image collages of books completed each month.
- π Search: Find and import books using the Google Books API.
- π± Responsive UI: Clean, mobile-friendly interface built with Bootstrap.
- π Multi-User Support: Secure authentication with user data isolation. (COMING SOON)
- π€ Admin Management: Administrative tools and user management. (COMING SOON)
π Getting Started
π¦ Run with Docker
MyBibliotheca can be run completely in Docker β no need to install Python or dependencies on your machine.
β Prerequisites
- Docker installed
- Docker Compose installed
π Option 1: One-liner (Docker only)
docker run -d \
--name mybibliotheca \
-p 5054:5054 \
-v /path/to/data:/app/data \
-e TIMEZONE=America/Chicago \
-e WORKERS=6 \
--restart unless-stopped \
pickles4evaaaa/mybibliotheca:1.1.1
π Option 2: Docker Compose
Create a docker-compose.yml
file:
services:
mybibliotheca:
image: pickles4evaaaa/mybibliotheca:1.1.1
container_name: mybibliotheca
ports:
- "5054:5054"
volumes:
- /path/to/data:/app/data # β bind-mount host
restart: unless-stopped
environment:
- TIMEZONE=America/Chicago # β
Set your preferred timezone here
- WORKERS=6 # Change to the number of Gunicorn workers you want
Then run:
docker compose up -d
π‘ You may need to restart your docker container after the initial setup. This is a bug that will be worked on.
π§ Configurable Environment Variables
Variable | Description | Default / Example |
---|---|---|
SECRET_KEY |
Flask secret key for sessions | auto-generated |
SECURITY_PASSWORD_SALT |
Password hashing salt | auto-generated |
TIMEZONE |
Sets the app's timezone | America/Chicago |
WORKERS |
Number of Gunicorn worker processes | 6 |
π Authentication & User Management (COMING SOON)
First Time Setup
When you first run MyBibliotheca, you'll be prompted to complete a one-time setup:
- Access the application at
http://localhost:5054
(or your configured port) - Complete the setup form to create your administrator account:
- Choose an admin username
- Provide an admin email address
- Set a secure password (must meet security requirements)
- Start using MyBibliotheca - you'll be automatically logged in after setup
β Secure by Design: No default credentials - you control your admin account from the start!
Password Security
- Strong password requirements: All passwords must meet security criteria.
- Automatic password changes: New users are prompted to change their password on first login.
- Secure password storage: All passwords are hashed using industry-standard methods.
Migration from V1.x
Existing single-user installations are automatically migrated to multi-user:
- Automatic database backup created before migration
- All existing books are assigned to an admin user (created via setup)
- No data is lost during migration
- V1.x functionality remains unchanged
- Setup required if no admin user exists after migration
π Install from Source (Manual Setup)
β Prerequisites
- Python 3.8+
pip
π§ Manual Installation
- Clone the repository
bash
git clone https://github.com/pickles4evaaaa/mybibliotheca.git
cd mybibliotheca
- Create a Python virtual environment
bash
python3 -m venv venv
source venv/bin/activate
- Install dependencies
bash
pip install -r requirements.txt
- Setup data directory (ensures parity with Docker environment)
On Linux/macOS:
bash
python3 setup_data_dir.py
On Windows: ```cmd REM Option 1: Use Python script (recommended) python setup_data_dir.py
REM Option 2: Use Windows batch script setup_data_dir.bat ```
This step creates the data
directory and database file with proper permissions for your platform.
- Run the app
On Linux/macOS:
bash
gunicorn -w NUMBER_OF_WORKERS -b 0.0.0.0:5054 run:app
On Windows: ```bash REM If gunicorn is installed globally gunicorn -w NUMBER_OF_WORKERS -b 0.0.0.0:5054 run:app
REM Or use Python module (more reliable on Windows) python -m gunicorn -w NUMBER_OF_WORKERS -b 0.0.0.0:5054 run:app ```
π‘ No need to manually set up the database β it is created automatically on first run.
βοΈ Configuration
- By default, uses SQLite (
books.db
) and a simple dev secret key. - For production, you can configure:
SECRET_KEY
DATABASE_URI
via environment variables or .env
.
ποΈ Project Structure
MyBibliotheca/
βββ app/
β βββ __init__.py # App factory and setup
β βββ admin.py # Admin routes and logic
β βββ auth.py # Authentication routes and logic
β βββ debug_utils.py # Debugging utilities
β βββ forms.py # WTForms definitions
β βββ models.py # SQLAlchemy/ORM models (legacy)
β βββ routes.py # Main application routes
β βββ utils.py # Utility functions
β βββ static/ # CSS, JS, images, icons
β βββ templates/ # Jinja2 HTML templates
β βββ add_book_new.html
β βββ base.html
β βββ ... (other pages)
β βββ admin/ # Admin templates
β βββ auth/ # Auth templates
β βββ community_stats/ # Community stats templates
βββ data/ # App data (e.g. Redis, SQLite)
βββ scripts/ # Migration and setup scripts
βββ tests/ # Automated tests
βββ requirements.txt # Python dependencies
βββ run.py # App entry point
βββ docker-compose.yml # Docker orchestration
βββ Dockerfile # Docker build file
βββ README.md # Project documentation
βββ USER_GUIDE.md # End-user documentation
- app/: Main application code, routes, logic, templates, and static files.
- data/: Database and runtime data (Redis, SQLite, etc.).
- scripts/: Utilities for migration, setup, and admin tasks.
- tests/: Automated test suite.
- static/: CSS, JS, images, and fonts for the UI.
- templates/: All HTML templates for rendering pages.
- README.md: Project overview and setup instructions.
- USER_GUIDE.md: End-user documentation and help.
π License
Licensed under the MIT License.
β€οΈ Contribute
MyBibliotheca is open source and contributions are welcome!
Pull requests, bug reports, and feature suggestions are appreciated.