Skip to content

A fully functional todolist with a beautiful UI and vulnerable flask backend.

License

Notifications You must be signed in to change notification settings

trevor-trinh/tempus.

Repository files navigation

tempus.

tempus is a fully functional todolist with a beautiful UI and a vulnerable flask backend.

A great learning opportunity, I was inspired by friends to make this and learned plenty of new skills and solidified existing ones along the way.

This was created as a challenge in cybersecurity Capture the Flag (CTF) competitions. Initially created for GHCHS's Cybersecurity Club CTF, trevzCTF.

tempus uses python's flask as the backend, rendering pages using Jinja2. It can be deployed safely using Docker.

Python Flask-SocketIO on the backend communicates with the frontend javascript socket.io on every new todo item. It stores the rendered data into the browser's local storage for future viewing. It also stores viewing done items preference, list of all todos and dones, and color preference.

Note: You can remove parts of script.js, that fetch to the backend, to have a secure standalone todolist. In that case, run the todolist with gunicorn using the same command in the Dockerfile but standalone.

Screenshots

Salmon background showing finished tasks Black background minimal

Installation

  1. Clone and move into this repository:
git clone https://github.com/trevor-trinh/tempus..git
cd tempus.

(OPTIONAL) Use python venv to make a virtual environment:

python3 -m venv env
source env/bin/activate
  1. Install the Python requirements with pip:
pip install -r requirements.txt
  1. To test run the app (if you're not using python venv, do not include the source and deactivate commands):
source "env/bin/activate"
export FLASK_APP=app.py
export FLASK_ENV=development
flask run -p 8015 -h "0.0.0.0"
deactivate
  1. To run in production with Docker:
docker pull trevortrinh/trevzctf
# Edit build.sh with your docker image tag like: your-name/tempus.
./build.sh
./start.sh

Contributing

While I don't really know how to use github and accept changes just yet, pull requests are welcome!