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.
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.
git clone https://github.com/jcs224/ineedhelp.git
cd ineedhelp
yarn install
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 SIDTWILIO_AUTH_TOKEN
: Your Twilio project's auth tokenTWILIO_PROXY_SERVICE_SID
: The proxy service SIDNUMBER_TO_CALL_ACTUAL
: TheE.164
representation of the phone number not used for the proxy serviceNUMBER_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.
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 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.
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 toHTTP GET
. It should look like this screenshot, but with a slightly differentngrok
code:
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!