Skip to content
This repository has been archived by the owner on May 8, 2019. It is now read-only.
/ little-heureka Public archive

Fontend price comparator inspired by Heureka.cz

License

Notifications You must be signed in to change notification settings

kohlicekjan/little-heureka

Repository files navigation

little-heureka - Malá Heureka

Fontend price comparator inspired by Heureka.cz.

This app is PWA type, its main benefits are in reliable, fast and engaging.

The application is written in AngularJS and Bootstrap 4. As service-workers was selected Workbox.

Webpack 4 is used to build an application. With the help WebPack generating service-workers, manifest, CSP. Also compiles SASS to CSS, tree shaking and minify code.

Test platform Jest was used for unit tests, end-to-end tests are solved testing tool Cypress.

The code check is used with ESLint, Flow and stylelint.

Quick Start

Prerequisites: Node.js (>=10), npm version 6+.

Clone the little-heureka repository using git:

$ git clone https://github.com/kohlicekjan/little-heureka.git
$ cd little-heureka

Install dependencies:

$ npm install

Start the server:

$ npm start

Now browse to the app at [localhost:3000].

Configuration

The configuration files are in the ./config/. The files development.json and production.json overwrite the main configuration file default.json.

This is the default configuration:

{
  "API_URL": "http://localhost:3003",
  "PAGE_LIMIT_OFFERS": 3,
  "PAGE_LIMIT_PRODUCTS": 5,
  "LOAD_BUFFER_CATEGORY_IMAGE": 2
}

Build

Install dependencies:

$ npm install

And build:

$ npm run build:production

Output directory is ./dist

Testing

To run the tests, first start app using npm start, then run npm test.

Unit Test

Unit tests use the Jest test platform. The tests are in directory ./test/.

Run unit tests:

$ npm test:unit

End-to-End Test

Tests is written for frontend testing tool Cypress, configuration is in cypress.json. The tests are in directory ./test/integration/.

Run end-to-end tests:

$ npm run test:e2e

To manually run end-to-end tests:

$ npm run cypress:open

Web analytics

For web analytics, performance metrics and insights on best practices:

$ npm run test:lighthouse:audit

For web security analytics:

$ npm run test:lighthouse:security

Browsers support

IE / Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
iOS Safari
iOS Safari
Samsung
Samsung
Edge last 2 versions last 2 versions last 2 versions last 2 versions

Screenshot