# orchard-suite-oa-applications - fingerprint-rules module

OA Applications module that allows to create, update and delete fingerprint rules

## Prerequisites

-   Follow this guide to get your environment set up to work with private packages.
    https://www.notion.so/Javascript-Package-Management-Setup-9553d5d491c94835aa787fdf0fc4838d
-   Install nodejs version manager (nvm). https://github.com/nvm-sh/nvm#installing-and-updating

## Setup

```shell
# init environment config
cp .env.shadow .env

# install packages
yarn install
```

## Running this module

By default running `yarn start` will merge all routes for all modules and render the last module that called `initApplicationModule`.

To specify which module to load, we use the `MODULE` environment variable. This variable is mapped in the frontend.json file to the suite app configuration option `module`.
Internally suite-frontend will use that option to filter out routes not matching the module name.
In this case the module name is `fingerprint-rules`

In order to launch this module locally you must set some env vars in your `.env` file

-   `GRASS_TOKEN` - You can get your GRASS_TOKEN in this url: https://oa.qaorch.com/grasssession after logging in.
-   Ensure that the required feature flags are enabled in `USER_FEATURES`.
    To run this module, you need to enable the following flag:
    `"suite_fingerprint_account_app_oa": "enabled"`
-   Make sure you are using `graphql-gateway` instead of `graphql-router` in your by setting the following: `GRAPHQL_URL=/grass/graphql-gateway/graphql`

For local development, authentication is handled using a dedicated dev Auth0 user via the Password Grant flow, which fetches a JWT programmatically to satisfy graphql-router’s authorization requirements.
Export DEV AWS credentials to access secrets

```shell
export AWS_ACCESS_KEY_ID=your-access-key-id
export AWS_SECRET_ACCESS_KEY=your-secret-access-key
export AWS_SESSION_TOKEN=your-session-token
```
