Twilio Barista is an application that allows you to solve the problem of long queues at barista stands at events. Attendees can order their coffee via various Twilio-powered channels, baristas get all orders on a website that can be loaded via a tablet and once an order is done the attendee will be notified via the system to come and pick it up. No more queueing and efficient coffee ☕️ ordering! 🎉
If you want to learn more about how this has been built, check out the following blog posts:
Different versions of this system have been used at events such as:
You can find previous versions or implementations in other languages here:
More information on how it works is in the documentation.
The current Twilio Channels are:
Retrieve your Twilio Account SID from the Twilio Console.
Create a Messaging Service in the Twilio Console and store the SID.
Create a Notify Service in the Twilio Console and choose your created Messaging Service as a Messaging Service. Make sure to store the SID.
Create a Sync Service in the Twilio Console, check the "ACL Enabled" enabled box, and store the SID.
Simply click the button below, add the respective configuration values.
Go afterwards in the
/admin section and click the Setup button. This will configure everything for you and you are ready to add phone numbers for the service.
git clone firstname.lastname@example.org:dkundel/twilio-barista.git cd twilio-barista npm install
The following environment variables are necessary for Twilio Barista:
PHONE_NUMBER_HASHING_SECRET- This will be used to generate internal identities based on the phone number
LOGINS- Semi-colon separated list based on the following schema:
username,password,role. Available roles are:
barista- Enables you to see all orders but nothing else
admin- Can see and write all data
PORT- Optional. By default it will run on port
.env.example file into a
.env file. And set the respective values in the file.
Set the environment variables based on your operating system or hosting provider.
NODE_ENV is set to
production the server will automatically start in production mode else it will load the
.env file for the variables using node-env-run.
npm run start:dev
npm run start:prod
npm run dev
Navigate to your deployment on an externally available URL. If you are hosting for testing on your localhost you should use ngrok to create a tunnel.
Authenticate with an admin user, go into the Admin section and under Other click the Setup button. This will configure the rest.
Choose in the Admin section under Other a country that you want a phone number from and click acquire. It will purchase the number, configure it and you can see it in the Configuration section of your Admin part under
You are all set. People can start sending in messages to those numbers and you will receive them in the order section of your interface.
The project is split up into three sections on the top level. The
client directory contains all front-end related code and has been bootstrapped with the Preact CLI. The
server directory contains anything backend related and is powered by Express. The
shared folder contains any code that is being used by both parts of the project.
There is also a
client-dist directory that contains the latest stable build of the front-end with the
production flag enabled.
You can find more information in the documentation of the project.
Please be aware that this project has a Code of Conduct. The tldr; is to just be excellent to each other ❤️
You are more than welcome to contribute to this project. The tests for this project are still missing so please properly test your changes manually in the mean time.
To build changes for the front-end you can run the following command:
npm run build:preact
If you are developing and you want to incrementally build the changes for development purposes you can start of the back-end and front-end with:
npm run dev
A special thanks to all the awesome folks in the open source community and their great projects and especially the folks working on the following projects:
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
MIT © Dominik Kundel