This page has an intended audience of developer team members or technical team members looking to install Form.io on their local machine. This will allow for an isolated sandbox instance for investigation and research prior to preparing pull request or code commits
Be aware that CHEFS is based on the opensource Form.io platform.
All sections in the pre requisites section must be followed in order to complete the setup of a local intrance. This includes the appropriate account requests for the API and SSO client installs.
Docker compose is the preferred method as it is an automated process for setting up your environment.
Prerequisites
Pathfinder SSO client
Common Services API Access
This service requires an IDIR account. You can open this link https://getok.nrs.gov.bc.ca/app/requestAccount to request an account after logging in with your IDIR. This will provide you with API client id and secret to the CHES and CDOGS service.
It’s not necessary to immediately obtain access to CHES and CDOGS. If you wanted to take advantage of the document generator and email service in the future then this is where you would do it.
Setup
docker-compose
Docker compose is used to quickly set up the local environment, this is not how the production environment is hosted.
***New Changes Below******
This page has an intended audience of developers and other technical team members looking to install CHEFS on their local machines for testing and development. Following this documentation will set up an isolated sandbox CHEFS instance for investigation and research prior to preparing pull requests or code commits.
CHEFS is based on the open-source Form.io platform. When using a form builder, Form.io creates a JSON schema that is used to render the forms within CHEFS as well as generate the REST API interface on the server.
Prerequisites
Request an SSO Integration from the Common Hosted Single Sign-on page in order to obtain a resource and secret that will be used for authentication when building CHEFS. View the detailed documentation about requesting the Pathfinder SSO integration.
Ensure that Docker is installed on your local machine. Using Docker allows for a quick CHEFS build on your local machine however this is not how the production environment is hosted.
Setup
Start by cloning the CHEFS source code onto your local machine and download the local.json
file below such that the directory structure follows /common-hosted-form-service/app/config/local.json
...
All the files are now configured and you can run Keycloak and PostgreSQL by opening . Start Docker, open a terminal in the /chefs_build
directory, and run the following command:
Code Block |
---|
docker compose up |
This will start up an instance for your Keycloak and PostgreSQL containers. If you don’t want to keep the terminal open, you can append a -d
to the end of the command above.
Next, open a terminal in the directory . Run the following command:/common-hosted-form-service/app
and run the following commands:
Code Block |
---|
npm install
npm run migrate
npm run seed:run
npm run serve |
This will start the process for the CHEFS API.
Open another terminal in the directory /common-hosted-form-service/app/frontend
and run the following commands:
Code Block |
---|
npm install
npm run serve |
This will start the process for the CHEFS frontend.
Additional Resources
Common Services API Access
This service requires an IDIR account. You can open this link https://getok.nrs.gov.bc.ca/app/requestAccount to request an account after logging in with your IDIR. This will provide you with an API client id and secret to the CHES and CDOGS service.
It’s not necessary to immediately obtain access to CHES and CDOGS. If you wanted to take advantage of the document generator and email service in the future then this is where you would do it.