Sign inSign up

jzakotnik/openlibry

By jzakotnik

Updated about 7 hours ago

Images for OpenLibry library app, see openlibry.de

Image
Content management system
1

10K+

jzakotnik/openlibry repository overview

OpenLibry

Simple, fast library management for schools and small libraries. Track books, users, loans/returns, and get quick stats — optimized for busy checkout desks with barcode scanners.

Features

  • Works on desktop, tablet, and phone
  • Type-ahead search across books, loans, and users; quick filter for overdue books per class
  • Minimal clicks for borrow/return; extend loans in one tap
  • Supports book cover images
  • Modern Next.js UI with a simple database (SQLite by default)
  • Import from legacy OpenBiblio installs
  • REST API for books and users (GET/PUT/POST/DELETE) and endpoints to link users ↔ books for loans.

Quick Start

docker run -d \
  --name openlibry \
  -p 3000:3000 \
  -v $(pwd)/database:/app/database \
  -v $(pwd)/prisma/migrations:/app/prisma/migrations:ro \
  -v $(pwd)/coverimages:/app/public/coverimages \
  -e NODE_ENV=production \
  -e DATABASE_URL=file:/app/database/dev.db \
  -e AUTH_SECRET=changeme \
  -e COVERIMAGE_FILESTORAGE_PATH=/app/public/coverimages \
  --restart unless-stopped \
  jzakotnik/openlibry:release

Then open: http://localhost:3000 (Port is configurable; 3000 is the default.)

First user setup
  1. Temporarily disable auth in your env (see Configuration below) to allow self-registration.
  2. Visit /auth/register and create the first user.
  3. Re-enable auth.

docker-compose

For a persistent setup that restarts on boot/crash, clone the repo, customize assets/env (see below), and:

docker compose up -d

The provided docker-compose.yml defines volumes for persistent user data. Stop with docker stop openlibry.


Configuration

Copy .env_example to .env and adjust values. Common settings:

  • AUTH — enable/disable authentication (useful for first-user bootstrap)
  • AUTH_SECRET — JWT/session secret (required)
  • DATABASE_URL — default SQLite path in /app/database/dev.db

Place your school logos and the dunning letter template (mahnung-template.docx) in the app’s public/ folder so they show up in the UI/prints. For Docker, you can bind-mount public/ if you want to manage these files outside the container.

Recommended volumes

  • /app/database – SQLite data (required for persistence)
  • /app/public – optional: custom logos/templates and generated assets (bind-mount if you customize)

API

OpenLibry exposes a simple REST API for book and user. Example: POST /api/book/{bookId}/user/{userId} creates a loan (links a book to a user). See the repo’s doc/ folder for more examples.


Barcode-friendly UX

The checkout screen is optimized for USB barcode scanners: focus jumps between user and book search fields, Enter/Esc workflows are streamlined, and renewals are one click.


Image

jzakotnik/openlibry:latest (Linux x86_64). Build instructions and a Dockerfile are included in the repo for custom images.


Troubleshooting

  • Permissions on database volume: If the DB file can’t be created in ./database, check ownership. You can read the container’s user id and chown your host folder accordingly. ([GitHub][1])
  • Cleaning up Docker space: Use docker builder prune (build cache) and docker image prune -a (images) if disk fills up.

License

MIT. Contributions welcome!

Tag summary

Content type

Image

Digest

sha256:2f4fe9f72

Size

478 MB

Last updated

about 7 hours ago

docker pull jzakotnik/openlibry