monolith
├── app.py
├── auth.py
├── background.py
├── database.py
├── forms.py
├── lottery.py
├── __init__.py
├── badwords.txt
├── classes
│ └── __init__.py
├── templates
│ ├── add_to_blacklist.html
│ ├── blacklist.html
│ ├── calendar.html
│ ├── create_user.html
│ ├── index.html
│ ├── login.html
│ ├── lottery.html
│ ├── menu_notAuth.html
│ ├── menu.html
│ ├── message.html
│ ├── msgs_draft.html
│ ├── msgs_rcv.html
│ ├── msgs_sent.html
│ ├── recipients.html
│ ├── report_user.html
│ ├── report.html
│ ├── send_message.html
│ ├── user_info.html
│ └── users.html
├── tests
│ ├── __init__.py
│ ├── test_base.py
│ ├── test_blacklist.py
│ ├── test_calendar.py
│ ├── test_celery.py
│ ├── test_draft.py
│ ├── test_mailbox.py
│ ├── test_messages.py
│ └── test_user.py
└── views
├── __init__.py
├── auth.py
├── calendar.py
├── home.py
├── mailbox.py
├── messages.py
└── users.py
To setup the environment you have to follow these steps:
- Open the project in your IDE.
- From IDE terminal, or normal Ubuntu/MacOS terminal execute the command
virtualenv venv
inside project root. - Now, you have to activate it, by executing the command
source venv/bin/activate
(you have to execute it every time you open a new terminal). - You have to install all requirements, let's do that with
pip install -r requirements.txt
.
To run the application, execute the following commands:
- Run Redis on Docker in detach mode:
docker run -d -p 6379:6379 redis
. - Run the app:
./run.sh
or set the following environment variables:
FLASK_APP=monolith
FLASK_ENV=development
FLASK_DEBUG=true
PYTHONPATH=$PWD
To run tests in isolated environemnts it has been used Tox using tox
command from the root project folder.