The main aim of this project is to demonstrate, how could be Internet of Things (IoT) devices controlled/maintained and how could be all of the information, provided by them, presented to a user.
The presented way, how it can be done, is to create a web application allowing users to register and maintain their IoT devices.
Backend of the portal is implemented in Express - javascript framework of Node.js. As a database is used MongoDB and InfluxDB for time series data. Frontend is implemented in React.js using Redux.
The application supports registration of users (without any encryption) and registration of devices through API keys, which will be generated by the portal.
As the project is only demonstration, to the future, it's needed to implement data encryption, tools for visualisation of data and for its monitoring (like Chronograf), security layer above MQTT (or other protocol used for device communication) protocol, ...
[1.] Install packages:
$ npm install
[2.] Translate React.js to "normal" javascript by:
$ npm run build
The command will generate bundle.js
file in /public/
repository.
[3.] Start MongoDB database and server:
$ npm run database
$ npm run server-watch
Or by one command:
$ npm run start
Note: after this database stored in /src/backEnd/database/
is used by default.
After the steps, application is available on localhost:3000
Integration tests for middleware can be run as follows:
[1.] Start test database:
$ npm run test-database
[2.] Start server:
$ npm run server-watch
[3.] Run tests:
$ npm run test
Note: after this, test database is created under /src/backEnd/tests/database/
directory
by default.