This project has been archived. The latest iteration of the application can be found at px-benefit-finder repo.
The BEARS (Benefits Eligibility Awareness Resources) is an interactive tool that enables the public to learn about benefits available to them depending on their life experiences. BEARS aims to simplify the experience of finding and understanding life experience based benefits, in both English and Spanish.
Currently, the supported life experiences include death of a loved one, disability, and retirement. We plan to introduce additional life experiences over time, including financial hardship, becoming a parent, recovering from a disaster, and more.
# install dependencies
$ npm install
# serve with hot reload at localhost:3000
$ npm run dev
# build for production and launch server
$ npm run build
$ npm run start
# generate static project
$ npm run generate
# federalist build
$ npm run federalist
# federalist local build
$ npm run federalist:local
# specs
$ npm run test
$ npm run test:watch
# you may want to look at additional scripts available in the package.json
For detailed explanation on how things work, check out Nuxt.js docs.
.env.txt
and renaming it to .env
. This file is already ignored in .gitignore
so you do not need to worry about committing this.npm i
to ensure you get matching npms for the branch. The best way is to stop npm run dev
, install and then start npm run dev
again.If one does not wish to use / install the build requirements on their local system, an alternative would be to use Docker. Docker is a containerization tool that allows for fresh, repeatable builds on a clean system. The artifact from a Docker build is an "image"; when that image is run, it starts a "container."
To build an image of the BEARS software, use the following command:
cd "$(git rev-parse --show-toplevel)" \
&& bash build_docker_image.bash
This will create a Docker image named "bears" that may be run as a container later.
To run a container based on the BEARS Docker Image, the following command may be used:
docker run \
--rm \
--interactive \
--tty \
--publish 3000:3000 \
bears
This will run the container in the foreground (replace the --interactive
and --tty
flags with --detach
to have it run in the background). The
--publish
flag makes it so that connection attempts to the port BEARS
runs on is accessible outside of the container (e.g., from a web browser
on the local system).
When the container is running, one may use a web browser to interact with the BEARS application at:
For systems where Docker is not installed, a Vagrantfile is provided so that the Vagrant tool may be used to start a virtual machine (VM) that has Docker installed. Note: one may need to install virtualization platform such as Virtualbox.
To start Vagrant, use the following command:
vagrant up
This will start the virtual machine in the background. This virtual
machine will have the BEARS source code copied to it as a part of
the provisioning steps performed by vagrant up
.
Once the virtual machine is running, one may connect to it using this command:
vagrant ssh
Running this command is like using ssh
to connect to a remote
system. To close the connection, use exit
or logout
normally.
Once connected to the virtual machine, use the steps listed previously to build an image of the BEARS software and run it as a container.
docker build -t bears . \
&& docker run --rm -it -p 3000:3000 bears
cSpell is set to check /locales/
and /content/
folders for both English and Spanish languages. If there are any words that need to be considered always true
, they need to be added to the word
list in the cSpell.json
file in the root of the directory.
cSpell action is currently set to work only in PRs into main
and when there is a push
on the branches that starts with content/**
.
To implement the pa11y testing locally in a containerized environment, use the following command:
cd "$(git rev-parse --show-toplevel)" \
&& docker compose up
You may use the following command to close the running containers:
docker compose down
# To run cypress tests headlessly
$ npm run cy:run:chrome
# To open Cypress Test Runner and manually run tests
$ npm run cypress:open