Zap Search
An ambitious web app for filtering and viewing NYC land use application records stored in DCP's Zoning Application Portal (ZAP).
Development Setup
1. Install prerequisite tools
2. Install frontend and backend packages
> git clone https://github.com/NYCPlanning/labs-zap-search
> cd labs-zap-search
> yarn
> cd labs-zap-search/client
> yarn
> cd labs-zap-search/server
> yarn
3. Set up SSL and environment files
-
Clone this repo and follow the steps in its README: https://github.com/NYCPlanning/local-cert-generator
-
Note that Step 1 generates two files in the
local-cert-generator
repo:server.key
andserver.crt
. Later, you will need to copy/paste these files into thelabs-zap-search
repo to run the application. -
Open up your hosts file on your machine with admin permissions:
/etc/hosts
. For example,sudo vim /etc/hosts
-
Navigate into the
server
folder.- Create the
development.env
file using variables stored on 1Password. - Copy the
server.key
andserver.crt
files from yourlocal-cert-generator
repo and paste both files into thelabs-zap-search/server/ssl/
folder.
- Create the
-
Navigate into the
client
folder.- Copy the
server.key
andserver.crt
files from yourlocal-cert-generator
repo and paste both files into thelabs-zap-search/client/ssl/
folder.
- Copy the
One-click startup
At the root of this project, run
yarn run start
This will spin up both the frontend (in the /client
folder) and the server API (in /server
).
Frontend and Backend Documentation
- See ./client/ for more docs on running and modifying the frontend
- See ./server/ for more docs on running and modifying the server side API
Maintenance Mode
To enable "maintenance mode", set two environment variables in the frontend (Netlify) build environment:
MAINTENANCE_START='06/28/2021 19:00' MAINTENANCE_END='06/29/2021 19:00'
Use the date format in the example above. This will warn of upcoming maintenance (if the start date is in the future), disable the login, and disappear once the end period has passed.