A "To Do List" web-app created using Python-Django framework, and Redis as a primary database using Redis OM for Python.
-
List Data Model
- username: string type -> indexed
- list_name: string type
-
Task Data Model
- list_pk: string type -> indexed
- task_name: string type
- task_complete: Optional boolean type
- The web-app uses SQLite3, the default django database for storing User models. I chose to do this in order to utilize the built-in django modules for User Creation & Authentication.
- The primary database is Redis with data models implemented using Redis OM in Python.
- The To Do Lists created by the user are tagged to them via their username and can be retrieved, hence the username field is indexed.
- The Tasks are tagged to the list by retriving the list's primary key and storing it along with the task.
- The primary key of the list is stored into list_pk inside the Task data model, and that field is indexed.
- Upon searching for the user's lists, they are authenticated and all the user's list are retrieved as links.
- Accessing the Lists will lead to their individual tasks under them.
- The links for the lists are generated using their list's primary key. note - This caused errors inorder to access the other URLs, so I have unimplemented (commented out the URL in main/urls.py) it for now.
Python3, Docker
- Create a Redis-Stack Docker image. I developed the app by connecting to a local instance of a Redis Database, the link explains it better.
- Setup a virtual environment for the project using pipenv, and activate it.
- Clone the repository
- The necessary packages should be installed automatically using the information from the PipFile
- Run the server using
- python manage.py runserver - Windows
Here some resources to help you quickly get started using Redis Stack. If you still have questions, feel free to ask them in the Redis Discord or on Twitter.
- Sign up for a free Redis Cloud account using this link and use the Redis Stack database in the cloud.
- Based on the language/framework you want to use, you will find the following client libraries:
- Redis OM .NET (C#)
- Watch this getting started video
- Follow this getting started guide
- Redis OM Node (JS)
- Watch this getting started video
- Follow this getting started guide
- Redis OM Python
- Watch this getting started video
- Follow this getting started guide
- Redis OM Spring (Java)
- Watch this getting started video
- Follow this getting started guide
- Redis OM .NET (C#)
The above videos and guides should be enough to get you started in your desired language/framework. From there you can expand and develop your app. Use the resources below to help guide you further:
- Developer Hub - The main developer page for Redis, where you can find information on building using Redis with sample projects, guides, and tutorials.
- Redis Stack getting started page - Lists all the Redis Stack features. From there you can find relevant docs and tutorials for all the capabilities of Redis Stack.
- Redis Rediscover - Provides use-cases for Redis as well as real-world examples and educational material
- RedisInsight - Desktop GUI tool - Use this to connect to Redis to visually see the data. It also has a CLI inside it that lets you send Redis CLI commands. It also has a profiler so you can see commands that are run on your Redis instance in real-time
- Youtube Videos
- Official Redis Youtube channel
- Redis Stack videos - Help you get started modeling data, using Redis OM, and exploring Redis Stack
- Redis Stack Real-Time Stock App from Ahmad Bazzi
- Build a Fullstack Next.js app with Fireship.io
- Microservices with Redis Course by Scalable Scripts on freeCodeCamp