jdtzmn / onewheel-pinger

an app to ping the onewheel page to see if the delivery date has updated

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Onewheel-pinger

Onewheel-pinger is an SMS application that allows users to send their order number and delivery email address to a phone number and receive notifications as to if/when their onewheel delivery changes.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

This project is a node.js application.

Before installing, download and install node.js.

This project uses mongodb to store user data. For use in development, it is highly recommended that you install mongodb locally.

Installing

Clone the repo

$ git clone https://github.com/jdtzmn/onewheel-pinger
Cloning into onewheel-pinger...

Run npm install

npm install

Or using yarn

yarn

Once the dependencies are installed, environment variables need to be set:

Environment variables

This project uses twilio to send and receive texts as well as mongo to store user data.

For utility, one can use a .env file to store all of these environment variables locally. Learn more here.


To find the twilio sid and auth_token, read their docs here.

To learn about the mongo connection string, read their docs here.

Required

  • ENCRYPTION_KEY - a 32 byte key for encrypting the user data before sending it to the mongo database

  • TWILIO_SID - the SID that is given by twilio

  • TWILIO_TOKEN - the auth_token that is given by twilio

Optional

  • PORT - a port to run the web server on

Default: 3000

  • MONGO_STRING - the connection string used to connect to a mongo database

Default: 'mongodb://localhost'

  • MONGO_DB - the database name to use after connecting

Default: 'test'

Running the tests

Unit tests

These unit tests test each individual component of the app

npm test

And coding style tests

These coding style tests ensure that the code matches the expected coding style

npm run lint

A note about these tests

These tests are also run before every commit as a git precommit script

Deployment

To deploy, a paid twilio account as well as a mongo database are required.

Built With

  • express - The web server used

  • twilio - SMS integration

  • mongo - Used to store user data

  • cron - Used to run scheduled daily jobs

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Jacob Daitzman - Initial work - jdtzmn

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

About

an app to ping the onewheel page to see if the delivery date has updated

License:MIT License


Languages

Language:TypeScript 99.4%Language:JavaScript 0.6%