# Work Plan 2018-01-02
### Weekly Goal
Work on auth snapshot goal
### Specifications
[https://curriculum.learnersguild.org/Phases/Practice/Modules/Snapshot-Auth/]
(https://curriculum.learnersguild.org/Phases/Practice/Modules/Snapshot-Auth/)
### Implementation Plan
#### Update Data Model
- Add properties to `contacts` table:
+ `role`
+ `password`
+ `username`
#### Views
- Add sign-up template
+ create view file (ejs template)
- `sign_up.ejs`
+ Add markup for
- form for user and password
- form method will be POST
- form action will be `/sign_up`
- Add login view
- add `new_contact.ejs`
#### Routes
- define route/endpoint for serving sign-up page
- the point of this route: rendering sign up form
- GET route
- `/sign_up`
- render the ejs template `sign_up.ejs`
- define route/endpoint for receiving sign_up page form
- the point of this route: add user/password to database
- POST route
- `/sign_up`
- logic for validating new user info
- store new user info (encrypt)
- redirect user to `/user/:user_id` route
- define route for `/contacts/new`
- if not admin, return status code 403
- render a form to create a new contact `new_contact.ejs`
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.