Skip to content

Instantly share code, notes, and snippets.

@matt-winzer
Last active June 12, 2020 14:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matt-winzer/5e38602039498e6c90317e83087f39cf to your computer and use it in GitHub Desktop.
Save matt-winzer/5e38602039498e6c90317e83087f39cf to your computer and use it in GitHub Desktop.

Mini Apps Review - Grocery List Build/Burn

Here are modified objectives and resources for re-building the grocery list project.

Objectives

  • Get situated with project in general
  • Diagram React component hierarchy
    • Identify where state should live and what props should be passed
  • Create a basic React client
    • index.js that renders an App component into the DOM
  • Create basic express server
    • Serve front-end
    • Use middleware
  • Create a MySQL database
    • Practice creating ERDs (Entity Relationship Diagrams)
    • Practice writing schema
    • Practice writing seed data
  • Establish connection from server to DB
  • Implement GET all groceries functionality
    • Create GET route in express server
      • Communicate with DB to get all items in the table
    • Test with Postman
    • Fetch data in App component
      • Load into state of application
    • Create additional react components to dynamically render groceries
      • Pass groceries data from state as props
  • Implement POST new grocery item functionality
    • Create POST route in express server
      • Communicate with DB to insert new item into the table
    • Test with Postman
    • Create form react component
      • Properly control inputs in form component
    • On submission of form, send POST request to server
      • Update state of application when POST succeeds

Stretch Goals

  • Allow user to mark individual items as complete and remove them from the list
    • DELETE route
    • Update state after successful removal
  • Allow user to edit the name/quantity of individual items
    • PUT route
    • Update state after successful edit
  • Refactor server code to be more modular
    • Routes
    • Models
    • Controllers
  • Update back-end to support adding categories to items
    • Update front-end to display categories
    • Update front-end to choose category in form

Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment