The DevKit module "Ping" allows users to send a preformatted SMS to their contacts on the fly. It's part of a collection of Open Source modules for the COBI.bike system.
The quickest way to test the module via Glitch.com:
Glitch.com allows you to edit, host and fork Node.js applications for quick prototyping.
Follow the installation step 2 and copy the environment variables to the: .env
file on Glitch.com
This module relies on Twilio.com to send a custom SMS from a Node.js backend.
The backend serves a static web page to the client, which allows the user to pick between several preformatted messages. After choosing a message, the user has to select a recipient from his contacts. The message is then sent back to the Node.js backend, which will forward to message to Twilio.
The backend enforces a maximum message quota by IP address.
You can easily deploy the module on your own:
Clone this repository and install Node.js dependencies with:
npm install
This module relies on Twilio.com to send a custom SMS from the Node.js backend. Create an account, setup »Programmable SMS« and retrieve your api credentials. For testing purposes consider using test credentials found in the General Settings.
Set the environment variables TWILIO_ACCOUNT_SID
, TWILIO_AUTH_TOKEN
and TWILIO_FROM_NUMBER
with your twilio credentials.
The module is accessible under localhost:3000 after starting the Node.js server with:
node server.js
The settings menu can be accessed with the ?state=edit suffix.
The module accesses a native contact menu through a Cobi.js API bridge. To send a message anyway, we simply spoof the API function:
COBI.app.contact.read = function(callback) {
var contact = {};
contact.phone = '+49 1234 56789';
callback(contact);
}
Follow the instructions to install the COBI.Bike Google Chrome Simulator and get familiar with the basics of module development on the COBI plattform.
This module uses Open Source components. You can find the source code of their open source projects along with license information below. We acknowledge and are grateful to these developers for their contributions to open source.
Carousel Team by Marco Barría (MIT)
- Debugging Tips & Tricks
- Inspiration & Examples
- Interface Guidelines
- More DevKit Resources
- Other Tools & Resources
Anyone and everyone is welcome to contribute to this project, the DevKit Simulator and the DevKit UI Components. Please take a moment to review the guidelines for contributing.
Copyright © 2018 COBI.Bike GmbH