The product manager has tasked you with implementing the designs for the Weight Management page. The following two features need to be completed in the next sprint. Familiarize yourself with the existing codebase to see what can be re-used.
Members would like to see their recorded weight readings displayed on one page. The readings should be split up by "regular" and "irregular" to help distinguish which readings apply to them. This ensures that any readings that are not within a certain threshold (in this case, 50 lbs within the goal weight of 175 lbs) are not attributed to them (maybe a family member stepped on their scale?).
Implement the weight readings page and stay as close to the design as possible.
Members want the ability to manually add a weight reading in case their scale had a problem synchronizing.
Create a modal that allows a member to record their weight reading. The form should have proper error handling and only allow numbers to be entered.
Feel free to use any additional open source tools and/or libraries to ensure proper completion of the two features.
npm install
npm start
You're now ready to implement your solution.
The back end API is automatically started when npm start
is executed.
URL: http://localhost:9000/api
.
There is one route available that can accept both GET
and POST
requests.
GET /weights
- Retrieves all available weight readings.POST /weights
- Adds a new weight reading. All properties are required.{ id: int, value: number, dateTime: string, isIrregular: boolean }
- Are there any portions of the application that would make sense to unit/integration test?
Once complete, please delete the node_modules
directory and create a .zip
file of your code. Send the zip file to your recruiter and they will forward it to the appropriate parties.
We know engineers are a busy bunch! Thank you for taking the time to complete this challenge and we hope you enjoyed it.