Giter Club home page Giter Club logo

react-bubbles's Introduction

Sprint Challenge: Advanced Web Applications - React Bubbles

Topics of Unit 3

  1. testing
  2. client-side authentication
  3. hosting web apps
  4. PUT and DELETE requests.

Self-Study/Essay Questions

  • Explain what a token is used for.
  • What steps can you take in your web apps to keep your data secure?
  • Describe how web servers work.
  • Which HTTP methods can be mapped to the CRUD acronym that we use when interfacing with APIs/Servers.

Minimum Viable Product

The MVP of this project will be broken up between 2 stages. Follow each step.

Stage 1 - Authentication

Build a login form to authenticate your users.

  • Construct an AXIOS request to retrieve a token from the server. You'll use this token to interact with the API
  • Save the token to localStorage
  • Build a axiosWithAuth module to create an instance of axios with the authentication header
  • Build a PrivateRoute component and use it to protect a route that renders the BubblesPage component

Stage 2 - Consuming the API

  • When BubblePages renders, make a GET request to fetch the color data for your bubbles.
  • In ColorList.js, complete the saveEdit and deleteColor functions to make AJAX requests to the API to edit/delete data
  • Watch and enjoy as your app responds to updates in the data. Check out Bubbles.js to see how this is built.

API Documentation

  • [POST] * to /api/login: returns a token to be added to the header of all other requests. Pass in the following credentials as the body of the request: { username: 'Lambda School', password: 'i<3Lambd4' }
  • [GET] to /api/colors: returns the list of colors and their hex codes.
  • [POST] to /api/colors: creates a new color object. Pass the color as the body of the request (the second argument passed to axios.post).
  • [PUT] to /api/colors/:id: updates the color using the id passed as part of the URL. Send the color object with the updated information as the body of the request (the second argument passed to axios.put).
  • [DELETE] to /api/colors/123: removes the color using the id passed as part of the URL (123 in example).

STRETCH PROBLEMS

HTTP/Axios Stretch Problems

  • Build a form at the bottom of ColorList.js to add new colors to the colors data

Data Visualization

  • Look at Potion JS. This is the library used to display the color data
  • Play around with the data visualization happening in Bubbles.js. Have fun with this! Try different components from the library, or see if you can add props to change the UI a bit.

react-bubbles's People

Contributors

amlane avatar daveskull81 avatar dustinmyers avatar liam-mei avatar

Watchers

 avatar  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.