Skip to content

SeanMcTernan/RiverText

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RiverText Site badgeBy Sean Mc Ternan

RiverText App Image By Sean Mc Ternan

RiverText is a system that allows users to receive river flow information from The Canadian Water Office by sending a message from a satellite phone or any SMS enabled device. By sending a message to a Toll Free number, the app takes the request and queries the corresponding river name for its recent flow information and sends it back to the user.

Technologies Used

Name Purpose
NodeJS Main programming language for the project
TypeScript Main programming language during development
Axios To make requests to the Intercom API
Moment To format the time on the API requests
SimpleTexting API To send and receive messages
Scrapi API To query the Canadian Water Office Website
NPM As a package manager
ENV-CMD To set environment variables
Express.js To run the web server
body-parser To parse the JSON Data
Nodemon Restart the app during development

The App

RiverText Image

At this time there is no Frontend for the app, however it is operational. You can text any of the rivers in the rivers array to 833-589-0354 and receive a message. For example, text Stikine to 833-589-0354 and ask for the level of the Stikine River in Northern BC.

Motivation & what was learned

In 2019, I was fortunate enough to successfully kayak down one of the most challenging stretches of whitewater on the planet in Northern BC. The Grand Canyon of the Stikine. Traditionally, the run takes 3 days, so within those 3 days much can change as far as the river level is concerned. Each evening I sent a message via satellite phone to a friend to ask what the current level on the river was, I would have to wait for him to check his phone, then the government website for an accurate flow reading, then reply. It was quite cumbersome. From this, the idea for this app was created. An app that would sit and listen for inbound requests for river levels on a given set of rivers and reply with the latest reading. 

To set myself an additional challenge I decided to write this app in TypeScript. I had not yet built a live app via Typescript, so I thought this would be a great opportunity to apply what I had learned in some courses I was taking. 

The app as it stands is in its raw form. Going forward I would like to have a front end to show a map of rivers that are available and add a host server for remote to send flow data from gauge projects we are also working on. 

Install Instructions

  1. Clone/Download the Repository
  2. From the folder run npm install
  3. Run npm run dev
  4. Make a request to the sever via Postman, or whatever your preferred app is, be sure to enter your cellphone so the app texts you: http://localhost:3000/riverdata/webhooks?from= ENTER YOUR CELLPHONE HERE &to=8335890354&subject&text=Elk

Development Time: 1 Week

About

A system to transmit flow data to remote cellular devices and regular cell phones.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published