Skip to content

Mohnish226/to-do-app

Repository files navigation

to-do-app

Built for MSA Program

Website:

  1. todo.datascience.app Heroku status
  2. todo1.datascience.app Azure status

Status: status https python


Browsers Tested: Edge Chrome Firefox Safari

  • Features

    1. Modify Tasks on the go !! (No need to refresh)

      • Type your task at
        Click on + sign or just press Enter ↵

      • Task will look like

      • To delete a task

        • press on Or
        • just erase the task contents
      • To Add details to a task press on

        Add extra details in the dropdown box

    2. Toasts !!

    3. Undo !!

      Deleted Task reappears (current session)

      • Click on

      • Ctrl + Z

      • Cmd + Z

    4. Works Offline !!

      DO NOT CLOSE THE TAB

      In case if your device gets disconnected the application will sync with the server once connection is established you will see which will indicate that your tasks are being synced with the server

    5. Secure

      • All passwords are stored encrypted For example : 'Admin' → 'e6afed0047b01059d0fada10f400c1e5'
      • HTTPS: Enabled
    6. Sync across all devices

      All task get synchronized (Might need to refresh / login again)

  • Tech Used

    Tech Use
    HTML + CSS Front End
    JS Front End & Send Requests
    Python (flask) Works as an API
  • Dependency (UI)

  • Requirements

    Package Version
    gunicorn 19.7.1
    Flask 0.12.2
    flask-sqlalchemy 2.4.4
  • How to run

    1. Install all required python packages
      cd to-do-app/
      pip install -r requirements.txt
    2. To run the app ( local )
      cd to-do-app/
      python app.py
    3. To run the app ( VPS / Hosting ) Please follow hosting providers method to host flask apps. use command
      gunicorn --bind 0.0.0.0:$PORT app:app
  • Use app via terminal / Postman

    Requires

    cURL or Postman


    Please Note you can replace <url> with

    • https://todo.datascience.app if using the hosted server
    • http://127.0.0.1:5000 if working locally

    1. To check if server is online run


      • Terminal

        curl '<url>/connected'
      • Postman


        GET request to <url>/connected


      • Returns:


        ok means server is UP


    2. Create / Get user API and next task number


      (please replace <username> with your username and <password> with your password)


      • Terminal

        curl '<url>/user/<username>/<password>/'

      • Postman


        GET request to <url>/user/<username>/<password>/


      • Returns:


        Data in the form <api-key>|<next-task-id>


      Example:

      cabd6c91-0baa-4a55-99d7-1b8f1d15c1e7|1

    3. To get all task from a user


      • Terminal
        curl '<url>/api/<api-key>/all'

      • Postman


        GET request to <url>/api/<api-key>/all


      • Returns:


        All tasks in json in the format

        {'<task_id>' : {
            'task': '<your task>',
            'details': '<task details>'
            }
        }

      Example

      {'1':
          {
          'task': 'Call Work', 
          'details': 'Remember to ask about project XYZ'
          }
      }
    4. To add task for a user

      Keys id : Task Id t : Main task text d : Task details (Optional)


      • Terminal

        curl --data "id=<task_id>&t=<task_main_detail>&d=<extra_task_details>" "<url>/api/<api-key>/task"

      • Postman


        Post request to <url>/api/<api-key>/task with above the mentioned key and their values


      • Returns: ok : Executed successfully error : Did not execute


    5. To Modify task

      Keys (include atleast 1) t : Main task text d : Task details

      (please replace <api-key> with your api and <task-id> with your task ID)


      • Terminal

        curl --data "t=<task_main_detail>&d=<extra_task_details>" "<url>/api/<api-key>/<task-id>/det"

      • Postman


        POST request to <url>/api/<api-key>/<task-id>/det with above the mentioned key and their values


      • Returns:


        • ok : Executed successfully
        • error : Did not execute

    6. To delete task (please replace <api-key> with your api and <task-id> with your task ID)


      • Terminal

        curl "<url>/api/<api-key>/delete/<task-id>"

      • Postman


        POST request to <url>/api/<api-key>/delete/<task-id>


      • Returns:


        • ok : Executed successfully
        • error : Did not execute

  • Known Issues

    • Typing can get slow if server gets overloaded
    • Extra task details get cleared sometimes when working offline (may be due to different browsers)
  • Note:

    • This repository contains files to run/host locally, you will need to do changes according to the hosting provider.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors