Front end for Application Engineering's capital projects map.
The .nvmrc
file tells you which version of node you should be using to run the project. If you're using nvm and already have the correct version installed, you can switch by running
nvm use
from the root of this repo.
Once you have cloned this repo, install the necessary dependencies:
npm i
.env
file to point to a running instance of the Zoning APIThis project relies on data from a companion API known as the "Zoning API". You will need to set up a .env
file pointing to a URL where an instance of the Zoning API is hosted. The easiest way to do this is to clone that repo and run it locally. To do that, follow these steps:
.env
in the root folder of the project and copy the contents of sample.env
into that new file. The default value in sample.env
should set the Zoning API URL variable to the correct value for your locally running instance of Zoning APIFinally, to run this project locally:
npm run dev
This app relies heavily on data from the Zoning API backend application. It makes use of some front end libraries to make pulling data and managing the state of that data easier:
When the OpenAPI spec file for Zoning API changes, we will need to regenerate the client code in this repo. To do that, simply run npm run kubb:generate
. Kubb is configured to put all generated code in /app/gen
. Note that even though that code is generated, we do want to commit it and includes updates in PRs as necessary. A developer should never make manually changes or additions to code in the /app/gen
folder. It should be purely what is outputted by Kubb.
Unless you think the contents of the Zoning API OpenAPI spec file have changed since the last time the client code was generated, you can safely skip this step.
This application is currently configured to use Playwright for end to end testing.
Tests should be kept in the ./tests
folder and can be run with the npm run test
command.
The playwright.config
is used to configure tests and can be used to select which browsers we run our tests on, including mobile.
This repo has a Github Action workflow that allows DCP engineers to deploy feature branches to a QA environment hosted at https://qa-capitalplanning.nycplanningdigital.com/. This can be helpful for getting feedback from QA and Design staff on branches before they are merged into main
. Because this environment is shared by the team, it is recommended that you confirm with other engineers that they are not using it before deploying.
To deploy to this environment:
Once the workflow runs successfully, your branch should be deployed at https://qa-capitalplanning.nycplanningdigital.com/.