Vestlus is a conversational app. The name comes from the Estonian word for conversation. It uses Twilio's Conversations API SDK client library along with Twilio's Paste framework to demonstrate how you might build a conversation app. Conversations consists of participants and messages, so after logging in you'll see a list of conversations on the left. Once a conversation is selected it will show up on the right, with participants listed at the top and messages below.
Login accounts are stored in a JSON file. You can create a new account, and once you login as it, a Conversations API user will be automatically created. This will make it possible to add that user as a chat participant in a conversation. Once you've created a conversation you can also add a non-chat participant with a phone number simply by typing it in the new participant form field like so, +12345678900
. This will create a participant using a proxy, and will choose the first phone number configured in the account with SMS capabilities. This behavior can be changed in ConversationView.tsx
First, create a .env
file with the following:
TWILIO_ACCOUNT_SID=###################
TWILIO_API_KEY=###################
TWILIO_API_SECRET=###################
Login to https://console.twilio.com click 'Account' in the top right and then select 'API keys and tokens'. You must use the 'Create API Key' flow for this application.
Second, install dependencies and then you'll be ready to run the application.
npm install
npm start
Vestlus should now be running at http://localhost:3000
This application runs a server using nodemon to handle session creation and then it proxy's frontend requests to a webpack server. This setup works great for local development and demo'ing, but it is not intended for use in a production environment.
Pull requests are welcome!
MIT © Twilio Inc.