Giter Club home page Giter Club logo

purple's Introduction

Display customer’s available products

As a customer, I want to select the products that are available to me, based on the location of my home.

Build & Run

Catalogue Service

First start up the Catalogue Service.

  1. Change into the catalogue-service directory
  2. Install dependencies with npm install
  3. Start the service with npm start
Product Selection Client

In another terminal, start the client.

  1. Change into the project root directory
  2. Install dependencies with npm install
  3. Start the client with npm start
  4. If it does not open automatically, open http://localhost:3000 in a web browser
  5. Change location by editing the customerID cookie

Testing

Simply run npm test in either the project root directory or in the catalogue-service directory.

Future Improvements

Catalogue Service
  • Contract testing to ensure that the service complies with the agreed-upon schema
  • Setup Docker to run this and any future services
  • GraphQL would be nice, probably overkill though
Product Selection Client
  • Behavioural tests using CasperJS would automate testing of user journeys
  • Do something about Unhandled Rejection Errors
    • Rejected promises dispatch GET_LOCATIONID_REJECTED or FETCH_PRODUCTS_REJECTED actions which update the state with the given error, but the actual promise rejection is not handled, leading to errors in the developer console
    • Generally better error handling when making service calls would be good, including showing something to the user
  • Dynamically generate product lists based off category, rather than having hard-coded News and Sports lists

purple's People

Contributors

fusionfox avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.