Skip to content

JaqiKal/task-master

Repository files navigation

Introduction

Task Master is a user-friendly to-do list app designed for casual users, students, and professionals to efficiently manage tasks, priorities, and deadlines. It features Google Sheets integration, intuitive task prioritization, a clean interface, and real-time collaboration, making task management straightforward and customizable.

This app solves the problem of managing daily responsibilities in a busy world by providing a digital platform for users to note tasks, assign priority levels, set deadlines, and track progress. It helps users focus on important tasks, manage time effectively, and improve productivity by offering a reliable and organized system for task management. Task Master is accessible to anyone seeking to enhance their daily and long-term productivity, acting as a digital assistant to navigate tasks with ease and clarity.

x

Visit the deployed application at Heroku

CONTENT

Introduction

Objectives

Developer's goal

  1. Create a Simple and Intuitive Interface

    • Ensure the application is accessible to users of all skill levels, with clear instructions and feedback.
  2. Implement Core Functionalities

    • Develop the application with functionalities such as adding tasks, prioritizing them, setting due dates, listing tasks, and marking them as done.
  3. Ensure Data Persistence

    • Incorporate Google Sheets for storing and retrieving tasks, providing users with the ability to maintain their task list across sessions and devices.
  4. Focus on User Experience

    • Design the application to handle user inputs gracefully, including validating inputs and providing helpful error messages to guide users.
  5. Learn and Apply New Skills

    • Use the project as an opportunity to learn more about Python programming, Google Sheets API, and other relevant technologies or programming concepts.

User's goal

The user's primary goal in using this to-do list application is to have a reliable and convenient tool that helps them manage their daily tasks, improve their productivity, and reduce the stress associated with forgetting tasks or missing deadlines.

  1. Stay Organized

    • Keep track of all their tasks in one place, ensuring that nothing important is overlooked.
  2. Prioritize Tasks

    • Easily identify and focus on high-priority tasks, optimizing their time and efforts on what matters most.
  3. Track Progress

    • Mark tasks as completed, providing a sense of accomplishment and a clear view of what has been achieved versus what remains to be done.
  4. Enjoy a Hassle-Free Experience

    • Interact with an application that is easy to use, free from technical glitches, and provides helpful feedback as needed.

Back to Content


User Experience

The Strategy

Dive into productivity with Task Master, a to-do list application crafted to streamline task management effortlessly. Designed with a focus on simplicity and efficiency, Task Master aims to help users organize their daily tasks, prioritize what's important, and track their progress towards completion. By integrating seamlessly with Google Sheets, it ensures that your tasks are always accessible and up-to-date, fostering an environment where productivity thrives.

The Scope

Task Master is more than just a to-do list; it's a comprehensive task management solution that caters to the needs of various users, from students and professionals to anyone looking to enhance their organizational skills. The application offers a full suite of features, including the ability to add tasks, set priorities and due dates, update task statuses, and delete tasks no longer needed. With a single-guess approach for task management actions, users are encouraged to think strategically about their task priorities, making it an essential tool for anyone looking to optimize their daily routine.

The Structure

At its core, Task Master boasts a structured yet intuitive design that guides users through task management with ease. The application operates on a straightforward, menu-driven interface, allowing for quick navigation between adding, viewing, updating, and deleting tasks. Each task is uniquely identified, ensuring that users can easily manage their tasks without confusion. This structured approach ensures that users can focus more on accomplishing their tasks and less on how to manage them.

The Skeleton

For the thorough planning and organization of Task Master's components and functionalities, the tool 'draw.io' was employed to create a detailed visual diagram. This served as a foundational blueprint throughout the development process, guiding the creation of a user-friendly interface that is functional. By visually mapping out the application's design and flow, I ensured that Task Master meets user expectations in terms of usability and performance.

Back to Content

User stories

First Time Visitor Goals

