Skip to content

When the pandemic hit one of the biggest bubble tea franchises in Canada went to purely online-ordering. Stores were so overwhelmed they regularly disabled online ordering for periods of time. This app made it possible for us to survive when it seemed impossible to order.

License

Notifications You must be signed in to change notification settings

aaronbrighton/cdk-serverless-chatime-ordering-helper

Repository files navigation

cdk-serverless-chatime-ordering-helper

This CDK app deploys a series of serverless resources that allow an end-user to be notified via SMS when a Chatime store location is available for online ordering. To interface with the app the end-user sends SMS messages to a predefined Amazon Pinpoint SMS-enabled long code phone number.

  1. User -- SMS --> App: Send Canadian Postal Code (ex. M5J0A8)
  2. App -- SMS --> User: List of 3 closest Chatime store locations
  3. User -- SMS --> App: Store ID of desired store
  4. App -- SMS- -> User: Confirmation of monitoring

Another flow exists as well that happens behind the scenes that eventually results in a notification to the end-user.

Architecture

AWS Architecture Diagram

Requirements

  • AWS Account
  • Amazon Pinpoint w/ a Long code phone number with SMS enabled
  • Docker
  • Node.js
  • CDK

How to deploy

If you have any trouble following these instructions, please see CDK Workshop for necessary background knowledge.

1. Install node dependencies

yarn install

2. Configuration (cdk.context.json)

Create a cdk.context.json, and populate the Amazon Pinpoint Long code phone number as the originationNumber.

{
  "originationNumber": "+19022019412"
}

3. Deploy

yarn deploy

Once deployment has completed, you'll need to make note of the outputs.

Outputs:
chatime-notifier.smsrelaytopicoutput = arn:aws:sns:us-east-1:5************7:chatime-notifier-smsrelaytopic8589A353-BQ07VKBG82DL

4. Update Amazon Pinpoint to route SMS messages to the deployed SNS topic

In the AWS Management Console head over to Amazon Pinpoint and update the long code phone number so that Two-way SMS is enabled and the SNS topic is set to the output from the deployment above. See the following for an example:

Amazon Pinpoint Two-way SMS

About

When the pandemic hit one of the biggest bubble tea franchises in Canada went to purely online-ordering. Stores were so overwhelmed they regularly disabled online ordering for periods of time. This app made it possible for us to survive when it seemed impossible to order.

Resources

License

Stars

Watchers

Forks