-
Install NVM
brew update brew install nvm # Follow the instructions to update your shell configuration file.
-
Install the Node version specified in
.nvmrc
nvm install nvm use
-
Enable Yarn
corepack enable
-
Add to
/etc/hosts
:::1 hmis.dev.test 127.0.0.1 hmis.dev.test
-
Install npm dependencies
yarn install
-
Run dev server with live reload
yarn dev
yarn test
yarn lint
yarn format
yarn tsc
Preview production build
yarn build && yarn preview
Use the graphql:codegen
script to update generated types.
SCHEMA_PATH=<path to schema.graphql> yarn graphql:codegen
To add or grade an NPM package, you can edit the package.json
OR run yarn add
OR run yarn upgrade
OR run yarn upgrade-interactive
.
# 1. edit package.json, or run yarn add/upgrade
# 2. download packages and update the yarn.lock
yarn install
# 3. remove duplicate packages
yarn yarn-deduplicate
# 4. always commit changes to these files
git add yarn.lock package.json
See the HMIS README in the Warehouse repo for instructions on running end-to-end tests.
The frontend communicates with the OpenPath warehouse. Once you have the warehouse development environment up, follow the steps below to configure it for HMIS.
Set these variables in hmis-warehouse/.env.local
to enable the HMIS GraphQL endpoints:
ENABLE_HMIS_API=true
HMIS_HOSTNAME=hmis.dev.test
Next, run the db seed to set up the HMIS Data Source and an HMIS Administrator user.
rails db:seed
You should see the HMIS data source here: https://hmis-warehouse.dev.test/data_sources
The above will enable the warehouse API and grant a user access to HMIS Admin in the right-rail of the warehouse UI, and the remaining configuration is done via the UI.
Use this tool to grant yourself further access by enabling additional permissions on the "HMIS Administrator" role.
The HMIS asesssment form definitions are created with the command
rails driver:hmis:seed_definitions
This must be run once to populate the database, and re-run any time the form definitions are changed.
Run this to setup custom services:
rails driver:hmis:seed_service_types
After making any change to the GraphQL schema, run this:
rails driver:hmis:dump_graphql_schema
To pick up the local schema changes on the frontend, run the graphql:codegen
script (see above).