jcs224 / ineedhelp

A resource for people to reach out and ask for help from others with just a phone call. Designed for elderly people in particular who need help during COVID-19.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I Need Help

About

I Need Help is a web app that helps connect people that can't communicate with social media or texting a way to get help if they need it. In particular, elderly people or others who only have landlines or voice-only phones.

Setup

Requirements

Here are the Twilio values you'll need:

Config Value Description
Account Sid Your primary Twilio account identifier - find this in the Console.
Auth Token Used to authenticate - just like the above, you'll find this here.
Two Phone numbers Two Twilio phone numbers in E.164 format - you can get them here
Proxy service Create a new proxy service and take note of the SID

After you've created the proxy service, take one of those phone numbers and add one of your newly-purchased phone numbers to it.

Local development

Clone this repo

git clone https://github.com/jcs224/ineedhelp.git
cd ineedhelp

Install dependencies

yarn install

Set up .env file

Copy the .env.example to a new .env file:

cp .env.example .env

Then, edit the following values in the .env file:

  • TWILIO_ACCOUNT_SID: Your Twilio project's SID
  • TWILIO_AUTH_TOKEN: Your Twilio project's auth token
  • TWILIO_PROXY_SERVICE_SID: The proxy service SID
  • NUMBER_TO_CALL_ACTUAL: The E.164 representation of the phone number not used for the proxy service
  • NUMBER_TO_CALL_DISPLAY: A human-friendly representation of NUMBER_TO_CALL_ACTUAL. This will be what is displayed on the site for people to call.

Set up database

You can use MySQL, POSTGRES, MariaDB, MSSQL, or SQLite (Anything Adonis supports). SQLite is the quickest setup, so we'll use that in these docs. Create a .sqlite in the database folder of the project.

cd database
touch ineedhelp.sqlite
cd ..

Then, we'll need to run database migrations and generate an app key:

npx adonis migration:run
npx adonis key:generate

Run the application

Run this command to start the app up:

npx adonis serve --dev

By default, in your browser you should be able to visit http://localhost:3333 and see the homepage!

Once you've done that, click the Sign Up to Help button in the top-left corner (or from the dropdown menu on mobile) and create an account.

Set up an ngrok proxy to start adding calls

Leave the current app running and open a second terminal tab or window, then run this command:

npx ngrok http 3333

Then, using your call number (NUMBER_TO_CALL_ACTUAL), follow this great tutorial on forwarding your local development environment so you can start making phone calls and leaving requests for help.

Using the video as reference, we already did the step with ngrok.

  • In the webhook field in the app, instead of under the Messanging section, under Voice & Fax, Copy and paste the ngrok url produced from the npx ngrok http 3333 command in the "A call comes in" section
  • Change the /sms at the end to /intro.
  • Change the HTTP POST dropdown to HTTP GET. It should look like this screenshot, but with a slightly different ngrok code:

Webhook screenshot

Usage

Call the phone number on the homepage of the site (Should be your NUMBER_TO_CALL_DISPLAY in your .env file), follow the prompts, and you should see your call pop up on the page automatically, no refresh required!

About

A resource for people to reach out and ask for help from others with just a phone call. Designed for elderly people in particular who need help during COVID-19.

License:MIT License


Languages

Language:JavaScript 97.6%Language:CSS 2.4%