Skip to content

Latest commit

Β 

History

History
93 lines (76 loc) Β· 3.71 KB

README.md

File metadata and controls

93 lines (76 loc) Β· 3.71 KB

πŸ‹πŸΏβ€β™‚οΈ rezervo

rezervo

Automatic booking of group classes

🧩 Chains

βš™οΈ Providers

πŸ§‘β€πŸ’» Development

🐍 Setup Python environment

  1. Ensure Python 3.10+ is installed

  2. Install dependencies using Poetry (install from https://python-poetry.org/docs/#installation)

    poetry install
  3. In the rezervo directory, define db.env, fusionauth.env and config.json based on db.env.template, fusionauth.env.template and config.template.json. This includes defining FusionAuth configuration, credentials for Slack notifications and app-wide booking preferences.

    πŸ“³ Web Push variables
    Web Push variables

    Web push requires a VAPID key pair. This can be generated with the following command using openssl:

    openssl ecparam -name prime256v1 -genkey -noout -out vapid_keypair.pem

    The private key can then be encoded as base64 and added to the config.json file as notifications.web_push.private_key:

    openssl ec -in ./vapid_keypair.pem -outform DER|tail -c +8|head -c 32|base64|tr -d '=' |tr '/+' '_-' >> vapid_private.txt

    Similarly, the public key can be encoded as base64 and included in the client application receiving the notifications:

    openssl ec -in ./vapid_keypair.pem -pubout -outform DER|tail -c 65|base64|tr -d '=' |tr '/+' '_-'|tr -d '\n' >> vapid_public.txt

πŸ‹ Run with Docker

  1. Make sure you have defined db.env, fusionauth.env and config.json as described above
  2. With docker and docker compose installed, run
    docker compose -f docker/docker-compose.dev.yml up -d --build
  3. Within the rezervo container, initialize FusionAuth
    rezervo fusionauth init
  4. Explore other available cli commands with
    rezervo --help

🦹 FusionAuth Admin Site

The administration tool for FusionAuth is available at http://localhost:9011/admin

Login credentials for the admin user should be defined in config.json under fusionauth.admin

🧹 Format and lint

poe fix

πŸ”Œ Support new chain

Add your own chain by adding it to ACTIVE_CHAINS in rezervo/chains/active.py.

πŸš€ Deployment

A template for a production deployment is given in docker-compose.template.yml, which uses the most recent rezervo Docker image.