This is a small React project to make it easy to visualize possible upcoming staffing scenarios and plan for multiple possible futures at once.
It does not have a database (maybe a future enhancement?) and uses Airtable for quick and dirty data storage. This means you'll need to make sure that your Airtable set up has the same tables and coluumns that the code expects.
This is a monorepo with a React app in the root and a Node Express server in the server
directory.
We are using a single package.json
to manage package dependencies for both applications. React dependences are in devDependencies
since the React app is built and served by the Express app. Regular dependencies
are for buildtime and the Node server.
nvm use
yarn install
Please check the corresponding .env.sample
to make sure you have all values defined. Examples can be found in 1Password Tandem General vault. If you need to add env vars for the React app, be sure to prefix with REACT_APP_
.
The secret keys kept in your .env variables can be any string you want. The longer you make them, the more secure they are.
To test your Forecast variables, you can run the following cUrl
request
curl -i \
-H 'Forecast-Account-Id: ACCOUNT-ID'\
-H 'Authorization: Bearer ACCESS-TOKEN'\
-H 'User-Agent: https://www.npmjs.com/package/forecast-promise' \
"https://api.forecastapp.com/whoami"
This project uses concurrently
to start the server and client at the same time. If either process fails, both will be terminated.
yarn start
To start the server and the client separately (for finer control and troubleshooting), you can run the following commands in separate terminal windows.
To start the client,
yarn start-client
To start the server,
yarn start-server
Currently being deployed to the tandem-staffing
Heroku application manually.
git push heroku main