Human resources for the employee. A full-stack application built in React and Express with a Postgres database.
You can find a live version at https://determined-jackson-84767e.netlify.com/
- Make sure to name all of your files starting with a lower cased letter. This is important for Travis CI, so be sure to name your components
likeThis
and notLikeThis
.
- Clone this repository
- Run
npm install
- cd into the "backend" directory, install required packages, seed database, and start the server
cd backend
npm install
psql < data.sql
nodemon server.js
This will start the server on port 3001
- cd into the "frontend" directory, install required packages, then start the app
cd frontend
npm install
npm start
This will run the app on http://localhost:3000
First, to locate AWS credentials from s3.console.aws.amazon.com, click on account name in the nav bar and click on "My Security Credentials". The keys will be located on the following page in the "Access Keys" section.
In terminal:
code ~/.bash_profile
Then copy/paste the following: export S3_BUCKET="bucketname" // The name of your S3 bucket where you want files to be stored export AWS_ACCESS_KEY_ID="ABCDEFG1HIJ234EXAMPLE" export AWS_SECRET_ACCESS_KEY="SnOSfS1y1ijSSSqneSSS1g+SStsS+EXAMPLE+PO"
After writing, saving and exiting, close and restart terminal for the change to take effect.
To access the admin panel in development, login with the following credentials.
email
[email protected]
password
secret
Backend tests are configured to run in band and silent. Run jest --runInBand
to see all error messages printed to console.
cd backend
npm test
cd frontend
npm test
Coverage:
npm test -- --coverage --watchAll=false
-
Create Calendly account. Note: for the live app Alex will create a single admin/team account to use for configuring the webhook. Each professional (e.g., lawyer, financial advisor, etc) will create their own account, which is associated with the team account. This allows the admin to have an overview of all calendars and each professional to manage their schedule (e.g. set available times for appointments) independently.
-
Follow instructions in Calendly developer guide.
- One approach is to use Insomnia to create a webhook subscription.
- Once the app is deployed to Heroku (or another live server), use the live URL to create the webhook subscription.
- Before deployment and/or for local testing, using localhost, the webhook endpoint must be configured as "/" -- see comment on line 11 of /backend/routes/calendlyWebhook -- and then follow local testing instructions below.
- Install ngrok
- Start local backend server (installation instructions above)
- Start ngrok
./ngrok http 3001
- Use Insomnia to create webhook subscription with your personal Calendly account
- Front end workflow TBD...
- restart local server AND ngrok every time you make a change to code
- establish new webhook with Calendly (via Insomnia); update ngrok URL in the new POST request
- continue testing