A react application for LightSpeed shopping cart assignment.
Run yarn
or npm install
Run yarn start
Run yarn test
Run yarn build
to build the project.
- The solution built with React & ES6. It scaffolded with react app. The choice of the framework is based on our last discussion.
- The react bootstrap used for building the overal UI.
- The main application pages consists of Cart page, Product List page, and Product Details page.
- The goal was to reuse common functions, business logic, and components of the app. To fulfill that, the folder structure is as follow:
- components: This folder keeps shared components. They only use as presentation components. There is no handling of states or accessing services.
- pages: Pages are more sophisticated/rich components and they have states and they can access services to render a complete page.
- templates: Template is a simple hoc which wraps a Page component and returns a new component/page. In our case, we have a default template which provides app navigation and shopping cart icon.
- services: It keeps all the application services. There is a simple implementation of IOC pattern for services to keep them decoupled.
- functions: It keeps commonly used functions.
- styles: It keeps the common styles elements. In our case, it only keeps the variables.