This is a cleaned-up version of some code I had laying around.
It allows you to generate a Julklap (Secret Santa) among a group of friends.
- Run a Secret Santa among a group of people.
- Mutual exclusions between participants: exclude couples from offering each other gifts.
- A nice webapp to create the Julklap mapping.
- For now, only single-chain mappings are possible (p1->p2->...p_n->p1). This eliminates some possibilities, so you can't have too many exclusions.
- You need to input a sender e-mail address and password.
- You need to decide on a sender address.
- Generate an app password (look it up: quite easy for GMail).
- Create a venv:
python -m venv venv
andsourcee venv/bin/activate
- Install python requirements:
pip install -r requirements.txt
. export PYTHONPATH=src/main/python
- Launch the FastAPI back-end:
fastapi dev src/main/python/main.py
(in dev mode) - Launch the React front-end:
cd julklap-app
andyarn start
- Go to http://localhost:3000 and create your Julklap !
You will need a virtualenv where you will install the dev-requirements.txt
.
For UTs, you should first export PYTHONPATH=src/main/python
.
They are based on pytest, simply run pytest
.
No lint checking is implemented, but black
auto-formatter is used.
TODO.
- Allow other types of mapping than single-chain (see limitations): graph theory.
- Add mypy type testing.
- Put everything in Dockerfiles for easy foolproof launching.
- Improve the front-end.