Skip to content

A Scavenger Hunt project designed to send and receive MMS/SMS clues and responses.

License

Notifications You must be signed in to change notification settings

evboggs302/Scavenger-Hunt

Repository files navigation

Scavenger Hunt CircleCI

This repo will eventually hold a scavenger hunt app that will utilize the Twilio texting service.

Production Links

Application: https://digital-scavenger-ui.onrender.com/

Storybook: https://digital-scavenger-storybook.onrender.com

Local Development - /client

  • yarn install - installs dependencies

  • yarn storybook - starts the storybook server locally

  • yarn start Runs the app in the development mode.
    Open http://localhost:3000 to view it in the browser. The page will reload with edits. You will also see any lint errors in the console.

  • yarn test starts the test suite

Local Development - /server

From the terminal in your local project:

  1. Make sure the MONGO_URI value in your .env file is accurate
  2. Go to the /server/ dir, run this command:
yarn dev

After the server is running, do the following from inside Postman:

  1. Create a collection. This will allow you to store and use collection variables

  2. make sure the below variables are set:

    • baseURL -- I have 2 of these I toggle between. One for localhost and one for my deployed server in prod
    • authToken -- This will start out as empty
  3. Create a new query in the collection

  4. In the query input field, simply put {{baseURL}}

  5. On the "Authorization" tab for that query, make the below selections:

    • Type: Bearer Token
    • Token: {{authToken}}
  6. You must run the login mutation first. Copy the token value from the response object.

  7. Go back to your collection's variables. Pase the copied token value into the field for the authToken variable.

  8. Run any query or mutation as you please!!!

.ENV example content

TWILIO_ACCT_SID=< provided by Twilio >
TWILIO_AUTH_TOKEN=< provided by Twilio >
TWILIO_NUMBER=< provided by Twilio >

# FOR LOCAL DEV ONLY - PROD VALUES SET DURING CI PIPELINE
CLIENT_URL=http://localhost:< port >
GQL_SERVER_URL=http://localhost:< port >/graphql
MONGO_URI=< constructed with MongoDB details >

SESSION_SECRET=< randomly button smash a long value >
PORT=< 5 digit number >

JWT_SECRET=< randomly button smash a long value >
ACCESS_TOKEN_SECRET=< randomly button smash a long value >
ACCESS_TOKEN_DURATION=1d
REFRESH_TOKEN_SECRET=< randomly button smash a long value >
REFRESH_TOKEN_DURATION=14d