# frontend-neighbouring-rights

This is the repo for the Orchard Suite `Neighbouring Rights` react application written in Typescript. Where possible, common suite functionality should be pulled in from the shared [Orchard Suite Packages](https://github.com/theorchard/orchard-suite/tree/master/packages).

## Requirements
Make sure you have [nvm](https://github.com/nvm-sh/nvm/blob/master/README.md) and [yarn](https://yarnpkg.com/) installed.

## Setup
Ensure you have first followed the [Javascript Package Management Setup guide](https://www.notion.so/Javascript-Package-Management-Setup-9553d5d491c94835aa787fdf0fc4838d) to setup access to our private NPM repository.

```bash
# install dependencies
yarn

# create environment configuration
cp .env.shadow .env

# start your server
yarn start
```

## Available Scripts
In the project directory, you can run:

**NOTE:**
**Running the project locally requires an active VPN connection.**

### `yarn start`
Runs the app in the development mode.
Open http://localhost:8080 to view the app in the browser.
The server will reload if you make edits.

### `yarn start --h [html config name]`
Runs the app with a named html index configuration.
eg. running `yarn start --h awal` will apply the configuration for `awal` found in the `frontend.json` file.

### `yarn test`
Runs unit and linter tests. Run this before creating a PR.

### `yarn lint`
Runs the js and css linter.

### `yarn test:unit --watch`
Runs the jest unit tests in watch mode. In watch mode type `p` to enter a filter.

### `yarn build`
Builds the app for production to the `build` folder.<br />

Note that this command is not required to run locally, it is run during the jenkins pipeline.