User story 1: Understand Purpose
  • As a first-time visitor, I want to easily understand the purpose of the task organizer app so that I can decide if it meets my needs.

    • Achieved by: Providing a clear and concise description welcome message on the app's landing page.
User story 2: Intuitive UI
  • As a first-time visitor, I want a straightforward and intuitive user interface so that I can quickly navigate the app and perform basic tasks.

    • Achieved by: Having implemented a well-organized menu with clear labels and simple instructions for adding, updating, deleting, and viewing tasks.

Returning Visitor Goals

User story 2: As a returning visitor
  • As a returning visitor I want to quickly access and review the details of a specific task that you've previously added to the organizer.

    • Achieved by: Navigate to the "View Task" option on the main menu and enter the Task ID you want you review. The app will retrieve and display all the details of the specified task, including its description, priority, due date, status, and creation date.

Frequent Visitor Goals

User story 3: Efficient updating
  • As a frequent visitor, I want to be able to update existing tasks quickly and efficiently without having to re-enter all the details.

    • Achieved by: A streamlined "Update Task" functionality, allowing users to selectively modify task details while receiving confirmation upon successful updates.

Back to Content

---

Design

In the Task Master application, I've employed the Colorama library to infuse a touch of colour into the terminal interface, enhancing both the visual appeal and the user experience by differentiating various types of information.

Color Usage in Application

By thoughtfully integrating these colors into the terminal-based Task Master application, I aim to create a more engaging and intuitive user experience, despite the inherent design limitations of terminal interfaces.

x

Magenta

This vibrant hue welcomes users right from the start, used prominently for the application's ASCII art logo and the welcome message. It's designed to grab attention and set a positive, inviting tone for user interaction.

Blue

I've chosen a calming shade of blue to highlight all user input prompts and messages. This colour choice helps to distinguish input fields from the rest of the text, guiding users through their task management journey with clarity.

Green

Signifying success, green is used to confirm successful actions within the application, such as the addition of a new task or successful updates to existing tasks. It offers instant, positive feedback that reassures users their actions have been completed.

Yellow

This colour is reserved for warnings or important notices that require the user's attention. The yellow text might indicate a reminder or a caution before performing actions like task deletion, ensuring users proceed with full awareness of the implications.

Red

Employed for error messages or alerts, red is utilized to immediately draw the user's attention to issues or errors, such as invalid inputs or failed operations. This stark contrast against the other colours ensures that errors are not overlooked and can be addressed promptly.

White

White, is crucial for general text and information, providing a clear, readable contrast against other colours. It serves as the foundation for the application's visual design, balancing vibrant colours and maintaining readability and a clean aesthetic.

Back to Content

Accessibility

As of the current version, the Task Master application has not been comprehensively evaluated for accessibility features, including screen reader compatibility, colour contrast, and keyboard navigation, which are crucial for users with disabilities. I recognize the importance of making the application accessible to all users and I am committed to improving these aspects in future updates.

Back to Content

Am I Responsive

A Command Line Interface app isn't inherently aimed at responsiveness in the context of varying screen sizes and interactive web design because it is primarily designed for interaction through a terminal or command prompt, not a graphical user interface or web browsers. The teaser image from "Am I Responsive" highlights this contrast by showing the app's interface in various device frames, illustrating that a CLI app's user experience and layout do not adapt like a web application designed with responsive web design principles.

x

Back to Content


Existing features

These features are designed to make the to-do list application a comprehensive tool for managing tasks efficiently, catering to the needs of a wide range of users looking for a simple yet effective way to organize their daily responsibilities. The to-do list application comes packed with several user-friendly features designed to enhance task management and productivity. Here's an overview of its key features:

Centralized Task Management

Effortlessly add, edit, and organize tasks in a centralized Google Worksheet, ensuring your to-do list is always up-to-date and accessible.

x

Back to Content

Dynamic Task Addition and Editing

Easily add new tasks or modify existing ones, including details such as task descriptions, priorities, and due dates, for precise task management.

x

Back to Content

Unique Task ID Generation

