Code Monkey home page Code Monkey logo

hello-retail's Introduction

Hello, Retail! Build Status

Hello, Retail! is a Nordstrom Technology open-source project. Hello, Retail! is a 100% serverless, event-driven framework and functional proof-of-concept showcasing a central unified log approach as applied to the retail problem space. All code and patterns are intended to be re-usable for scalable applications large and small.

Check out https://github.com/Nordstrom/hello-retail-workshop for more explanation and a guided tour of how you might expand hello-retail with new functionality.

Usage

If you are responsible for deploying this system, you'll want to do the following:

Pre-Deploy Action & Configuration

  1. Create an encryption key for use with KMS (IAM > Encryption keys, select your target region, Create Key)

  2. Create a Twilio account, open your "Account Settings" and create a secondary auth token for use by the hello-retail system

  3. Encrypt your Twilio account's SID and also the Secondary Auth Token with the encryption key created in step 1 and place them into your private.yml:

twilio:
  accountSid: ABC[...]==
  authToken: DEF[...]==

this can be done easily using the "encryption helpers" capability in the Lambda console. Alternatively, the following AWS CLI command should do the trick:

aws kms encrypt --region <region> --key-id <keyId> --plaintext <accountSid> --output text --query CiphertextBlob
aws kms encrypt --region <region> --key-id <keyId> --plaintext <authToken> --output text --query CiphertextBlob
  1. Purchase a Twilio number and add it to your private.yml:
twilio:
  <stage>: +12345678901 # full `+<countryCode>` and 10 digit number
  1. Create an Login with Amazon account to add authentication and identity using oAuth.

  2. In the Login with Amazon Developer Center -> Sign into the App Console -> Register new application button. Fill out requested information about the application.

  3. Copy the Application ID to the private.yml in the property loginWithAmazonAppId and the Client ID to the property loginWithAmazonClientId:

# Login with Amazon
loginWithAmazonClientId: amzn1.application-oa2-client.0c5b13fba4be0ae5b7c1816481fc93a
loginWithAmazonAppId: amzn1.application.0bfd7ce688a440a1a0a1ad215923053e1
  1. Expand Web Settings and click the Edit button.

  2. In the Allowed JavaScript Origins enter the Fully Qualified Domain Name for your hosted websites, e.g. https://<stage>.<example.com> where stage will be the name of the stage web application when deployed, and example.com is the registered domain name. Local development requires that https://localhost:7700 is allowed as an origin. This application does not employ return URLs. Once the list of origins is complete, click "Save".

Deploy

To deploy the entirety of the project, execute the following from the repository's root directory:

npm run root:install:all
npm run root:deploy:all

If an errors occur, troubleshoot, resolve, and resume deployment.

Post-Deploy Action & Configuration

  1. Add the following roles as "Key Users" of the encryption key created in step 1 of the "Pre-Deploy Action & Configuration" section
  • <stage>ProductPhotosMessage1
  • <stage>ProductPhotosUnmessage1
  • <stage>ReceiveRole1
  1. Note the ServiceEndpoint output from the execution of npm run photos:deploy:5. Alternatively, inspect or describe the stack hello-retail-product-photos-receive-<stage> and note the ServiceEndpoint output. This value will look like https://<apiId>.execute-api.us-west-2.amazonaws.com/<stage>. Open the phone number configuration page for the Twilio number that you purchased and set the Messaging Webhook (use defaults "Webhooks/TwiML", "Webhook", and "HTTP POST") value to that value with a /sms appended to it (e.g. https://<apiId>.execute-api.us-west-2.amazonaws.com/<stage>/sms). It may be helpful to note the stage name in the "Friendly Name" field as well. Then save those configuration changes.

  2. Enable TTL on the table <stage>-hello-retail-product-photos-data-PhotoRegistrations-1 using the attribute timeToLive

hello-retail's People

Contributors

ashleyqw avatar erikerikson avatar gmfinear avatar gwsii avatar laurwang avatar nanxiliu avatar robgruhl avatar sainap avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.