Walmart Take Home Challenge
https://gist.github.com/daniyalzade/8e32cd266aebd6d2ce35
Challenge;
For a list of ids;
- retrieve data from Walmart API - and store
- create a simple REST service to serve data
- create a simple react frontend to browse
To Run
Prerequisites; (developed with)
- node v10.10
- npm v6.4.1
- expects ports 3000, 3088 to be unused
- in the import directory - run;
node import.js; node translate.js
- in the api directory - run;
node server.js
-- api running on http://localhost:3088/
- in the front end directory - run;
npm start
-- browser should start and point to http://localhost:3000/
Approach
See the "issues" tab, each commit was tagged against an issue, each issue was broken down into sub-tasks.
I didn't follow a git branching strategy (working within a team would do that), merged against master.
Follow up work
KNOWN BUGS
- data - lots of stop words not removed
- data - didn't clean up html encoding so ""'s" common
- react app - flash of prior products on starting to type in search box
If this was a "real world" project:
- data would be in a database, search would be performed in the database
- tests would be more extensive both on backend and frontend
- Hapi API would be created in a more modular fashion, each route in a separate file or plugin.
- HTTPS - everywhere.
- the react app is a simple demo, again each component in it's own file, look at if redux would be a better choice for state, add bootstrap or whatever UI/UX framework is chosen.
- lots of work to productionize all of this! SLIs, SLOs defined and implemented, config from env vars of etc'd, hooking into CI/CD
- and lots more...
Results