Skip to content

Cloud based IoT system solution. MQTT Broker, MQTT Agent, SignalR Hub, Data Source API

License

Notifications You must be signed in to change notification settings

rafiulgits/IotHub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A cloud based IoT solution

IotHub provides an abstract solution of any IoT infrastructure including Broker system, API management, Authentication, Agent management system, so that it can be extended to any preferable IoT solution like home automation system, supply chain management.

Documentation


Solution Structure

  • IotHub.Agent

    A .NET web project to establish the channel between MQTT broker and SignalR broker. This agent will publish all MQTT broker messages to SignalR clients (dashboard, control panel) and send all commands from SignalR clients to MQTT clients. Agent is using MQTTnet managed client to connect with MQTT broker.

  • IotHub.API

    A .NET web API project to provide and manage all data sources of the solution. This project use.

  • IotHub.Broker

    A .NET web project to establish a MQTT broker server. Broker is using MQTTnet server.

  • IotHub.Common

    A .NET classlib project to provide all common models, enums, exceptions and other stuffs.

  • IotHub.DataTransferObject

    A .NET classlib project, using to transfer data from service layer to service, controller and other service consumers.

  • IotHub.DB

    A .NET classlib project, to provide all database context and settings. Solution is using MongoDB as primary database.

  • IotHub.DomianModels

    A .NET classlib project, to provide domain level models.

  • IotHub.Repositories

    A .NET classlib project, to communicate with database or data source and response in domain level. Only IotHub.Services have the access to use repository to provide a security level to access domain models.

  • IotHub.Services

    A .NET classlib project, to provide all common services e.g authentication service, user management service, profile management services.


Solution Architecture


Broker Architecture

How to use (development)

Very first clone the project using git clone https://github.com/rafiulgits/IotHub.git or download the project by clicking on download button.

Required Environments

  • .NET Core 3.1 or later
  • MongoDB

Execution

  • Build the solution by dotnet build
  • Go to src/IotHub.API and from appsettings.json set your internal custom credential and use this credential create some new users (including agent one) and profiles
  • Run the src/IotHub.Broker development server by dotnet watch run
  • Go to src/IotHub.Agent , set agent credentials that you created earlier and run the development server by dotnet watch run

Development environment is ready to use!

For testing with MQTT clients, MQTT fx is a good solution. iothub-dashboard is a Reactive example dashboard that will help to find out how to use IotHub solution.


Full Documentations


License

This repository is licensed with the MIT license.

About

Cloud based IoT system solution. MQTT Broker, MQTT Agent, SignalR Hub, Data Source API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages