https://github.com/rafalkornel/santa2020
Small application that allows to draw person for christmas gifting.
https://github.com/rafalkornel/santa2020
christmas flask javascript python
Last synced: 2 months ago
JSON representation
Small application that allows to draw person for christmas gifting.
- Host: GitHub
- URL: https://github.com/rafalkornel/santa2020
- Owner: RafalKornel
- Created: 2020-11-20T00:43:58.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-11-30T18:35:10.000Z (7 months ago)
- Last Synced: 2025-12-03T02:53:21.548Z (7 months ago)
- Topics: christmas, flask, javascript, python
- Language: Python
- Homepage: https://santa2020.herokuapp.com/
- Size: 1.04 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Santa2020
This application allows you to create group, and then let each member draw other member. Why? For christmas
gifting. Hence the name.
You can try it here: [santa2020](https://santa2020.herokuapp.com/) (it's hosted on heroku so first visit might take a while to load).
It's very minimalistic, there are 3 screens.
When you enter the applictaion, you see screen responsible for creating group.
There, you specify usernames, and optionally provide keys (increasing security).

After that, you are redirected to the overview screen, where you see all member,
and they keys (if you enabled secure mode). You will also get there a link, that you
should send to group members.

Upon this link you will see prompt, asking your name
(and optionally your key), after providing those you will be able to click "draw" button,
and see who you drafted.

### Installing
If you are using linux (bash), you can clone repository, and
```
./create_env.sh
```
or
```
bash create_env.sh
```
This will create python virtual environment, and install dependencies from *requirements.txt* file.
You can do this manually, by creating environment in *app/venv* folder:
```
python3 -m venv app/venv
```
then activating venv:
```
source app/venv/bin/activate
```
then installing pip modules:
```
pip install -r requirements.txt
```
Now you are ready to launch app:
```
export FLASK_APP=santa.py
flask run
```
### Docker
To run application in docker, just use
```
docker compose up
```
Everything should work out of the box.
### Database
To initalize database run following scripts:
``` terminal
python manage.py db init
python manage.py db migrate
python manage.py db upgrade
```
In docker:
``` terminal
docker exec -it python_app_web python manage.py db init
docker exec -it python_app_web python manage.py db migrate
docker exec -it python_app_web python manage.py db upgrade
```
### Tech stack
In process of development of this app (which was very short btw), I used following technologies:
- python3 with Flask
- SQLAlchemy with PostgreSQL (and Sqlite3 in development)
- HTML (jinja2 was used to handle SSR)
- CSS (with Bootstrap)
- Javascript (vanilla)
### Got any ideas? Submit new issue.