Skip to content

πŸ“š 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.

Discord


✨ 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

πŸ” 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:

  1. Access the application at http://localhost:5054 (or your configured port)
  2. Complete the setup form to create your administrator account:
  3. Choose an admin username
  4. Provide an admin email address
  5. Set a secure password (must meet security requirements)
  6. 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

  1. Clone the repository

bash git clone https://github.com/pickles4evaaaa/mybibliotheca.git cd mybibliotheca

  1. Create a Python virtual environment

bash python3 -m venv venv source venv/bin/activate

  1. Install dependencies

bash pip install -r requirements.txt

  1. 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.

  1. 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.