Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.
/ barista-lite Public archive

☕️ Basic Twilio Barista implementation for blog post

Notifications You must be signed in to change notification settings

dkundel/barista-lite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twilio Barista Lite

This is a basic version of Twilio Barista to explain the basic concept.

Requirements

Setup

1. Download and install dependencies

git clone https://github.com/dkundel/barista-lite.git
cd barista-lite
npm install

2. Install Twilio Functions

a) Create a Twilio Sync Service and copy the SID

b) Configure the following variables in your Twilio Functions section:

  • Enable ACCOUNT_SID and AUTH_TOKEN
  • Set API_KEY and API_SECRET to a valid pair. You can generate them in the Twilio Console
  • Set SERVICE_SID to the SID of your Sync Service
  • Set PHONE_NUMBER to the phone number or Messaging Service SID that you want to use to send notification SMS

c) Create three Twilio functions out of the three files in the twilio-functions folder

d) Configure the Function in your Studio flow to point against the create-sync-item function and make sure it passes trigger.message.From as phoneNumber and trigger.message.Body as order.

e) Set the webhook URL of your Sync Service to the URL of your sync-update-handler function

f) Copy the URL of your barista-token URL and place it in the src/data/orders.js file as the tokenUrl variable.

3. Start the React dev server

Start the application by running:

npm start

4. Start sending and receiving your orders and seeing them in the browser

5. ☕️

Contributors

  • Dominik Kundel

License

MIT

About

☕️ Basic Twilio Barista implementation for blog post

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published