https://github.com/mathiazom/rezervo
๐๐ฟโโ๏ธ Automatic booking of group classes
https://github.com/mathiazom/rezervo
3t automation fastapi fsc sit slack-bot workout
Last synced: 6 months ago
JSON representation
๐๐ฟโโ๏ธ Automatic booking of group classes
- Host: GitHub
- URL: https://github.com/mathiazom/rezervo
- Owner: mathiazom
- Created: 2021-08-20T14:45:31.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-25T22:04:56.000Z (8 months ago)
- Last Synced: 2025-04-15T03:55:14.203Z (6 months ago)
- Topics: 3t, automation, fastapi, fsc, sit, slack-bot, workout
- Language: Python
- Homepage:
- Size: 2.02 MB
- Stars: 4
- Watchers: 4
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐๐ฟโโ๏ธ rezervo
[](https://github.com/users/mathiazom/packages/container/package/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)
```shell
poetry install
```
3. In the [`rezervo`](rezervo) directory, define `db.env`, `fusionauth.env` and `config.json` based on [`db.env.template`](rezervo/db.env.template), [`fusionauth.env.template`](rezervo/fusionauth.env.template) and [`config.template.json`](rezervo/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`:
```shell
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`:
```shell
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:
```shell
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](https://docs.docker.com/get-docker/) and [docker compose](https://docs.docker.com/compose/) installed, run
```shell
docker compose -f docker/docker-compose.dev.yml up -d --build
```
3. Within the `rezervo` container, initialize FusionAuth
```shell
rezervo fusionauth init
```
4. Explore other available cli commands with
```shell
rezervo --help
```
#### ๐ฆน FusionAuth Admin SiteThe administration tool for FusionAuth is available at [`http://localhost:9011/admin`](http://localhost:9011/admin)
Login credentials for the admin user should be defined in `config.json` under `fusionauth.admin`
#### ๐งน Format and lint
```shell
poe fix
```#### ๐ Support new chain
Add your own chain by adding it to `ACTIVE_CHAINS` in [`rezervo/chains/active.py`](rezervo/chains/active.py).### ๐ Deployment
A template for a production deployment is given in [`docker-compose.template.yml`](docker/docker-compose.template.yml), which uses the most recent [`rezervo` Docker image](https://github.com/users/mathiazom/packages/container/package/rezervo).