├── .nvmrc ├── .gitignore ├── public ├── logo.png ├── item_1.png ├── item_2.png ├── item_3.png ├── item_4.png ├── item_5.png ├── item_6.png ├── item_7.png ├── item_8.png ├── item_9.png ├── screenshot.png ├── experiment_flow_sequence_diagram.jpg ├── app.css └── optimizely.min.js ├── src ├── common │ ├── actions │ │ └── index.js │ ├── reducers │ │ ├── items.js │ │ ├── index.js │ │ ├── cart.js │ │ └── optimizely_experiment_data.js │ ├── containers │ │ └── app.js │ ├── components │ │ ├── shared │ │ │ └── header.js │ │ ├── checkout │ │ │ ├── two_step_checkout │ │ │ │ ├── shipping_address.js │ │ │ │ └── billing_info.js │ │ │ ├── index.js │ │ │ ├── common │ │ │ │ ├── credit_card_form.js │ │ │ │ └── address_form.js │ │ │ └── one_step_checkout │ │ │ │ └── index.js │ │ ├── home │ │ │ ├── index.js │ │ │ ├── item_list.js │ │ │ └── item_list_item.js │ │ ├── pdp │ │ │ └── index.js │ │ └── cart │ │ │ └── index.js │ ├── store │ │ └── configure_store.js │ ├── utils │ │ ├── enums.js │ │ └── optimizely_manager.js │ ├── routes │ │ └── index.js │ └── action_creators │ │ └── index.js ├── start.js ├── server │ ├── routes │ │ ├── static.js │ │ ├── index.js │ │ ├── api.js │ │ └── views.js │ └── services │ │ ├── cart.js │ │ ├── items.js │ │ └── page_template.js ├── index.js └── client │ ├── index.js │ └── optimizely_manager.js ├── webpack.config.js ├── package.json ├── README.md └── LICENSE /.nvmrc: -------------------------------------------------------------------------------- 1 | v8.12.0 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_STORE 2 | npm-debug.log 3 | node_modules 4 | 5 | coverage/ 6 | 7 | .idea/* 8 | -------------------------------------------------------------------------------- /public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/optimizely/isomorphic-react-demo-app/HEAD/public/logo.png -------------------------------------------------------------------------------- /public/item_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/optimizely/isomorphic-react-demo-app/HEAD/public/item_1.png -------------------------------------------------------------------------------- /public/item_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/optimizely/isomorphic-react-demo-app/HEAD/public/item_2.png -------------------------------------------------------------------------------- /public/item_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/optimizely/isomorphic-react-demo-app/HEAD/public/item_3.png -------------------------------------------------------------------------------- /public/item_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/optimizely/isomorphic-react-demo-app/HEAD/public/item_4.png -------------------------------------------------------------------------------- /public/item_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/optimizely/isomorphic-react-demo-app/HEAD/public/item_5.png -------------------------------------------------------------------------------- /public/item_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/optimizely/isomorphic-react-demo-app/HEAD/public/item_6.png -------------------------------------------------------------------------------- /public/item_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/optimizely/isomorphic-react-demo-app/HEAD/public/item_7.png -------------------------------------------------------------------------------- /public/item_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/optimizely/isomorphic-react-demo-app/HEAD/public/item_8.png -------------------------------------------------------------------------------- /public/item_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/optimizely/isomorphic-react-demo-app/HEAD/public/item_9.png -------------------------------------------------------------------------------- /public/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/optimizely/isomorphic-react-demo-app/HEAD/public/screenshot.png -------------------------------------------------------------------------------- /public/experiment_flow_sequence_diagram.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/optimizely/isomorphic-react-demo-app/HEAD/public/experiment_flow_sequence_diagram.jpg -------------------------------------------------------------------------------- /src/common/actions/index.js: -------------------------------------------------------------------------------- 1 | export const ADD_TO_CART = 'ADD_TO_CART' 2 | export const CLEAR_CART = 'CLEAR_CART' 3 | export const FETCH_ITEMS = 'FETCH_ITEMS' 4 | export const GET_CHECKOUT_FLOW = 'GET_CHECKOUT_FLOW' 5 | -------------------------------------------------------------------------------- /src/common/reducers/items.js: -------------------------------------------------------------------------------- 1 | import { 2 | FETCH_ITEMS 3 | } from '../actions' 4 | 5 | export default function items(state = {}, action) { 6 | switch (action.type) { 7 | case FETCH_ITEMS: 8 | return action.payload 9 | default: 10 | return state 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/start.js: -------------------------------------------------------------------------------- 1 | // needed for babel to transpile the JSX 2 | require('babel-core/register')({ 3 | presets: ['es2015', 'react', 'stage-2'] 4 | }) 5 | 6 | const server = require('./').server; 7 | 8 | server.start((err) => { 9 | if (err) { 10 | throw err; 11 | } 12 | console.log('Server running at:', server.info.uri); 13 | }); 14 | -------------------------------------------------------------------------------- /src/common/containers/app.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Header from '../components/shared/header' 3 | 4 | export default class App extends React.Component { 5 | render() { 6 | return ( 7 |