├── .DS_Store ├── .babelrc ├── .gitignore ├── README.md ├── build ├── 0e580e67be8a3b6ebbf9d86c8aaa8d2a.png ├── 1224df28b563a24db6e0b28b8474b92f.jpg ├── 18ba1edb08c3fd06bbd9a632b6b4c1e8.png ├── 21399b158594809d52143db5aa9f2103.png ├── 2394325cd5b49f4408ba405ab141a65f.png ├── 27a823b4db6a3887939b8ca13e93a9ce.png ├── 3833b10aaf4f759077a298d0d7403638.png ├── 44fbafab856b1bbbcb2ea2ddacf0b6fc.png ├── 5879a2b101181aca65325f5a324645a4.png ├── 5e09e50a4635837c69fae9bb25272837.png ├── 607c9a20272b0641c13677031aeaa299.png ├── 704b2a661651d68357b8a23790f641d8.jpg ├── 7e368262bc5c8aeeab43b5a42b62fa2e.png ├── 85b152bdef81faf0a8924402c3d45906.png ├── 966e694f319a1af094226cfcea1ca494.png ├── 9b265eaca9077a672715b752b12d263e.jpg ├── 9cddd9b8b29ba081118d3dd8bbe1b1a5.png ├── bundle.js ├── c1673d749fb2d8923ba9314ac7e064aa.jpg ├── c71949613dbd1370d3b7f3060d4f4321.png ├── c99361c907164e19d43871c266f845ba.png ├── de3202549938e0da08bbfa5ed4bfe826.png ├── e4be91febd0cf414572e63d3e547d23a.png ├── f45313d2be8227dee9125c4c0c416d05.png ├── fa8e8b9f850f8e5325935dab7464d076.png ├── ff53116ba31947a1dc48fb5a88c9d4b5.png └── index.html ├── client ├── .DS_Store ├── App.js ├── App.scss ├── App.test.js ├── __mocks__ │ └── styleMock.js ├── __tests__ │ └── Placeholder-test.js ├── actions │ ├── ActionType.js │ └── index.js ├── api │ └── itemApi.js ├── components │ ├── Alert.component.js │ ├── Cart.component.js │ ├── Footer.component.js │ ├── Header.component.js │ ├── Home.component.js │ ├── Navbar.js │ ├── Placeholder.js │ ├── Product.js │ ├── Productdetails.component.js │ ├── Products.component.js │ └── Sidebar.component.js ├── css │ ├── responsive.scss │ └── style.scss ├── images │ ├── add_1.png │ ├── advertise.png │ ├── ae.png │ ├── arrival_icon.png │ ├── arrow_left.png │ ├── arrow_right.png │ ├── best_sellers.png │ ├── black_bg.jpg │ ├── blue_bg.png │ ├── chat_icon.png │ ├── combo_icon.png │ ├── creat_account_button.png │ ├── delta.png │ ├── desktop.ini │ ├── down_arrow.png │ ├── email_submit_button.png │ ├── facebook.png │ ├── full_star.png │ ├── grey_bg.png │ ├── grey_plus.jpg │ ├── half_star.png │ ├── header_bg.png │ ├── header_shadow.png │ ├── home_banner_bg.jpg │ ├── icon_1.png │ ├── icon_2.png │ ├── icon_3.png │ ├── inner_banner_bg.jpg │ ├── inner_header_bg.png │ ├── light_grey_bg.png │ ├── linkedin.png │ ├── location_icon.png │ ├── location_icon_red.png │ ├── login_icon.png │ ├── logo.png │ ├── man_icon.png │ ├── man_location_icon.png │ ├── map.jpg │ ├── mc.png │ ├── mestro.png │ ├── minus.png │ ├── nav_button.png │ ├── new_product_1.jpg │ ├── null_star.png │ ├── patch.png │ ├── payment_option.png │ ├── paypal.png │ ├── percentage_icon.png │ ├── pink_bg.png │ ├── plus.png │ ├── protx.png │ ├── react-redux-cart-1.png │ ├── react-redux-cart-2.png │ ├── react-redux-cart-3.png │ ├── react-redux-cart-4.png │ ├── react-redux-cart-5.png │ ├── red_bg.png │ ├── right_arrow.png │ ├── sage-pay.png │ ├── sample_add.png │ ├── sample_add_2.png │ ├── sample_image.jpg │ ├── search_button.png │ ├── search_icon.png │ ├── shadow_bottom.png │ ├── shop_icon.png │ ├── shopping_icon.png │ ├── small_product.png │ ├── step_1_icon.png │ ├── step_2_icon.png │ ├── step_3_icon.png │ ├── step_4_icon.png │ ├── step_bg.png │ ├── temp_sellers.png │ ├── transparent_bg.png │ ├── twitter.png │ ├── urkirana_white_logo.png │ ├── user_icon.png │ ├── visa-2.png │ ├── visa.png │ ├── whats_new.png │ ├── white_bg.png │ ├── yellow_rubbin.png │ └── youtube.png ├── index.html ├── index.js ├── index.scss ├── reducers │ ├── cartReducer.js │ ├── defaultState.js │ ├── detailReducer.js │ ├── homeReducer.js │ ├── index.js │ └── itemReducer.js ├── registerServiceWorker.js └── store │ └── configureStore.js ├── package.json ├── server ├── database.js ├── index.js ├── model │ └── products.js └── routes.js └── webpack.config.js /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/.DS_Store -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015", "stage-2", "react"], 3 | "env": { 4 | "development": { 5 | "plugins": ["react-hot-loader/babel"] 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | client/dist/bundle.js 3 | jest_0 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # React Ecommerce add to cart with redux and express api 2 | 3 | Ecommerce add to cart functionality reactjs with router. 4 | 5 | #### Concepts used in this POC 6 | - Debouncing to optimized rest api calls 7 | - Infinite scrolling with the help of debounce. [Underscore Debounce](http://underscorejs.org/#debounce) 8 | - Lazy loading of images while scrolling. [React-lazyload](https://github.com/jasonslyvia/react-lazyload) 9 | 10 | #### Software Stack 11 | 12 | - [ReactJs](https://reactjs.org/) 13 | - [Underscore](http://underscorejs.org/#debounce) 14 | - [React lazyload](https://github.com/jasonslyvia/react-lazyload) 15 | - [Axios for HTTP calls](https://www.npmjs.com/package/axios) 16 | - [Webpack](https://www.npmjs.com/package/webpack) 17 | #### Screen-shots 18 | 19 | 20 |  21 | 22 |  23 | 24 |  25 | 26 |  27 | 28 |  29 | 30 | #### Installation 31 | 32 | ``` 33 | $ npm install 34 | $ npm start 35 | ``` 36 | 37 | #### Development with Live reloading 38 | 39 | ``` 40 | $npm run dev 41 | ``` 42 | 43 | #### Todos 44 | 45 | - Write Unit Test cases. 46 | 47 | #### Demo and Tutorial: 48 | 49 | [THENEXTFACT Tutorial: How to create shopping cart in react redux](http://www.thenextfact.com/?p=588&preview=true) -------------------------------------------------------------------------------- /build/0e580e67be8a3b6ebbf9d86c8aaa8d2a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/0e580e67be8a3b6ebbf9d86c8aaa8d2a.png -------------------------------------------------------------------------------- /build/1224df28b563a24db6e0b28b8474b92f.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/1224df28b563a24db6e0b28b8474b92f.jpg -------------------------------------------------------------------------------- /build/18ba1edb08c3fd06bbd9a632b6b4c1e8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/18ba1edb08c3fd06bbd9a632b6b4c1e8.png -------------------------------------------------------------------------------- /build/21399b158594809d52143db5aa9f2103.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/21399b158594809d52143db5aa9f2103.png -------------------------------------------------------------------------------- /build/2394325cd5b49f4408ba405ab141a65f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/2394325cd5b49f4408ba405ab141a65f.png -------------------------------------------------------------------------------- /build/27a823b4db6a3887939b8ca13e93a9ce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/27a823b4db6a3887939b8ca13e93a9ce.png -------------------------------------------------------------------------------- /build/3833b10aaf4f759077a298d0d7403638.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/3833b10aaf4f759077a298d0d7403638.png -------------------------------------------------------------------------------- /build/44fbafab856b1bbbcb2ea2ddacf0b6fc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/44fbafab856b1bbbcb2ea2ddacf0b6fc.png -------------------------------------------------------------------------------- /build/5879a2b101181aca65325f5a324645a4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/5879a2b101181aca65325f5a324645a4.png -------------------------------------------------------------------------------- /build/5e09e50a4635837c69fae9bb25272837.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/5e09e50a4635837c69fae9bb25272837.png -------------------------------------------------------------------------------- /build/607c9a20272b0641c13677031aeaa299.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/607c9a20272b0641c13677031aeaa299.png -------------------------------------------------------------------------------- /build/704b2a661651d68357b8a23790f641d8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/704b2a661651d68357b8a23790f641d8.jpg -------------------------------------------------------------------------------- /build/7e368262bc5c8aeeab43b5a42b62fa2e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/7e368262bc5c8aeeab43b5a42b62fa2e.png -------------------------------------------------------------------------------- /build/85b152bdef81faf0a8924402c3d45906.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/85b152bdef81faf0a8924402c3d45906.png -------------------------------------------------------------------------------- /build/966e694f319a1af094226cfcea1ca494.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/966e694f319a1af094226cfcea1ca494.png -------------------------------------------------------------------------------- /build/9b265eaca9077a672715b752b12d263e.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/9b265eaca9077a672715b752b12d263e.jpg -------------------------------------------------------------------------------- /build/9cddd9b8b29ba081118d3dd8bbe1b1a5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/9cddd9b8b29ba081118d3dd8bbe1b1a5.png -------------------------------------------------------------------------------- /build/c1673d749fb2d8923ba9314ac7e064aa.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/c1673d749fb2d8923ba9314ac7e064aa.jpg -------------------------------------------------------------------------------- /build/c71949613dbd1370d3b7f3060d4f4321.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/c71949613dbd1370d3b7f3060d4f4321.png -------------------------------------------------------------------------------- /build/c99361c907164e19d43871c266f845ba.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/c99361c907164e19d43871c266f845ba.png -------------------------------------------------------------------------------- /build/de3202549938e0da08bbfa5ed4bfe826.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/de3202549938e0da08bbfa5ed4bfe826.png -------------------------------------------------------------------------------- /build/e4be91febd0cf414572e63d3e547d23a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/e4be91febd0cf414572e63d3e547d23a.png -------------------------------------------------------------------------------- /build/f45313d2be8227dee9125c4c0c416d05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/f45313d2be8227dee9125c4c0c416d05.png -------------------------------------------------------------------------------- /build/fa8e8b9f850f8e5325935dab7464d076.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/fa8e8b9f850f8e5325935dab7464d076.png -------------------------------------------------------------------------------- /build/ff53116ba31947a1dc48fb5a88c9d4b5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/navjotdhanawat/react-redux-express-cart/399cf2795b75826ef99d8b034708e7973d5eac6b/build/ff53116ba31947a1dc48fb5a88c9d4b5.png -------------------------------------------------------------------------------- /build/index.html: -------------------------------------------------------------------------------- 1 |