# Week 6 - Project Web App that Authenticates "Users Specific Data"- SCAM
---

---
## Roles
- Facilitator Amy - Checking everything runs smoothly - Kanban Board
- Deployment Mariya - Create repository, creating files README, JS, Database and good practice file structure set up
- User Saki - Check User needs UI and UX and satisfactory
- Quality Chisha - Checking code, correct files
---
## Concept and Topic
Recommendations for Food & Drink around Space4 (we were all idea'd out)
---
## Overview
Our group got nowhere near a finished project, but we learned SO MUCH.

---
## Process
- Created schema on excel again
- Created plan of website (next time figma)
- Created kanban with more specificity (specific routes)
- Tried to 'reset' on points model
---
## Plan
- Website PAGES:
-- Home page: Will consist of Logo and Four buttons. Login button, Sign up button, View Recommendations and Add Recommendations button
-- Add Recommendations page: Will consist of Add button and Add Recommendations Text Message box
-- View Recommendations page: Will consist of All Recommendations listed in date order
-- Log in page: Will consist of Login button within a form with links to sign up page which REDIRECTS to home page after submitting. Cookies will be added to validate if you are a user who has already signed up and will be able to add Recommendations
-- Sign up page: Will consist of Add user name, Add email which REDIRECTS to home page after submitting
---
## Kanban/points
We tried to use our kanban much more, so we actually used the 'assign member' functionality and moved issues from column to column.
We also assessed at the end of each day how long tasks had taken so we had a clear idea of how long everything else would take.
---
It was fairly obvious by the end of the first day that we were not going to finish on time...but at least we knew!!

---
Mapped out our architecture in an issue
Split into pairs to work through issues
Regrouped at the end of each session and did 'Spot Checks' to ensure each pair understood the code

---
## DEPLOYMENT - Mariya
----
<img style="float: right;" src="https://i.imgur.com/8ehb4Cu.png" height=600>
### File structure
---

---
- ###### Cypress
- ###### Scripts Folder with db: build and db:setup
<img style="float: right;" src="https://i.imgur.com/EZ0AGMT.png" height=500>
---

- Setting up Heroku
- Database
- Automation
---
## USER - Saki - Code

---
## Role Circles :arrows_counterclockwise:
| Homepage | Login | Signup |
| -------- | -------- | -------- |
| <img src="https://i.imgur.com/q3eMKg4.png" > | Allow user to log in then redirect to home with a message saying "welcome back". If user doesn't exist give error message | Sign up, validate password/username, if ok then redirect to log in page saying you have successfully signed up |
---
| View Recs | Add Recs |
| -------- | -------- |
| You can view recommendations whether you are signed in or not | If you are signed in you can add recommendations |
---
DEMO HERE: https://scam-food.herokuapp.com/
---
## LEARNINGS - Chisha :smile: :books: :bookmark_tabs:

---
Although we were unable to implement all the learnings from the workshops for our project **WE LEARNT**
- How to log a user in and how to encrypt a password
- Model.js implementation and writing it faster :computer:
- Understanding Promises a bit better :thinking_face:
- Regrouping at the end of each session and doing spot checks to understand our code
- Better working relationships with much more laughter :sweat_smile:
- Heroku setup
- Dealing with stress with limited time :timer_clock:
---
- Database setup and understanding the querys to obtain information from one table to another

---
- **Debugging** lots of errors on our code which took a long time :watch:

```nextTick(callback.bind(this, Error("Illegal arguments: "+(typeof s)+', '+(typeof hash))));
^
Error: Illegal arguments: string, undefined
```
---
- Debugging an error where we had to change the order of the const PORT when we were getting this error when running bcrypt.compare
```
const PORT = process.env.PORT || 3000;
```
---
- Debugging lots of issues on Heroku especially with H20 and H10 errors

{"metaMigratedAt":"2023-06-15T23:36:17.174Z","metaMigratedFrom":"Content","title":"Week 6 - Project Web App that Authenticates \"Users Specific Data\"- SCAM","breaks":true,"contributors":"[{\"id\":\"8f8c06f3-b94f-481e-bfaf-b783100a4014\",\"add\":4291,\"del\":1128},{\"id\":\"44104ba4-c46e-4af8-85be-4db9698884e9\",\"add\":1121,\"del\":855},{\"id\":\"996ce3e0-9607-46ac-bff5-62ce759b859d\",\"add\":1094,\"del\":402},{\"id\":\"e766c134-70b5-4e90-ae12-2b83144c7e0c\",\"add\":1383,\"del\":465}]"}