/EvilFlowersCatalog

Simple books catalog compatible with OPDS 1.2 written in Python

Primary LanguagePythonMIT LicenseMIT

Evil Flowers Catalog

A publication catalog server compatible with OPDS 1.2, written in Python with a straightforward management REST API for CRUD operations.

Run in Insomnia}

Work in progress

Although this project is already in use in a production environment, work is still in progress, and the API remains unstable. If you wish to deploy the project, please feel free to open a discussion or send us an email. We are actively working on new features and documenting existing ones, but it takes time.

Features

The main goal is to implement the complete OPDS 1.2 and later OPDS 2.0 specifications. The ordered list below represents the current progress:

The implementation is based on these RFCs:

Installation

Docker

A pre-built Docker image is available on the GitHub Container registry as evilflowerscatalog.

The repository contains a working example of a docker-compose.yml file configured for a development environment. You can use a similar configuration for production usage. The application image will be built from the source.

Setup steps (container name may differ):

  1. Initialize containers docker-compose up
  2. Import languages, currencies, and set up CRON jobs docker exec -it evilflowerscatalog-django-1 python3 manage.py setup
  3. Create a superuser docker exec -it evilflowerscatalog-django-1 python3 manage.py createsuperuser

The server will start on port 8000.

From source

We use poetry for dependency management and PostgreSQL 15 (12+ should be compatible) as a data storage (acquisition files are stored on the filesystem, not in the database). To set up an instance with a demo database, follow these simple steps:

  1. Create a Python virtual environment (python -m venv venv)
  2. Enter the environment (source venv/bin/activate)
  3. Install dependencies poetry install
  4. Create a JWK (if you are unsure how, check this mkjwk generator) and keep it private
  5. Create an .env file according to .env.example
  6. Execute migrations python manage.py migrate
  7. Import currencies, languages, and set up CRON jobs using python manage.py setup
  8. Create a superuser using python manage.py createsuperuser

Documentation

A portion of the API is described using OpenAPI, with the documentation available here: REST API. The complete REST API description is included in the Insomnia collection, accessible here. Additional features are detailed on the GitHub Wiki.

Acknowledgment

This open-source project is maintained by students and PhD candidates of the Faculty of Informatics and Information Technologies at the Slovak University of Technology. The software is utilized by the university, aligning with its educational and research activities. We appreciate the faculty's support of our work and their contribution to the open-source community.