Code Monkey home page Code Monkey logo

ikeacatalogue's Introduction

IkeaCatalogue

A simple search engine interface for Ikea products catalogue, which utilizes Import.IO API for data querying.

Installation

  1. Ensure that NodeJS is installed. This provides the platform on which the build tooling runs.
  2. From the project folder, execute the following command:
npm install
  1. Ensure that Gulp is installed. If you need to install it, use the following command:
npm install -g gulp
  1. Ensure that jspm is installed. If you need to install it, use the following command:
npm install -g jspm

Note: jspm queries GitHub to install semver packages, but GitHub has a rate limit on anonymous API requests. It is advised that you configure jspm with your GitHub credentials in order to avoid problems. You can do this by executing jspm endpoint config github and following the prompts.

  1. Install the client-side dependencies with jspm:
jspm install -y

Note: Windows users, if you experience an error of "unknown command unzip" you can solve this problem by doing npm install -g unzip and then re-running jspm install.

  1. To run the app, execute the following command:
gulp watch
  1. Browse to http://localhost:9000 to see the app. You can make changes in the code found under src and the browser should auto-refresh itself as you save files.

Unit tests

To run the unit tests, first ensure that you have followed the steps above in order to install all dependencies and successfully build the library. Once you have done that, proceed with these additional steps:

  1. Ensure that the Karma CLI is installed. If you need to install it, use the following command:
npm install -g karma-cli
  1. Install Aurelia libs for test visibility:
jspm install aurelia-framework
jspm install aurelia-http-client
jspm install aurelia-router
  1. You can now run the tests with this command:
karma start

Project description

This application utilizes https://github.com/import-io/client-js-mini to query the ImportIO API, and obtain the data about Ikea products. It requires providing your User Guid and API Key to perform the query, as well as the Connector Guid that will be used to search for data. The connector that will be utilized has to first be trained for Ikea data.

I thought about utilizing https://github.com/import-io/client-js to create a standalone application, that doesn't require authentication, and just performs the queries, with backend server for signing them, but there two main problems with that.

  • Full client-js library is cumbersome to connect though JSPM, as it doesn't expose the fully built version of the library at the moment, and JSPM by default does not allow script concatenation. It probably could be done by utilizing a Gulp script for scripts concatenation, but second point stopped me from experimenting with it more.
  • Because of time constrains I didn't want to create a full blown application, that would allow performing signed queries, as this would require securing the possibility of making unauthorized queries, by authenticating users, or parsing query data on the server side. Instead I wanted to focus on ImportIO API utilization.

There is also a server side express application, that allows signing queries, based on provided userGuid and API Key in the config file. To run this application, first run:

npm install

and next

npm start

This will run the express application at port 3000, and will allow to send POST requests expecting a "query" parameter sent in the body, which will contain the query to be signed. In response it will return the digest constructed after signing the query.

ikeacatalogue's People

Contributors

domderen avatar

Stargazers

Chris Lohmann avatar Zaeburn Mercer avatar Angus H. avatar Kevin Granger avatar

Watchers

James Cloos avatar

Forkers

litterfeldt

ikeacatalogue's Issues

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.

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.