- JavaScript
- React
- CSS
- JSX
- Markdown
Build an application in React that tracks inventory for a local business. We're going to keep this simple: you'll pick one inventory item and track how much of it is remaining as it gets sold or given away. There are a lot of themes to choose from, and you can create your own as long as you're able to track the remaining amount of an inventory item and meet the objectives.
Here's the challenge: build a react web app that has create-read functionality and can "sell" 1lb of beans at a time and keep tract of inventory.
Link to assignment: https://epicenter.epicodus.com/courses/969/code_reviews/6777
At our coffee shop, we sell coffee beans in 1-pound servings, and we get our coffee delivered in large burlap sacks. Here are the details:
- we sell multiple types of coffee beans, each in different burlap sacks
- one burlap sack contains 130 pounds of coffee beans
- every sale decrements one pound of coffee beans from the burlap sack, until it is empty
Before getting started, plan out your application and draw a component tree or component diagram that shows the structure of your components. This is a requirement for the project and should be included in your README. You may draw the structure on a piece of paper and take a picture of it or use an application like https://www.draw.io/.
Final Diagram: https://photos.app.goo.gl/aWKYPZddRtX6NuPL9 Handwritten Notes: https://photos.app.goo.gl/vVQw6zMUGCwdKPVSA
You are only expected to add CREATE and READ functionality, though you are welcome to implement full CRUD. Here are some user stories to get you started. The application should have the following functionality:
- As a user, I want to see a list/menu of all available types of coffee beans.
- For each item, I want to see its name, origin, price, and roast (light, medium, or dark) of the coffee bean. (You are welcome to include anything additional that is relevant to the product your store carries.)
- As a user, I want to submit a form to add a new burlap sack of coffee to the inventory.
- As a user, I want to be able to click on a burlap sack to see its detail page.
- As a user, I want to see how many pounds of coffee beans are left in a burlap sack. A burlap sack has roughly 130 pounds.
- As a user, I want to be able to click a button to sell a pound of coffee beans. This should decrease the number of pounds left by 1. The number of pounds in a sack of coffee beans should not be able to go below 0.
- clone or download responsitory to your local
- cd into Cafe Roaster and run npm install
- npm run build
- npm run start
- Weight cannot be decremented and code has largely been commented out. I have kept it in my project so that I can attempt to fix it in the future.
- Styling is inconsistently applied as I was experimenting and playing with how to design in react.
- MIT
Please contact me with any questions or contribuitions, [email protected]
Copyright(c) July 2022 Ashe Urban
// The Below content is auto-generated when using Create React App
This project was bootstrapped with Create React App.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
The page will reload when you make changes.
You may also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Note: this is a one-way operation. Once you eject
, you can't go back!
If you aren't satisfied with the build tool and configuration choices, you can eject
at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject
will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
You don't have to ever use eject
. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify