Giter VIP home page Giter VIP logo

boriskogan81 / location-device-manager Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 27 KB

A microservice for pinging location devices and receiving their locations. Uses IP restriction to manage access. Currently only implements SMS with Nexmo, and is focused on managing A8 Android location devices. May eventually be extended to other devices and protocols.

JavaScript 100.00%
gps gps-location gps-tracking gps-device gsm nexmo-sms nexmo bookshelf bookshelfjs express

location-device-manager's Introduction

Location Device Manager

Location Device Manager is a microservice built with Express and Bookshelf. It allows connected applications to pass the phone numbers of location devices (right now, only the Android A8 GPS GSM tracker is supported) and ping them. The results are stored as a mobile event in the database, and can be retrieved via API calls. We currently use SMS as the device control channel, and Nexmo as the SMS gateway provide.

Why use Location Device Manager?

It provides a convenient way to manage locational devices and their event history.

How does it work?

Location Device Manager uses Bookshelf to manage RDBMS databases (in the example, I'm using MySQL, but it's trivial to switch to PostgreSQL or SQLite) to store device identifiers. Tasks are coming soon (the ability to set up a schedule and an expiration to ping devices).

Installation

Make sure you have MySQL set up and available. Then:

$ git clone https://github.com/boriskogan81/location-device-manager.git
//...change to /location-device-manager directory
$ npm install

//Copy the files in the config_templates folder into the config folder at root level, 
//make adjustments as necessary
//Run initial Knex migration:

$ knex migrate:latest

$ npm start

Usage

Use Location Device Manager as a service to manage location devices, or any other SMS-based device.

Tests

Location Device Manager uses in-memory SQLite for testing. The databases interface is the same (Bookshelf/Knex) as for the normal app. Migrations run on every test run, to ensure that the structure of the database is up to date, and when the tests are done running, any stored data/tables disappear.

$ npm run test

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

location-device-manager's People

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.