I implemented the generate_task_id function to ensure each task is uniquely identifiable. This choice simplifies the management process for updates, views, or deletions, avoids complex ID generation schemes, and integrates seamlessly with the Google Sheets framework.

x

Back to Content

Prioritization and Deadlines

Assign priority levels and set due dates for each task, enabling you to manage your workload effectively and focus on what matters most.

x

Back to Content

Submenu

The application's menu system is designed to streamline user navigation, offering a simple, intuitive interface that allows users to effortlessly add, manage, and track tasks, making task management both efficient and user-friendly.

x

Back to Content

Efficient Task Listing

View all tasks at a glance or filter them by priority or due date, providing a clear overview of your responsibilities and helping you plan your day or week with ease. Below are a few examples:

List all tasks in default order by low to high Task ID

x

Sort Priority (High-Med-Low)

x

Sort Due Date (latest to earliest)

x

Back to Content

Task Completion Tracking

Mark tasks as done, offering a satisfying way to track your progress and maintain motivation.

Task prior update of status

x

Task being updated

x

Task updated

x

Back to Content

Flexible Access and Data Persistence

With tasks stored in Google Sheets, access your task list from any device, ensuring that your data is always there when you need it. Security and privacy are paramount, and I've taken measures to ensure data security, including the use of secure API keys and restricted spreadsheet access.

x

Back to Content

Secure and Easy Exit

Confidently exit the application, knowing that all your tasks are safely stored in Google Sheets, ready for your next session.

x

Back to Content

Swift Screen Clearing

Instantly clear your terminal screen with the clear_terminal feature, ensuring a neat workspace for efficient task management. Simplify your workflow with a command that offers a fresh start for every new task.

x

x

Back to Content

Error Handling and User Feedback

Benefit from built-in error handling and user feedback mechanisms, ensuring a smooth and intuitive user experience even when mistakes are made. These are common error types managed during both the task addition and updating process:

  • Validation Errors, occur when user input does not meet predefined criteria, such as due dates in the past or incorrect formats for input fields. These errors prompt the user to re-enter data correctly.
  • Empty Input Errors are triggered when the user submits an empty string for a required field. The application alerts the user that input is necessary to proceed.
  • API Errors are also handled but not shown in the image, an example of an API error is when there's an issue communicating with external services, like Google Sheets. Users are informed that the operation couldn't be completed and are asked to try again later.

Error handling when adding a task

x,

Back to Content

Error handling when updating a task

x

Back to Content

Delete Task & Error handling

x

Back to Content

Future Features

