Access to our office is limited by an electromagnetic lock and access cards. We often discussed about alternative solutions which will not require access cards. On the market we can find solutions which support fingerprint or eye scan but they are expensive and are dependent on weather conditions. One of ideas of our Project Manager dazzled all of us: “Instead of looking for ready solutions, let’s do IT ourselves”.
Our team working with .NET platform suggested to provide solution based on .NET Core WebAPI, ReactJS and Raspberry PI. The project turned out to be a very interesting challenge and its implementation in the company was enthusiastically received. Below you can find a brief description of this project.

Problem description
Using access cards is not a very comfortable solution because every you have to take it from a wallet or wear on your neck. Second problem is guests. Every time we had someone visiting us we had to open door for them or prepare and give them an access card, and then remember to take it back after visit ended. It was an inconvenience. We needed a solution, that will allow us to open door using things that we have on us all the time.

Project goals
The goal of the project was to eliminate the use of access cards while ensuring ease of use and security in the event of hardware or software failure (which as we know happens to all of us 😉). In addition, the application should be intuitive, scalable and easy to modify.

How we achieved the goal
After the idea appeared, we started to choose the technology. Of all available technologies, which Sensi Labs works with, we have chosen .NET Core platform, which is currently very popular on the market and allows us to build a very complex Enterprise solutions. Additionally we have chosen ReactJS, which probably does not need an introduction in the era of the domination of front-end frameworks. For hardware platform, we’ve chosen Raspberry PI because of:

  • Low cost and accessibility
  • Low energy consumption – ecology
  • Easy expansion (we plan to do something more than just a door opening system)
  • It supports a lot of technologies because it’s using Linux as an operating system (we didn’t plan and we won’t ever become addicted to only one programming language)

Whole technological stack allowed us to create within a few days a solution that allows granting access not only to employees but also guests. From now, you can access the building by following two steps:

  • Administrator registers a user and grants him access for a specified period of time (minimum is 30 minutes).
  • Upon first launch of app user is authorized by entering his email and token that he received in the email.

That’s all. Whole takes no more than 3 minutes.
After registration user is authorized automatically each time application is started and unlocks door with one click.
In addition, we’ve kept backwards compatibility and in the event of software or hardware failure we are still able to open door using existing methods, i.e. access cards.

Briefly about the technical solution
As it was mentioned above, we used .NET Core platform. We focused on the most current version available when the project started, so it’s 2.2. We have plans to upgrade to version 3.0, which will be available soon. Application has been written in accordance with current and most popular trends, such as Clean Architecture, CQRS and NoSQL. As a provider of NoSQL solution, we decided to use LiteDB, which turned out to be a very fast and intuitive software, ideal for storing data related to the use of the application. To build the application we have chosen PWA technology so it can work both as a page in a browser and be installed on a phone and behaving like a native application. In addition, when a guest uses the application, he is not obliged to install another software on his phone – all he has to do is launch the application in any Internet browser.
The .NET Core platform is a Web API provider for the front-end interface. To ensure maximum performance and easy expansion in the future we used the ReactJS library together with Redux, which allows to easily create a user interface and control the state of applications at the user level using the Flux architecture.
Whole application has been divided into several layers. Thanks to this, it’s maintenance is very easy and even a developer who is unfamiliar to it, will be able to get to know it very quickly and start development.

Application layers

Application layers

App design in mobile and desktop versions

App design in mobile and desktop versions

What’s next
Application offers almost infinite possibilities of expansion. Thanks to it, we can integrate it with gates, barriers, lighting control, windows, blinds etc. In a word, everything that is powered by electricity. With this solution, you can also create scenarios, e.g. turning off all the lights in the office and closing blinds with one button.
This is not the end. Using the Office IoT application, company is able to control volume of traffic in the building, access to individual zones and rooms, as well as booking rooms.
We see great opportunities in the Internet of Things solutions.