GithubHelp home page GithubHelp logo

frannyfra / week5-chin-project Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fac-17/week5-chin-project

0.0 1.0 0.0 48 MB

An app for info on the prices of commodities

Home Page: https://chin-week5-apis.herokuapp.com/

JavaScript 8.43% HTML 86.03% CSS 5.54%

week5-chin-project's Introduction

CHIN

๐ŸŽธ reuben was here

Project

Create a web app that includes some form of user input and provides users with content from an API that is regularly updated - e.g. the same user input submitted at different times could result in different content being retrieved. ๐Ÿ’โ€

A good example could be a news app but feel free to be creative!

The key difference between this project and your API week project is that you will be making your API calls from the back-end and testing your server.

Our API:

https://blog.quandl.com/api-for-commodity-data API holding historical commodity

Goals:

  • Use at least 1 API
  • Make your API calls from the back-end using the Request module (or one you build yourself)
  • Your server should contain a minimum of 2 routes
  • We expect to see lots of tests! Modularise your code and test all your pure functions. Write tests for as much of your back-end and front-end logic as you can. We don't expect tests on the DOM.
  • Test your server routes by injecting fake HTTP requests using Supertest (including testing for 404's). Note - you are not required to test any server route that makes an API call, as this will make the test impure (a test that depends on an external factor is not reliable)
  • Host your project on Heroku, see resources
  • Use module.exports and require to break a single large server file into smaller modules.
  • Consider a good server file structure based on what we have discussed over the week.
  • Employ continuous integration on your project with Travis or a similar tool. (If you decide to use Travis, we strongly recommend that you host this project in your own repo rather than in your cohort's FAC repository to avoid all builds getting queued together)
  • Use CodeCov or a similar tool to report and track test coverage.
  • [x]Include Error Handling. For example: if a user attempts to make a request to a non-existent route to your server (404 - as mentioned above), provide the user with a custom response. if there is a programmer error on your server (e.g. a handler function does not act as intended), provide the user with a custom response (500 status code). Include a user input field on your web app and include server-side validation to protect your server from potentially malicious user input.
  • Display continuous integration and code coverage badges on your project README.

Stretch goals:

  • Research and use Nock to mock the response of external API calls in your tests, and write tests for server routes that make API calls.
  • Create a route and functionality for a POST request.

TO DO

  • [x]Start Repo
  • [x]Set up Travis
  • [x]Set up file structure
  • [x]Write server
  • [x]TESTS
  • [x]Deploy to Heroku
  • [x]set up router
  • [x]set up handler
  • [x]Write API call
  • [x]Send back price for today's date to front-end
  • [x]Basic CSS styling

Before Thursday lunch:

  • Decide on our commodities
  • Set up backend API call
  • Filter data ready to go to front end

After lunch

FRONT END

  • Basic HTML structure
  • dropdown list to select commodity
  • event listener on a submit/search button
  • XMLhttp call to backend with search query (format it like '/search?q=commodityname')
  • Render results to DOM

BACKEND

big object.dataset_data.data = array which has nested arrays for different dates inside it

  • decide what data to send back to front end yesterday's prices
  • filter through response object(WRITE A SEPARATE FUNCTION which returns the filtered object)
  • categories of commodities available

Stretch goals

  • [ ]Display data for a few historical points
  • [ ]Graphics/SVGs
  • Convert currency

week5-chin-project's People

Contributors

reubengt avatar mkatenolan avatar georgiamshaw avatar frannyfra avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.