There is a lot one can do to enhance this application, I want to highlight these (in no specific priority order). These features stand out because they address critical aspects of task management and personal productivity—integration with existing tools, collaboration, ease of use, and actionable insights. Implementing these would significantly enhance the application's value, making it a more versatile and indispensable tool for users.

  • User-specific Login

    • Implement a secure login mechanism to allow individual users to access their unique task lists.

    • This feature will enable personalization of the task management experience, ensuring users can manage their tasks privately and securely.

  • Multi-User Support

    • Develop functionalities that support multiple users, allowing for collaborative task management and assignment among team members or family.

    • By facilitating shared task lists and assignments, this feature will expand the application's usability in collaborative settings, making it more versatile and applicable to a broader range of use cases.

  • Integration with Calendar Applications

    • Allow users to sync their to-do list items with their preferred calendar applications (e.g., Google Calendar, Microsoft Outlook).

    • Users can see their tasks alongside their appointments, providing a comprehensive view of their schedules.

  • Collaborative Task Management

    • Add features that enable users to share lists with others, assign tasks, and track progress collaboratively.

    • Facilitates teamwork and shared task management, making the app suitable for both personal and professional use.

  • Natural Language Processing (NLP) for Task Entry

    • Utilize NLP to allow users to add tasks in natural language, which the app can then parse into structured task entries.

    • Simplifies the process of adding new tasks, making the application more intuitive and user-friendly.

  • Analytics and Productivity Insights

    • Offer analytics features that give users insights into their task completion patterns, and productivity trends, and suggest optimizations.

    • Helps users understand their productivity habits and make informed adjustments to improve efficiency.

  • Refactoring code to Object-Oriented Programming

    • Refactor the existing procedural codebase to utilize OOP principles, such as encapsulating related data and behaviours into objects and classes. This involves identifying logical components within the application and organizing them into classes, with methods for handling operations and properties for storing data.

    • By refactoring to OOP, the application's structure becomes more modular, maintainable, and scalable. It allows for easier extension and modification of the codebase, as changes to one part of the system are less likely to affect others. It could also lead to more readable and organized code, improving the overall quality of the application.

  • Splitting code into several scripts.

    • Increase the code organization and maintainability by refactoring the current monolithic codebase into a modular structure, dividing it into several script files based on functionality.

    Proposed structure:

       /project_root
          /task_master.py         # Main application script.
          /config.py              # Configuration settings.
          /sheets_integration.py  # Google Sheets integration functions.
          /utils.py               # Utility functions.
    
    • By organizing the code into distinct modules, future developers can easily navigate the project, understand its structure, and contribute more effectively. This approach minimizes merge conflicts and facilitates parallel development, allowing team members to work on different aspects of the project simultaneously. Updating, debugging, and extending the application becomes more manageable when the codebase is modular, as changes in one module are less likely to impact others unexpectedly. This approach also aligns with best practices in software development.

Back to Content


Technologies Used

Language

Python is used as the back-end programming language.

Tools

  • Code Institute Python Linter: A tool to check Python code against some of the style conventions in PEP8.
  • Draw.io: Useful for planning the application's architecture and flowcharts, especially helpful in the design phase to visualize the application flow.
  • Git used for version control. (git add, git commit, git push)
  • Visual Studio Code: A versatile and powerful IDE that supports Python development well, offering debugging tools, extensions for Python, and integrated Git control. While Gitpod provides its own web-based VS Code editor, one might use the desktop version for local development or when offline.
  • Gitpod Streamlines your development process by providing a pre-configured, cloud-based development environment that's instantly ready for coding.
  • GitHub Essential for version control, allowing you to track changes, collaborate with others (if applicable), and secure online code storage.
  • Heroku: A platform for deploying and hosting web applications.
  • Markup Validation Service - Used to check code ensuring that my HTML is error-free and adheres to the latest web standards.
  • PEP8: Style Guide for Python Code.

Back to Content


Data model

Flowchart

To follow best practice, a flowchart was created for the app's logic, and mapped out before coding began using a free version of Draw.io. Please note, that the flowchart provided is designed to offer a simplified visual overview of the Task Master application's core workflow. While it captures the essential operations and user interactions, some implementation details and error-handling mechanisms are abstracted for clarity. The actual application logic may involve additional steps and checks not depicted in the flowchart.

Flowchart

Functions & Error Handling

The primary functions used in this application are designed to streamline the task management process, making it intuitive and efficient for users to interact with their tasks.

The application is built with a focus on procedural programming, leveraging a series of functions to handle the core logic and interactions with the Google Sheets API. While incorporating robust error handling to ensure a smooth and reliable user experience.

The design and implementation of these functions are geared towards simplifying task management, ensuring that users can easily add, view, update, and delete tasks. By leveraging Google Sheets as a backend, the application also offers real-time data persistence and accessibility from any device.

Below is an outline of some key functions within the application and the specific roles they play:

generate_task_id()

This function assigns a unique identifier to each task, crucial for the easy management, updating, viewing, or deletion of tasks. It ensures tasks can be uniquely and efficiently managed within the system.

get_user_input()

At the core of user interaction, this function captures and validates user input, supporting various input types. It incorporates validation logic to maintain data integrity and provides user-friendly feedback, crucial for guiding users through correct data entry.

get_valid_due_date()

Validates that due dates for tasks are set in the future, a critical component for effective task scheduling and prioritization. This function helps users plan and prioritize their tasks with logical and practical due dates.

add_row_to_sheet()

Handles the addition of new tasks to the Google Sheet, encapsulating both the creation logic and error handling for API limits and connectivity issues. This ensures tasks are reliably stored in the application's persistent storage.

list_all_tasks()

Retrieves and displays all tasks from the Google Sheet, allowing users to view their entire task list in a structured format. Integrated error handling addresses unexpected data formats or API changes, ensuring robustness.

view_task()

Provides the functionality for detailed viewing of specific tasks based on their unique task ID. Error handling is integrated to offer clear feedback if a task ID does not correspond to an existing task, enhancing user interaction.

update_task()

Enables modifications to existing tasks, including updates to task descriptions, priorities, due dates, and statuses. The function includes error-handling strategies to manage invalid inputs or issues when updating the Google Sheet.

delete_tasks()

Facilitates the deletion of tasks from the Google Sheet, with comprehensive error handling to manage invalid task IDs or connectivity problems, enabling users to efficiently remove completed or outdated tasks.

def clear_terminal()

This function clears the command line interface, providing a clean slate for the user. It's particularly useful for maintaining a clutter-free terminal view when navigating through different tasks or after performing operations like adding, updating, or viewing tasks.

Error Handling Strategy

Error handling in the application is not confined to a single function but is woven throughout the application's logic. This approach ensures that users are provided with clear, actionable feedback in case of input errors, connectivity issues, or API limitations. Whether it's a validation error for a due date or an API limit being reached, the application strives to inform users of the issue and guide them towards resolving it. This not only enhances the user experience but also contributes to the application's overall reliability and robustness.

By integrating error handling directly into the core functions and operations, the application can gracefully manage exceptions, maintain consistent performance, and ensure data integrity. This careful consideration of error handling is a testament to the application's design philosophy, prioritizing user satisfaction and operational reliability.

Back to Content

Imports

Following Python packages and/or external imported packages were used:

  • os - The OS module in Python provides functions for interacting with the operating system.
  • datetime - Basic date and time type. Python Datetime module comes built into Python, so there is no need to install it externally.
  • gspread - Google Spreadsheets Python API
  • PrettyTable - A simple Python library for easily displaying tabular data in a visually appealing ASCII table format
  • colorama - Makes ANSI escape character sequences (for producing colored terminal text and cursor positioning) work under MS Windows.

To install use: pip install -name of package- To generate a list of installed Python packages use: pip freeze

Back to Content

Programming paradigm

Procedural Programming and Object-Oriented Programming (OOP) represent two separate methodologies for coding, each with its unique approach to code organization and structure. For my project, which is a straightforward small to medium-sized project - a task manager (To-do-list) application. I opted for the procedural programming method. This method emphasizes the creation of functions or procedures that manipulate data, making it suitable for a basic application. Additionally, at this stage in my education, I find procedural programming easier to grasp, as it employs a more linear method of programming.

Back to Content


Testing

Results and known issues

Please refer to the TESTING.md file for all testing and troubleshooting carried out.

Back to Content


Prerequisites and Deployment

The game was developed in VS Code, stored in GitHub as the local repository, and deployed on Heroku.

Prerequisite

  • Ensure Python is installed on your system.
  • Verify that Python is installed on your system by checking its version. This can be done through a command in the terminal or by running a small piece of Python code that outputs the version information.
  • For installing libraries and modules, use pip or pip3 depending on your Python version

