Geeny Flow Demo: Kadabra
Kadabra is one part of the Geeny Flow demo, which demonstrates the capabilities of the Geeny Platform when it comes to pushing and consuming data using IoT devices and applications.
In this demo, Lighty (a hypothetical smart light app) consumes messages from Kadabra (a hypothetical smart lock app) to switch the lights off/on when the door is locked/unlocked.
NOTE: Before continuing, please read the Geeny Alliance Onboarding Guide for an in-depth understanding of how applications and devices are integrated with the Geeny platform.
Kadabra's context in Geeny
Kadabra is a Geeny Alliance Member -- i.e., a company with an IoT device which can push data to any Geeny Alliance Customer's application (when authorized by the consumer) via the Geeny platform.
Kadabra has created and published a Thing Type and Message Types on the Geeny platform. Applications query data from Kadabra's smart locks by querying the Application Broker API for these platform entities.
Kadabra is an OAuth 2 provider.
Kadabra is a Node.js application with a React frontend and is located in the
kadabra folder. The frontend application is located in the
The frontend is served by a Node.js backend. During the Docker build step, it is bundled into the same Docker image as the backend.
Kadabra uses Redis to store data. Kadabra's session will be stored for 12 hours, and the rest of the data will be stored for 16 hours. After that, the data will expire. If Redis is restarted, all data which was stored by that time will be lost.
As an OAuth 2 provider, Kadabra will handle OAuth 2 applications and will auto-generate them based on incoming requests from Geeny Alliance Customers, so any client id and secret would work.
Running the application locally
To run the application locally, you can use
docker-compose up. It will spin up
all the necessary services.
After the applications are started with Docker, Kadabra will be available at http://demo.geeny.localhost/kadabra.
The configuration is handled by the
docker-compose up/down cycle, all data will be lost since it is stored in Redis and SQLite. There are no persistent volumes added to the services.
Copyright (C) 2018 Telefónica Germany Next GmbH, Charlottenstrasse 4, 10969 Berlin.
This project is licensed under the terms of the Mozilla Public License Version 2.0.