Skip to content
This repository has been archived by the owner on Aug 8, 2019. It is now read-only.

uktrade/invest-ui

Repository files navigation

invest-ui

Invest UI

code-climate-image circle-ci-image codecov-image gitflow-image calver-image


Development

Installing

$ git clone https://github.com/uktrade/invest-ui
$ cd invest-ui
$ virtualenv .venv -p python3.6
$ source .venv/bin/activate
$ pip install -r requirements_text.txt

Requirements

Python 3.6

Redis

Configuration

Secrets such as API keys and environment specific configurations are placed in conf/.env - a file that is not added to version control. You will need to create that file locally in order for the project to run.

Here are the env vars to get you going:

DIRECTORY_FORMS_API_SENDER_ID=debug
DIRECTORY_FORMS_API_API_KEY=debug

Run the webserver

$ make debug_webserver

Run the tests

$ make debug_test

CSS development

If you're doing front-end development work you will need to be able to compile the SASS to CSS. For this you need:

$ npm install yarn
$ yarn install --production=false

We add compiled CSS files to version control. This will sometimes result in conflicts if multiple developers are working on the same SASS files. However, by adding the compiled CSS to version control we avoid having to install node, npm, node-sass, etc to non-development machines.

You should not edit CSS files directly, instead edit their SCSS counterparts.

Update CSS under version control

$ make compile_css

Session

Signed cookies are used as the session backend to avoid using a database. We therefore must avoid storing non-trivial data in the session, because the browser will be exposed to the data.

Helpful links

Related projects:

https://github.com/uktrade?q=directory https://github.com/uktrade?q=great