Deploying on Heroku

  1. Heroku Account:

    • Make sure you have a Heroku account. If not, sign up on the Heroku website.
  2. GitHub Repository:

    • Ensure your project is hosted on GitHub.
  3. Heroku Dashboard:

    • Log in to your Heroku account and go to the Heroku Dashboard.
  4. Create a New App:

    • On the dashboard, click New and choose Create new app.
  5. App Name:

    • Choose a unique name for your app.
  6. Region & Create App:

    • Choose a region closest to you (EU or USA), then Select Create App
  7. New App

    • From the new app Settings, click Reveal Config Vars, and set the value of KEY to PORT, and the value to 8000 then select add.
  8. Confidential credentials

    • If one needs to use any private credentials, like CREDS.JSON, you should also add them to the Config Variables section. This is a crucial step for maintaining the security and integrity of your application, especially when it interacts with external services or APIs that require authentication.
  9. Add Buildpack

    • Scroll further down on the page, to support dependencies, select Add Buildpack.
    • It's crucial to arrange the build packs correctly! First, choose Python and then Node.js. If they're not in this sequence, you can reorder them by dragging.
  10. Extra files for Heroku deployment

  • For successful deployment, Heroku requires two extra files:

    • requirements.txt
    • Procfile

    Purpose: It specifies the dependencies to be installed for your application to function correctly. Impact on Deployment: Heroku reads this file to understand which packages and versions to install in the deployment environment.Ensures consistency between local and deployed environments, reducing deployment failures and runtime errors.

  1. requirements
  • To install the requirements for this project (where applicable), use the following command: pip3 install -r requirements.txt
  1. Own packages
  • If you've installed your packages, you need to update the requirements file with: pip3 freeze --local > requirements.txt
  1. Procfile
  • To create the Procfile, use the command below: echo web: node index.js > Procfile
  1. Heroku deployment method
  • Following these steps to connect your frontend terminal and deploy your application to Heroku!
    a. Connect to Heroku: Open your Terminal/CLI and log in to Heroku with: heroku login -i

b. Set Heroku Remote: Configure the Heroku remote using: heroku git:remote -a app_name (substitute app_name with the name of your app)

c. Git Operations: Execute the usual Git commands: add, commit, and push to update your repository on GitHub.

d. Deploy to Heroku: To deploy, enter: git push heroku main in the terminal.

  • Alternatively: You can opt for Automatic Deployment directly from the Heroku app interface.

Back to Content

Local Deployment

The project can be cloned or forked to make a local copy on your system.

For either method, you will need to install any applicable packages found within the requirements.txt file.

  • pip3 install -r requirements.txt.

If using any confidential credentials, such as CREDS.json or env.py data, you'll have to manually incorporate these into your new project as well.

Back to Content

How to Clone

To clone the project repository:

  1. Log in (or sign up) to GitHub.
  2. Go to the repository for this project, JaqiKal/task-master
  3. Click on the code button, select whether you would like to clone with HTTPS, SSH or GitHub CLI and copy the link shown.
  4. Open Git Bash or Terminal
  5. Change the current working directory to the location you want to use for the cloned directory.
  6. In your IDE Terminal, type the following command to clone my repository:
    • git clone https://github.com/JaqiKal/task-master
  7. Press Enter to create your local clone.

Back to Content

Forking

Forking the GitHub Repository allows us to create a duplicate of the original repository in our own GitHub account. This enables us to explore and modify the content without impacting the original repository. To fork this repository, follow these steps:

  1. Log in to GitHub and locate the GitHub Repository
  2. At the top of the Repository (not the top of the page) just above the "Settings" Button on the menu, locate the "Fork" Button.
  3. Once clicked, you should now have a copy of the original repository in your own GitHub account!

Back to Content

Local VS Deployment

At the time of writing, there is no difference between the local version and the version deployed on Heroku.

Back to Content


Credits

Content

This application was made possible by leveraging insights and code examples from a range of external resources. Below is a list of these key sources, which have significantly contributed to the functionality and design of the application. A heartfelt thank you to the creators and maintainers of these resources for their invaluable assistance.

Back to Content

Media

For this project, no external media was used for the creation of this project.

Back to Content

Acknowledgements

I would like to thank!

Back to Content

About

A command-line application that allows users to manage a common dataset.

Topics

Resources

Stars

Watchers

Forks