Trash Tracker is a simple, lightweight system that allows residents and staff of the Lykins neighborhood to report illegal dumping with a simple text message. This app is one of its three repositories. It performs the function of recording the reporting messages.
-
Install dependencies
npm install
-
Copy the sample configuration file and edit it to match your configuration
cp .env.EXAMPLE .env
You can find your
TWILIO_ACCOUNT_SID
andTWILIO_AUTH_TOKEN
in your Twilio Account Settings.
To run the application, enter:
npm start
Any users can send a text message to our Twilio phone number (816) 608-6096 and start the conversation! The following photo shows an example:
After the conversation is complete, you can go to http://localhost:1337/ to see the reporting information.
This app is deployed on AWS Lambda. You can see report records JSON here.
You will need a webhook url on the public Internet. To do that, you need to install ngrok to expose your local network to the public Internet. After you install it and configure the authentification, open a second terminal and enter the following command:
$ ngrok http 1337
Once you acquire a forwarding url from ngrok, copy and paste it in http_request_english and http_request_spanish widgets in your Twilio Studio flow. You will need to update the url everytime you run that script. The below photo shows an example.