Git Product home page Git Product logo

users-todo-list's Introduction

Users Todo List

This is Part 6 of a series of labs working towards building your first full stack web app.

So far you've built a full MVC Todo List Application. The only thing that is missing is User Authentication. Use what you'ver learnt in the lab to add user authentication to this App.

Exercise

Part 1

You'll need to add user accounts and authentication routes to your application. Specifically, your Application should allow a user to:

  • signup and create a new account
  • login with their email and password
  • logout when they have finished their session
  • only CRUD Todos if they are logged in

Part 2

Now that you have user accounts, you want to associate the users with the Todos they create and use that to restrict access. Specifically, your Application should allow a user to:

  • create a new Todo - the todo should store the user_id of it's creator (Mongoose Referencing)
  • view only their Todos
  • edit only their Todos
  • delete only their Todos

Your Application should not allow a user to:

  • perform CRUD actions on the Todos of other users

Your new routes will include.

  • GET /auth/signup
  • POST /auth/signup
  • GET /auth/login
  • POST /auth/login
  • GET /auth/logout

As you'll have the logged in user stored in the req.body, you do not need to have the user id in the URL. For example /todos should show the Todos for the logged in user, whoever that is.

Bonus:

  • Add a navigation bar that shows the name/email of the logged in user and shows buttons to login/logout/signup.
  • Allow a user to transfer ownership of a Todo to another user. This would be an option on your edit form.
  • List some stats about you application on the public home page, number of users, number of Todos etc.
  • Allow a user to delete their account, which should then delete all of their Todos.

users-todo-list's People

Contributors

jeremiahalex avatar terencelimsayjian avatar

Watchers

James Cloos avatar Jonathan Phoon avatar

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.