Code Monkey home page Code Monkey logo

artistify-3's Introduction

Artistify Workshop III

This group workshop will walk you through the steps to create a fullstack application.

Work as a team, communicate, avoid git conflicts !

alt text


Day III - Authentication (end @ 18h00)

Today, we'll implement a full signup/signin/signout system.
To do so, we'll learn about session mechanism in express and bcrypt hashing algorithm.
We will also protect the dashboard routes with custom middlewares.
Finally, we will use other custom middlewares and flash messages to display hints to our end users.

This is a huge step and will become handy during module II project week ! Use the auth appliction provided in class to complete the todo list.

Don't worry if you can't finish all the steps : you will get a soluce proposal.

Do your best : Happy hacking !


Todos

  • PART I
    • Implement signup (aka register)
    • Implement success / warning flash messages for signup
  • PART II
    • Implement signin (aka login)
    • Implement logout (or signout)
    • Implement success / warning flash messages for signin
  • PART III
    • Protect all dashboard routes with the protectAdminRoute middleware
  • Bonuses

The User model

The User model should be located in /models/User.js

The User model must have the following properties :

The auth router

The auth router should be located in /routes/auth.js .
All those routes are prefixed with /auth


Here is a routes description:
Route HTTP View Description
/signin GET auth/signin.hbs Display signin form
/signup GET auth/signup.hbs Display signup form
/signout GET none Destroy the session and redirect to signin
/signin POST none Executes the signin process
/signup POST none Executes the signup process

PART I

Use the auth appliction provided during class and the associated course card to implement a signup feature.


PART II

Use the auth appliction provided in class and the associated course card to implement a signin feature.
Users should be also able to signout.


PART III

A non-logged in user should be able to access the dashboard pages !
Protect all dashboard routes with the protectAdminRoute middleware.



Done already ? Congratz !

alt text


Wanna do more ? Here are some bonuses !

  • On the home page, display the last 3 inserted albums and artists, sorted by date in descending order.
  • display all related album, if any, in each artist detail page
  • Create a new router file in routes/my-api.js
    • Expose all artists, albums, labels, styles as JSON responses, in separate routes.
  • carte blanche: use chart.js or d3.js to create a nice data visualisation in the dashboard index

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.