/to_do_list

Primary LanguageJavaScriptMIT LicenseMIT

to_do_list

Overview & Weekly Goal

A simple to-do list app where users can store their tasks in a database, see their tasks, and mark them complete. Based on the ToDo List goal.

Specifications

ToDo List:

  • Backend uses Node.js and Express.
  • App persists tasks in a database.
  • Users can sign in/out.
  • Users cannot access any pages without signing in first.
  • Going to the Home Page (http://localhost:3000/) should let you see all the lists
  • Going to a list detail page should show all the tasks for that list
  • Users can create lists without page refresh.
  • Adding a list should add a new list in the database, and redirect to the created list
  • Users can delete unwanted lists without page refresh.
  • Clicking on the Delete button for a list should delete the list without refreshing the page
  • Users can create tasks without page refresh.
  • Users can delete unwanted tasks without page refresh.
  • Users can edit the text on existing tasks without page refresh.
  • Users can check tasks off as completed without page refresh.
  • UI renders tasks differently when they are completed (using a checkbox or some other indicator).
  • User can change the order that tasks are listed.
  • Searching should show all the lists and tasks which match the search string
  • Navbar shows signin on the signup page, and visa versa.
  • Navbar shows logout when user has signed in.

Implementation Plan

ToDo List:

  • Views

    • Create front end:
      • Implement jQuery, and vanilla JavaScript
      • Use scripts to manipulation DOM
      • Task order can be changed using jQuery
      • Navbar partial that takes user info
  • Database

    • Create schemas:
      • Create users table using id, name, email, & password columns
      • Create lists table with id, title, & username columns
      • Create tasks table with id, completed, task, list columns'
    • Queries
      • Create list
      • Delete list
      • Update list
      • Create tasks
      • Delete tasks
      • Update tasks
      • Find user by email
      • Get all lists
      • Get list by user ID
      • Edit profile
      • Get tasks by list ID
      • Sign up
      • Sign in
      • Search
  • AJAX

    • Create AJAX calls for lists:
      • POST create
      • DELETE delete
    • Create AJAX calls for tasks:
      • POST create
      • DELETE delete
      • PUT update
    • Create AJAX calls for users:
      • PUT update
    • Create AJAX calls for search:
      • GET search
  • Routes

    • Implement express-session for user data
    • Create users routes
      • POST /signin
      • POST /signup
      • POST /logout
      • GET /profile
      • POST /profile/edit
    • Create lists routes
      • GET lists
      • POST /list/create
      • DELETE /list/delete
    • Create tasks routes
      • GET lists/:listId
      • POST /list/addTask
      • DELETE/list/task/delete
      • PUT /list/task/update (order, completion, edit)
    • Search
      • GET /list/search
  • Testing

    • Testing tasks:

      • Creating to do list items
      • Deleting to do list items
      • Completing to do list items
      • Editing to do list items
      • All tests are passing
    • Testing lists:

      • Creating list
      • Deleting list
      • Completing list
      • Editing list
      • All tests are passing
    • Deploy site on heroku