This application creates a searchable, sortable, and filterable shared address book using the Google Sheets API. It was built for Misericordia's Village management staff, but can easily be forked, extended, and/or modified to meet the needs of any organization.
$ git clone [email protected]:chawes13/village-people.git
$ cd village-people
$ touch config/application.yml # see Getting Started
$ yarn start-dev
The following programs are required in order to run this application:
- Create a new Google Sheets spreadsheet
- Add column headers in Row 1 of Sheet 1 and corresponding values
- Add a single column header and values in Column 1 of Sheet 2
- Note: the header for this column must correspond to a header in Sheet 1
- Create a new Google APIs project
- Select this project and navigate to the Credentials tab
- Create a Service Account
- Create a key (
credentials.json
) for this account - Provide admin access for this service account email to the spreadsheet created in Step 1
- Clone this repo into a separate directory
- Create an
application.yml
file in./config
- Enter the following secrets based on the
credentials.json
file and spreadsheet created aboveGCLOUD_PROJECT: <project_id> GCLOUD_PRIVATE_KEY: <private_key> GCLOUD_CLIENT_EMAIL: <client_email> SPREADSHEET_ID: <spreadsheet-id (from url)> SHEET_NAME: <primary-sheet-name> FILTER_SHEET_NAME: <secondary-sheet-name>
- Run
yarn start-dev
and navigate to http://localhost:8080
These scripts are available to be executed via the command line:
yarn setup
: downloads all necessary node modules, clears the git history, and sets the name of your project.yarn start-dev
: compiles the site in development mode at a localhost URL. The site will reload when any changes are made.yarn lint
: lints the project code witheslint
. This script will be run automatically on every commit.yarn test
: runs unit tests with Jest and integration tests with Cypress. Tests can also be run individually using:yarn test:unit
yarn test:integration
yarn build
: compiles the site in production mode to the/build
folder.yarn server
: serves the contents of the/build
folder using the production server.yarn analyze-bundle
: (advanced) creates a view for inspecting bundle sizes for performance optimizations.
Environment variables will be pulled from config/application.yml
via figaro-js and injected into the code as process.env
. You can use the initializer file config/figaro.js
to customize which variables are required or hidden from the public build. This public process.env
is available on the window
and will reload on page refresh.
Note: process.env.NODE_ENV
is automatically set via the webpack mode
and cannot be overridden. In order to add environment-specific behavior that deviates from this default, you can create a custom variable (e.g. SENTRY_ENV
).