# FacTales
A place for fellow FACers to recommend movies and books

## Content Outline
- :1234: intro to the project
- :jack_o_lantern: roles of each person
- things that worked well
- things that didn't
- :u5408: features of the project
- :t-rex: demo of the live project
- :jeans: missing-features of the project
- :space_invader: Expected / Actuals (VELOCITY!!!)
---
## Project Intro
It works. Check out this PIDGEON image

---
## Our Roles
- Simon: :package: DevOps :package:
- Alphonso: :pager: QA :pager:
- Tom: :palm_tree: SCRUM Facilitator :palm_tree:
- Beth: :panda_face: UX :panda_face:
---
## SCRUM fascisti-litator
### WWW
Day 1 lots of discussion to get on the same page which paid off on day 2, where there was a lot more action. Everybody was keen to keep each in the loop.
### WDGW
I didn't make everyone stand up for stand-ups. I also didn't enforce people to reflect on their expecteds or explain why they didn't meet their expected.
## DevOps
### WWW :thumbsup:
- Fly.io
- SQL
- Team dynamic
- Letting go
### WDGW :thumbsdown:
- Fly.io
---
## QA
:+1:[Naming Conventions](/NuGVrwNLST6SE5oYn4MEGg)
:-1:Testing is not present in our code base
---
## UX
π [CSS Style Guide](https://hackmd.io/@Wj9L3Z4KSgCw6z7pUYd99w/B1hZjGKrn)
---
## Features
:face_palm: We deploy to Fly.io when there is a push to the main branch.
:game_die: A page with a form to submit posts, and a page showing all posts
:hamburger: Recommendations are stored in a database
:japan: We serve the css as static content when a page is requested.
:label: A responsive, mobile-first design
:ocean: Ensure your app is accessible to as many different users as possible
---
[:cat2: PROJECT BOARD :cat2:](https://github.com/orgs/fac27/projects/24/views/1)

---
### Setbacks π§
**Always remember your env variables!**
The dev script in package.json didn't include env variable for the db.sqlite that meant it was creating some random unnamed database.
---
### Something weβre proud of
``` javascript
module.exports = { viewRecommendations, setFilterRec };
let filterRec;
function setFilterRec(filterRecArg) {
filterRec = filterRecArg;
}
function viewRecommendations() {
let recList;
if (filterRec === 'movie') {
recList = selectMovieRecs()
.map(
(rec, index) => /*HTML*/ `
<li style="list-style: none; grid-column: ${(index % 3) + 1}; grid-row: ${
Math.floor(index / 3) + 1
};">
${rec.user_name} recommended ${rec.movie_title}
</li>
`
)
.join('');
} else {
recList = selectBookRecs()
.map(
(rec, index) => /*HTML*/ `
<li style="list-style: none; grid-column: ${(index % 3) + 1}; grid-row: ${
Math.floor(index / 3) + 1
};">
${rec.user_name} recommended ${rec.book_title}
</li>
`
)
.join('');
}
```
potential change >
``` javascript
const recs = (filterRec === 'movie') ? selectMovieRecs() : selectBookRecs();
recs.map(rec => {title: rec.bla, maker: rec.bla2})
```
forgot environment variable! which led to the creation of an enitrely new db on
> const db = new Database(process.env.DB_FILE)
---
## Demo of live project :zombie:
Let's take a look at the deployed app...
[project]()
---
## Velocity :fast_forward:
- create: schema and seed **E1** **A1** β
- create: html templates **E2** **A2** β
- create: search form **E2** **A3** :snail:
- setup: fly.io **E3** **A3** β
- setup: persistent database **E2** **A8** :snail:
- tests: initial route tests **E3** **A8** :snail:
- .get("/") route **E2** **A1** :speedboat:
- .post("/movie") route **E3** **A3** β
- .post("/book") **E2** **A1** :speedboat:
- CSS **E3** **A1** :speedboat:
{"metaMigratedAt":"2023-06-18T05:21:17.473Z","metaMigratedFrom":"Content","title":"FacTales","breaks":true,"contributors":"[{\"id\":\"a210ffc0-41a5-4f68-b66f-05dcc31f5785\",\"add\":2938,\"del\":0},{\"id\":\"eeea763e-8731-4434-88ff-28dee8eb171b\",\"add\":351,\"del\":0},{\"id\":null,\"add\":498,\"del\":0},{\"id\":\"5a3f4bdd-9e0a-4a00-b0eb-3ee951877df7\",\"add\":286,\"del\":0}]"}