# Server Side App
- Sevda : Quality
- Neville : Deployment
- Antonio : User
- Amy : Facilitator
---
## Day one

---
- Roles
- Setting up the repository
- Technical spikes
---
### Ideas
- File uploads (avatar - profile picture)
- Session flash messages (game pop up)
- Simple Game: hangman, noughts and crosses, connect 4, higher or lower
- People have profile
- flash messages on losing/winning
- profile stats saved in database
---
- Pages: home/log in, game page, profile stats page, sign up, log out leaderboard, upload/edit profile (stretch)
- File upload as a profile pic.
- Game is between machine and person.
---
## Pages
- Home / log in
- sign up (upload/edit profile (stretch))
- log out (each page)
- Profile stats page (Play the game)
- Game page (Home Page)
---
<img src="https://i.imgur.com/KavylI4.png" alt="drawing" width="600"/>
---
<img src="https://i.imgur.com/aSzCLUC.png" alt="drawing" width="600"/>
---
## Routes
- Home ( )
- Sign up ( )
- Log in ( )
- Log out ( )
- Game page ( )
- Profile ( )
---
## Folders
- database/
-- build.js
-- connection.js
-- init.sql
-- model.js
- public/
-- images/
-- styles.css
-- app.js
---
- src/
-- components/
--- templates.js
-- handlers/
-- middleware/
--- checkAuth.js
--- handleErrors.js
--- readCookie.js
-- auth.js
- .env
- server.js
---
## Velocity: estimations X actuals
<img src="https://i.imgur.com/9xO9jhe.png" alt="drawing" width="600"/>
---
### Database Schema
<iframe src="https://giphy.com/embed/3orieORWEyJZmW8zte" width="480" height="270" frameBorder="0" class="giphy-embed" allowFullScreen></iframe>
---



---
### Client side JS




https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
---
### Presentation
<iframe src="https://giphy.com/embed/xT5LMq6mrmaKPMuJgY" width="480" height="360" frameBorder="0" class="giphy-embed" allowFullScreen></iframe>
https://week7-aans.herokuapp.com
---
And now, some lists:

---
## The Code
---
## Struggles:
- Dynamic route paths - our path url kept being overwritten because we had connected our file path wrong in our HTML script. In our HTML template we had used app.js instead of /app.js as our script and that ruined everything!
- Flash messages

---
## Flash-Messages:


---

---
## Learnings:
- How to create flash messages!
- How client and server interact
- HTTP reminder
- Relative path extension!! DOWNLOAD IT FOR AS EASIER LIFE
- In-depth knowledge about request and response
---
## Issues:

---
- CSS
- ReadMe
- Game fetch request
- Excess console logs/commented code
- Cookie options not set
- Client side form validation
- Actual story points not added
- Unbalanced commits (still not got the hang of co-authoring!)
---
## Resolved:
- Very basic CSS added: our group would benefit from spending more time on this next time
- ReadMe added
- Deleted unwanted code
- Merged branch from yesterday that resolved cookie issue
- Simple client side form validation
- Actual story points added (useful for future sprints)
---
## Remaining issues:
- The game fetch request still hates us!
- We could DEFINITELY add further CSS
- We could further modularise
- Our issues: log out possibility, profile page, checkAuth middleware, leaderboard
<!-- Show Kanban -->
---
### Thank you!

{"metaMigratedAt":"2023-06-15T23:56:19.088Z","metaMigratedFrom":"Content","title":"Server Side App","breaks":true,"contributors":"[{\"id\":\"996ce3e0-9607-46ac-bff5-62ce759b859d\",\"add\":2185,\"del\":814},{\"id\":\"a84f02d0-b86d-4b5d-97e0-7bdd156fad86\",\"add\":956,\"del\":204},{\"id\":\"7a5548f0-da55-4d05-a75d-a38212f27c1c\",\"add\":1434,\"del\":604},{\"id\":\"7bfddbf1-39cc-46b1-8474-80064974de82\",\"add\":1143,\"del\":63}]"}