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.
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
].
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
}
Install dependencies:
$ npm install
And build:
$ npm run build:production
Output directory is ./dist
To run the tests, first start app using npm start
, then run npm test
.
Unit tests use the Jest test platform. The tests are in directory ./test/
.
Run unit tests:
$ npm test:unit
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
For web analytics, performance metrics and insights on best practices:
$ npm run test:lighthouse:audit
For web security analytics:
$ npm run test:lighthouse:security
IE / Edge |
Firefox |
Chrome |
iOS Safari |
Samsung |
---|---|---|---|---|
Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |