Giter Site home page Giter Site logo

rockiot-api's Introduction

rockiot-api

0.1.1

Features

rockiot-api is a powerful REST API/Realtime API system to connect to your MQTT Brokers/Devices, get and publish realtime data, manage your devices asset, store realtime data.

This project uses Feathersjs. An open source web framework for building modern real-time applications.

Microservices built on REST API / Realtime API

Every IoT device can have now his REST API / Realtime API in order to manage it, get MQTT realtime data, publish MQTT data, store incoming data.

All microservices and methods are available thru our client (rockiot-api-dev) using websockets transport protocol

Built-in authentication

rockiot-api has a built-in authentication system (that you can extend) based on JWT Web Tokens (username+password by default).

All microservices requires authentication and are safely transmitted to client using wss protocol (SSL certificate must be installed on the server).

Documentation

Online documentation

Get Started

Clone our respository

$ git clone https://github.com/swina/rockiot-api.git

Getting up and running is as easy as 1, 2, 3.

  1. Make sure you have NodeJS and npm installed.

  2. Install your dependencies

    cd path/to/rockiot-api
    npm install
    
  3. Start your app

    npm start
    

    You can use nodemon in order to auto restart if you set some changes to the app.

    nodemon src/index.js
    
    
  4. Create a user (admin) only for testing purpose

    If you cloned the repository the user has been created automatically

    curl POST --data={"email":"admin","password":"password"}
    
    
  5. Change src/users/users.hooks.js :

    create: [ hashPassword('password') , authenticate('jwt') ],
    

    in order to prevent to add users without authentication.

Client usage (JS)

Check rockiot-client to connect to the rockiot-api

Client uses websocket protocol and you don't need to add any other external library like axios, jquery, etc.

Testing

Simply run npm test and all your tests in the test/ directory will be run.

Scaffolding

Feathers has a powerful command line interface. Here are a few things it can do:

$ npm install -g @feathersjs/cli          # Install Feathers CLI

$ feathers generate service               # Generate a new Service
$ feathers generate hook                  # Generate a new Hook
$ feathers help                           # Show all commands

Help

For more information on all the things you can do with Feathers visit docs.feathersjs.com.

Changelog

0.1.1

  • Fixed channels payload publish event

0.1.0

  • Initial release

License

Copyright (c) 2019

Licensed under the MIT license.

rockiot-api's People

Contributors

dependabot[bot] avatar swina avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

abbijamal

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.