Demo shopping cart app with JSON data source. Implemented with React.
- Chrome browser
- Node.JS with NPM
- Compass (http://compass-style.org/install/)
- Bower and Gulp -
npm install -g bower gulp
npm install
bower install
Tests are under /test/specs/
The application is built out of React components:
home
- Homepage, only used for the layoutproduct-list
- List all products grabbed from the JSON data sourceproduct-item
- Product component handling shopping basket interactionproduct-offer
- Separate component for offers to allow easy HTML and layout customisation for offers
basket
- The shopping basket component, used to interact with the JSON-based products listbasket-item
- Component for each item in the basket, handling custom actions
The server interaction and caching are implemented by the following services:
product-service
- Gets and caches the products from the serverbasket-service
- Handles client-side shopping basket operations
The server architecture is standard:
react
for React core and pluginsbabel
for ES6 compilationgulp
for running tasks- Gulp plugins for asset management and dev server; most important are:
gulp-ruby-sass
for Compass compilationbrowserify
andwebpack
for JS bundle handling
jasmine
as the testing frameworkkarma
for running the testskarma-chrome-launcher
for Chrome integration