Code Monkey home page Code Monkey logo

smallpaes / todo-list Goto Github PK

View Code? Open in Web Editor NEW
20.0 1.0 7.0 10.98 MB

A practical web application built with Node.js, Express, and MySQL for you to readily record, view, and manage your tasks with an account: Create, view, edit, delete, filter, and sort expenses are as easy as pie ๐Ÿฅง

JavaScript 18.83% CSS 63.60% HTML 17.57%
mysql nodejs expressjs sequelize todolist todo crud passportjs authentication facebook-authentication

todo-list's Introduction

Todo List ๐Ÿ“†

A practical web application built with Node.js, Express, and MySQL for you to readily record, view, and manage your tasks with an account: Create, view, edit, delete, filter, and sort todos are as easy as pie ๐Ÿฅง

Trial in this project ๐Ÿค 

To increase user experience

  • Animate.css is used to show animation for certain actions

To enhance security


Project First Look

Application Screen Shot in GIF

Features

Functions Detail URL
Sign up for an account 1. User can sign up an account by inputting name, email, password
2. User can get a warning message for invalid input format
/users/register
Log in with email 1. User can log in using registered email
2. User can get a warning message for incorrect password or unregistered account
/users/login
Log in with Facebook account User can log in via Facebook with a Facebook account /auth/facebook
Log out 1. User can log out of an account
2. User can get a reminder for successful logout
/users/logout
View all todos 1. User can view todos list with name, due date and status after login
2. User can get an error message when no todo to display after login
/
View a todo User can view name, due date, status, and detail of a todo after login /todos/view/:id
Create a todo 1. User can add a todo with detail after login
2. User can get a warning message for invalid input format
/todos/new
Edit a todo User can update detail info of a todo after login /todos/edit/:id
Delete a todo 1. User can delete a todo after login
2. User can receive a warning message before actual delete
/todos/delete/:id
Filter todos User can filter todos based on status and due date /search
Sort todos User can sort todos based on status, due date, or name /search
Page not found User can get an error message when travelling to a page not existing /:any_other_URL

Installation

The following instructions will get you a copy of the project and all the setting needed to run it on your local machine.

Prerequisites

Clone

Clone this repository to your local machine

$ git clone https://github.com/smallpaes/todo-list.git

Setup Datebase

Create and use todo-sequelize database via MySQL Workbench

Run the following code

drop database if exists todo_sequelize;
create database todo_sequelize;
use todo_sequelize;

Setup App

1. Create a Facebook account

2. Create a Facebook App and get the App ID & Secret

My Apps -> Create App -> Scenario: Integrate Facebook Login -> Settings -> Basic

3. Enter the project folder

$ cd todo-list

4. Install packages via npm

$ npm install

5. Create .env file

$ touch .env

6. Store API Key in .env file and save

FACEBOOK_ID=<YOUR_FACEBOOK_APP_ID>
FACEBOOK_SECRET=<YOUR_FACEBOOK_APP_SECRET>
FACEBOOK_CALLBACK=<YOUR_FACEBOOK_REDIRECT_URI>

7. Edit password in config.json file

/config/config.json

"development": {
  "username": "root",
  "password": "<YOUR_WORKBENCH_PASSWORD>",
  "database": "todo_sequelize",
  "host": "127.0.0.1",
  "dialect": "mysql",
  "operatorsAliases": false
}

8. Create models

run the following code in the console

$ npx sequelize db:migrate

9. Activate the server

$ npm run dev

10. Find the message for successful activation

> App is running on port 3000!

You may visit the application on browser with the URL: http://localhost:3000


Authors

Mike Huang

todo-list's People

Contributors

smallpaes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

todo-list's Issues

Table 'todo_sequelize.Users' doesn't exist

Hi, I installed it step by step as instructed, but when registering for an account it returns the following error
" Executing (default): SELECT id, name, email, password, createdAt, updatedAt FROM Users AS User WHERE User.email = '[email protected]' LIMIT 1;
Unhandled rejection SequelizeDatabaseError: Table 'todo_sequelize.Users' doesn't exist".
Please help me fix it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.