Skip to content

fac18/week6-mepl

Repository files navigation

Our HackMD presentation can be found here


Team firefighter

Kin - Maria - Nikke - Pat


The fastest brain-storming ever!

We just decided to run with our 2nd idea.

And were really happy with it!

  • life span based on your life choices
  • you'd either increase or decrease your lifespan

User story sketches


Architecture sketch

We made a quick sketch to make sure that every member of our team understood how information would flow through our project as well as being a brief overview of how our rough file architecture might be laid out.


Project architecture


Examples of what our database would have captured

GOOD vs BAD life choices


Our database schemas:


Then at noon on Thurs 5th Dec...

... we changed our minds...

WHY?

The database schemas ended up being more difficult than we initially thought and wasn't ideal for fulfilling the project criteria. So we had to rethink our great idea.

And decided to go with our initial FAC Fruit Basket idea which would better fill the project requirements of retrieving data from a database. Still a good idea!


User stories

  • As a user, I want to buy virtual fruit with virtual money
  • As a user, I want to see the fruit basket items and stock
  • As a user, I want to see the shop's items and stock
  • As a user, I want to be able to view my personal details on the website

Our actual database schema


Architecture 2.0


Things we have achieved

  • deployed database to heroku
  • great CSS! - 404 fun
  • user knows they've logged in!
  • user data has been sent to database
  • database returns data
  • tests!
  • we did a helluva lot of learning! Esp debugging!

Accessibility


ERROR DEBUGGING


We kept recieving this error code:

So we traced the bug back to our db_connections file.

CAN YOU SPOT IT?

const params = url.parse(process.env.DB_URL);
// const [username, password] = params.auth.split(":");

const options = {
  host: params.hostname,
  port: params.port,
  database: params.pathname.split("/"[1]), 
  max: process.env.DB_MAX_CONNECTIONS || 2,
  // user: username,
  // password: password,
  ssl: params.hostname !== "localhost"
};

Correct:

Incorrect:

So this also means:


User/password

const params = url.parse(process.env.DB_URL);
// const [username, password] = params.auth.split(":");

const options = {
  host: params.hostname,
  port: params.port,
  database: params.pathname.split("/"[1]), 
  max: process.env.DB_MAX_CONNECTIONS || 2,
  // user: username,
  // password: password,
  ssl: params.hostname !== "localhost"
};

https://en.wikipedia.org/wiki/Uniform_Resource_Identifier


Things to add

  • more tests
  • check and retrieve existing user information from database
  • login/authentication
  • host on heroku
  • update database with user input
  • update stock data with purchases
  • deduct from kitty our purchases

sgc

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •