Configuration of the client can be overridden using Environment variables as described below:
REACT_APP_CITY- Your cityREACT_APP_STATE(optional) - Your stateREACT_APP_MAILTO- Your email address for Questions and Data Privacy InquiriesREACT_APP_FORM_URL- URL for google formREACT_APP_IMAGE_SRC- URL for background imageREACT_APP_IMAGE_ATTR_NAME- Image attribution nameREACT_APP_IMAGE_ATTR_URL- Image attribution url for linksREACT_APP_API_DEV_URL- Development api base urlREACT_APP_API_PROD_URL- Production api base urlREACT_APP_WC_TAG- Web Component tag ex:avl-tipswill produce a web component with the tag<avl-tips />
- Run
npm installfrom the project root - Run
npm run build:allfrom the project root cd packages/clientnpm start
Optionally, you can update the codebase to reflect your area.
@avl-tips/codemod supplies a few codemods that can be used to update source files relative to your area. This includes the web component tags in @avl-tips/components and named imports in @avl-tips/client. Run the codemods manually to update source files for your project.
Run APP_WC_TAG_PREFIX=area npx lerna run codemod --stream where area is the name of your area
(e.g., APP_WC_TAG_PREFIX=philly npx lerna run codemod --stream, would update all instances of @avl-tips to @philly-tips).
- Setup AWS cli and have credentials capable of provisioning lamdas and S3 buckets through serverless
- Update server/serverless.yml references of
avl-tipsto a name relative to your deploy. Updateprovider.profileif your AWS credentials profile is something other thandefault. - Run
npx lerna run deploy:stagingfrom project root. - If deploying to Netlify, update the netlify.toml
REACT_APP_API_{STAGE}_URLenvironment variable.
- Provision an IAM user within AWS that has AmazonS3FullAccess permissions and no console access. Download the credentials for later.
- Upload the
server/etc/employee.jsonfile to the S3 bucket provisioned by serverless.
- Make a copy of the sheet template file
- Reload the sheet to let the script initialize its menu
- Go to
Add-ons->avl.tips scripts->Configure... - Continue through the authorization prompt
- Click
Advancedon the app not verified warning - Scroll down and select
Go to avl.tips (unsafe)(don't worry, it's safe) - Allow the access necessary for the script to function
- Back on the spreadsheet, again go to
Add-ons->avl.tips scripts->Configure... - Fill out the
App Name(this will be displayed at the top of your form) and the remaining information from the bucket setup above. This information will only be stored on the copy of the sheet that you have. - Save and wait for the script to generate your form and hook it up to the sheet and the S3 bucket.
When back on your sheet, you can edit or view your form via the Form menu and the Edit form and Go to live form selections respectively.
- Run
npx lerna run deploy:productionfrom project root. - Follow Bucket Setup steps for production bucket.