Building a Smart To-Do List Manager with Python, MongoDB & Kivy (Part 1: Project Overview and Setup)


Introduction
One of the best ways to prove your skills is by actually building something cool, right? Until recently, most of the projects in my portfolio were from work or school. But as I am navigating my career, I’ve come to realise how important it is to have your own personal projects.
So, I decided to tackle my very first self-driven project to sharpen my Python skills. I have decided to revisit an old college project called “EpiToDo”. The project was initially made to learn Express and Node.js, but honestly, it felt like biting off more than I could chew—plus, I was working solo instead of with a team. Fast forward to now, I thought it would be a pretty cool achievement to finally build this project but in Python and adding a database, this time around.
Project Overview
And that’s how My Smart To-Do List Manager was born! 🎉 It’s the perfect starter project to get hands-on with MongoDB and Python, or as a fun warm-up if you're looking to brush up on your skills.
The project’s functioning is pretty straightforward: it is a desktop app designed to help users keep track of tasks efficiently. Here are its features:
User Authentication: Sign up and log in with a username and password.
Create Tasks: Add new tasks with a title, description, due date, priority, and category.
View Tasks: See all tasks at a glance, categorized by status (All, Pending, Completed).
Edit Tasks: Modify task details and due dates.
Delete Tasks: Remove tasks once they're completed or no longer relevant.
Task Filtering: Filter tasks by category, status, priority, or due date.
Mark as Complete: Mark tasks as done and move them to the completed section.
Responsive Design: The app is designed for ease of use on both mobile and desktop devices.
For this project, I’ll be using Python for the core logic, MongoDB for data storage, and Kivy for building the user interface. It is a great way to learn some Python tricks, work with MongoDB, and get hands-on with Kivy for UI development.
Let’s have a look at the application’s flow.
User Authentication
The app begins by prompting users to either sign up or log in. For new users, the Sign-Up page lets them create an account by entering a username, a mail and password. For returning users, they can simply log in with their existing credentials. The system securely stores these credentials in MongoDB.Dashboard Overview
After logging in, the user is directed to the dashboard, which presents a clean and organised view of all their tasks. Tasks are categorised into sections such as All, Pending, and Completed for easy management. This gives users a snapshot of their productivity.Task Creation
Users can create a new task by clicking the Add Task button. This opens a form where they can input:Task Title
Description
Due Date
Priority (Low, Medium, High)
Category (Work, Personal, etc.)
All of these fields are required for an easy management. Once the form is submitted, the task is saved in MongoDB and immediately displayed on the dashboard.
Viewing and Filtering Tasks
On the dashboard, users can view all their tasks. They can switch between different filters to organise their tasks based on:Status (Pending, Completed)
Priority (High, Medium, Low)
Due Date
They can also use the search feature to look for tasks based on keywords in their titles or descriptions. This helps users quickly find specific tasks they need to focus on or review.
Editing Tasks
If a task needs to be updated, users can click on it to bring up an edit form. They can change any aspect of the task—whether it's the due date, description, or even priority. The updated task is then saved back to MongoDB and reflected in the dashboard.Marking Tasks as Completed
Once a task is done, users can mark it as complete. This moves the task from the Pending section to the Completed section, giving users a sense of accomplishment and a clearer view of what’s left to do.Deleting Tasks
If a task is no longer relevant, users can simply delete it. The task will be removed from MongoDB, and the dashboard will update to reflect the change.
For the sake of understanding, this article is actually part of a series to help you build this application and every step will be broken down little by little.
Today, we will set up our environment and connect to MongoDB to create our project’s database.
Setting Up the Development Environment
Before diving into the code, let’s get everything set up.
Step 1: Installing Python
First, you have to make sure you have Python installed in your system. If you don’t, head to the Python Official website to get the right executable file for your system. This is more useful if you’re running on Windows or MacOS. If you have a Linux based system, there are most straightforward and simple ways to install Python.
For Windows and MacOS users:
The website will automatically detect your operating system and recommend the latest version for macOS or Windows. Download the right executable.
Step a: Run the Installer
For MacOS:
Locate the downloaded
.pkg
file in yourDownloads
folder.Double-click the file to open the installer.
Follow the on-screen instructions to install Python.
- The installer will guide you through the installation process. Just keep clicking Continue and accept the terms.
Once the installation is complete, open Terminal and type:
python3 --version
This should return the installed Python version (e.g.,
Python 3.x.x
).
For Windows:
Locate the downloaded
.exe
file in yourDownloads
folder.Double-click the file to open the installer.
Important: Before clicking "Install Now," check the box that says "Add Python to PATH" at the bottom of the installer window.
- This ensures that Python can be run from the command line.
Click Install Now and let the installation complete.
Once done, open Command Prompt (search for
cmd
in the start menu) and type:python --version
This should return the installed Python version (e.g.,
Python 3.x.x
).
Step b: Verify pip Installation
Pip is Python’s package manager, and it’s usually bundled with Python installations.
For macOS:
Open Terminal and type:
pip3 --version
If pip is installed, you’ll see the version number. If not, you can install pip by running:
python3 -m ensurepip --upgrade
For Windows:
Open Command Prompt and type:
pip --version
If pip isn’t installed, run the following command to install it:
python -m ensurepip --upgrade
Step c: Set Up a Virtual Environment (Optional but Recommended)
A virtual environment is useful for isolating project dependencies.
For both macOS and Windows:
Create a virtual environment by running the following command in your Terminal (macOS) or Command Prompt (Windows):
python -m venv env
This will create a folder named
env
with your virtual environment setup.Activate the virtual environment:
On macOS:
source env/bin/activate
On Windows:
.\env\Scripts\activate
When activated, the command prompt or terminal will show the virtual environment name in parentheses.
To deactivate the environment, simply run:
deactivate
Step d: Installing Python Packages
Once Python and pip are set up, you can install packages using pip. For example, to install the bcrypt
library, which we will use to secure our users credentials, run:
pip install bcrypt
This will download and install the package.
For Linux (Ubuntu/Debian) and Linux (Fedora/CentOS) users:
Step a: Update Package List
Open Terminal and update your package list by running:
sudo apt update
for Ubuntu/Debiansudo dnf update
for Fedora/CentOS
Step b: Install Python
Install Python by running:
sudo apt install python3
for Ubuntu/Debiansudo dnf install python3
for Fedora/CentOS
After installation, check the Python version with python3 --version
Step c: Install pip
Install pip
(Python’s package manager) and check the version by running those commands one after the other:
sudo apt install python3-pip
pip3 --version
Step2: Setting up MongoDB
I have written an article here that can guide you through this step.
Step3: Installing Kivy
Here, all you have to do is to run this code:
pip install kivy
Step4: Set Up The Project Structure
In your IDE or code editor (I use Visual Studio Code), create and open a folder for the project and create a basic architecture like so:
my_todo_app/
├── main.py
├── mongo.py
├── commands.py
└── views/
We will add files as we go. Don’t worry, you can change this structure as you like.
Step5: Database Creation
Now that everything is set up, let’s create our MongoDB database for the project.
Open the mongo.py file and type this code:
from pymongo import MongoClient
import certifi
def get_database():
# Provide the mongodb atlas url to connect python to mongodb using pymongo
CONNECTION_STRING = "your_connexion_string"
# Create a connection using MongoClient. You can import MongoClient or use pymongo.MongoClient
client = MongoClient(CONNECTION_STRING,tlsCAFile=certifi.where())
# Create the database for our example (we will use the same database throughout the tutorial
return client['users_to_do_lists']
With this code, we have created our database for the project: users_to_do_lists.
PS: your_connexion_string
should be replaced by your actual connexion string, the one that was provided to you by mongoDB. Normally, if you followed the instructions given in this article, you should have your connexion string, username and password saved in a secure file or environment variables.
In case you somehow “lost“ your MongoDB Atlas connexion string, follow these steps to find it:
Log in to your MongoDB Atlas account.
Go to your project and click on the Clusters tab.
Click on the Connect button for the cluster you want to connect to.
In the connection window, select Connect your application.
Choose the driver and version (e.g., Python and version).
Copy the provided connection string. This is where you'll find the complete string with placeholders for the database username, password, and cluster info.
Now, we can run our code and check if the database has been successfully created:
import mongo
if __name__ == "__main__":
# Get the database
dbname = mongo.get_database()
Heading to our MongoDB Atlas Interface, we can see our database here:
Great! That’s all for the setup!
In the next article, we will go over:
User authentication
Kivy app set up. In the meantime, you could check out this video by Python Simplified, it really has helped me grasp the foundations of Kivy.
Thank you for taking the time to read this article and for embarking in that journey with me. See you in the next article!
Subscribe to my newsletter
Read articles from Mahugnon DOUSSO directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Mahugnon DOUSSO
Mahugnon DOUSSO
I’m Prunella DOUSSO, an IT student with a passion for data science and software engineering. This blog is my space to share insights, experiences, and opinions, making tech discoveries fun and accessible to everyone, no matter your skill level.