Skip to content

codeforkansascity/TrashTrackerRESTAPI

Repository files navigation

Trash Tracker SMS

License

Table of Contents

Description

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.

Installation

  1. Install dependencies

    npm install
  2. Copy the sample configuration file and edit it to match your configuration

    cp .env.EXAMPLE .env

    You can find your TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN in your Twilio Account Settings.

Usage

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:

Example of text communication

After the conversation is complete, you can go to http://localhost:1337/ to see the reporting information.

Deployment

This app is deployed on AWS Lambda. You can see report records JSON here.

Local Development

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.

Example of http_request widget

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published