- Redux handles the state management of the app. For more info check their awesome docs.
- React handles the rendering of the 'views'.
- react-redux is used to connect the Redux Store to React components.
- reselect is used for getting data from Redux Store and manipulating it to be better usable in React components.
- webpack takes modules with dependencies and generates static assets representing those modules.
- Babel transforms JavaScript written in ES2015 and JSX syntax to regular JavaScript.
Follow the instructions below to set up the development environment.
By default the running app can be found at localhost:3000
.
-
Install npm dependencies:
$ npm install
-
Make sure you have the following env variables set in an .env file in the root of the project:
CLIENT_ID CLIENT_SECRET SESSION_SECRET TARGET_APP
-
Start the development server:
$ npm start
Follow the instructions below to build the production bundle.
-
Install npm dependencies:
$ npm install
-
Build the production bundle:
$ npm run build
-
Run tests:
$ npm test
-
Run tests in watch mode:
$ npm run test:watch
-
Run tests with coverage:
$ npm run test:coverage
-
To check the code for linting errors:
$ npm run lint
The code mostly follows the Airbnb JavaScript Style Guide. All JavaScript should be written in ES2015 syntax. Code is automatically linted with eslint when running unit tests or bundling the app with webpack.
Less CSS pre-processor is used to make writing styles nicer. Autoprefixer handles CSS vendor prefixes. Bootstrap is used as the CSS framework for the site and City of Helsinki Bootstrap theme is used as the main theme.
- Karma is used to run the tests. On local machines tests are run on PhantomJS to make running tests in watch mode as smooth as possible. On CI the tests are run on Chrome.
- Mocha is used as the test framework.
- Chai is used for test assertions.
- simple-mock is used for mocks and spies.
- Enzyme is used to make testing React Components easier.