Heres a basic to do list to keep you accountable of your tasks. Simply register your own user, create a task with a title, due date and description. Each task can have comments made.
When your task is overdue, you will see an "Overdue" message displayed, along with an increment of the overdue task counter in the UI. Once completed, move the task to Done. Otherwise, Delete the task to be lost forever.
Please make sure to remove the test user in web/db.py if you are going to expose this to the Internet.
- Basic Authentication
- Written in Flask
- Feature rich To Do list
- Easy ability to self host via cli or Docker
- Application wide logging
- SMTP support
- Clean and simple UI
- SQLite database support (more options coming)
- Make sure you have sqlite3 installed locally
Initialise the database and virtual environment.
virtualenv venv
source venv/bin/active
venv/bin/pip install -r requirements.txt
make env db Please change any values needed in .env
Run with the Makefile
make runYou can run with debug mode enabled with the Makefile
make debugRun with the Makefile
make build make docker-devPlease change any values needed in .env and docker-compose/docker-compose-dev.yaml
make dockerPlease change any values needed in .env and docker-compose/docker-compose.yaml
Run Pytest against the code, including test coverage
make test sastInspecting the database can be done using the Makefile also
make db-viewOrder depends on what I feel like working on when I have the free time 😃
CI/CD pipeline to build image and push to DockerhubAdd pytest coverage (#TODO check out https://github.com/pytest-dev/pytest-cov)Introduction of testing using pytests, (#TODO check out https://flask.palletsprojects.com/en/2.2.x/tutorial/tests/)SMTP integration for notifications (task creation/overdue/comments left)- Proper logging instead of just printing values everywhereRedesigned frontend using Bootstrap- Add edit & delete for comments~~ - Updated UI ~~- Deploying this in AWS- Add advanced pytests ⌛
- Refactoring ⌛
Refactor create/update to use functions to check due_date
Input validation, text length limits for title, description, comments- Add settings page, configure timezones, store tasks in local timezones
Add get_task before anything that uses the existing task to check it existsFile uploads for each task- Add caching for performance
Switch to flask-sqlalchemy to support more db engines https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-iv-database- Introduce background tasks with celery (for emails etc) to reduce waiting times
- https://flask.palletsprojects.com/en/2.3.x/patterns/celery/
I have used a thread instead of celery
- https://flask.palletsprojects.com/en/2.3.x/patterns/celery/
- Improve security
- Flask-talisman
- Flask-paranoid
Password ResetPassword complexityAccount verification(using Twilio Verify)
Live app link: On render
These are some of the suggested contributions to TaskMate:
- Refactor code to use the concept of separation of concerns (each functionality resides as a stand-alond module)
- Config module
- DB Schema
- Application instance
- Forms (using bootstrap to quicky generate and style them)
- Migrations (all changes to db schema available for review)
- Modify the design of the database to support any engine
- The default is SQLite (it is small, quick to setup, does not require a server)
- If another is needed, then you can pass that as an environment variable in
.env
- Application instance:
- Refactored the factory function
create_app()to not only initialize the extention variables but also to log errors (1. On file and 2. Send log data to admin via email)
- Refactored the factory function
- To ensure the emailing feature works all the time, locally and on a prod app, I have used Twilio Sendgrid (You will have to create your own accounts with Twilio and Sengrid. It is free.)
- All static resources are put in individual files as seen in the static folder
- Base template modified to truly make it a base that child templates find reusable elements only.
| Login page | Login page with password validation |
|---|---|
![]() |
![]() |
- With links to register page, request password reset page and reset password page
| Home page (without task) | Home page with task |
|---|---|
![]() |
![]() |
| Create tasks (home page) | Create tasks (standalone page) |
|---|---|
![]() |
![]() |
| View task | Edit task |
|---|---|
![]() |
![]() |
| Add comment to task | View task with comment |
|---|---|
![]() |
![]() |
| Register page | Verify Email Address | Email Token | Thank you note |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
With the threaded email functionality in place, email reminders can be sent to a user to remind them of overdue tasks. The best approach to this would be to use cronjobs, a built-in utility in Linux. What will happen when this feature is completed is that at set intervals, say daily, an email reminder will be sent to each user in the database reminding them of ALL their overdue tasks.
To make it possible, I have added the following:
- Email template (see
overdue_task_email_notificationin email module) - Task reminder (see
send_overdue_task_reminderin task reminder module) - Custom CLI commands (see
registerin CLI module) - Register the custom CLI commands in main module
- To implement cronjobs in Flask, check out this tutorial.
Unfortunately, the live app on render does not have the cronjob utility feature setup (it is a paid service which is not necessary in the scope of this application).
-
Clone this repo:
$ git clone git@github.com:GitauHarrison/taskmate.git
-
Change folder to the cloned directory:
$ cd taskmate
-
Activate virtual environment:
# Default way $ python3 -m venv venv $ source venv/bin/activate # Using virtualenvwrapper $ mkvirtualenv venv
-
Install dependances needed:
(venv)$ pip3 install -r requirements.txt
-
Add needed environment variables:
(venv) cp .env-template .env # Add values to the .env file
-
Start flask server:
(venv)$ flask run
-
Copy and paste localhost link in your favourite browser



















