-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #57
- Loading branch information
Showing
1 changed file
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,39 @@ | ||
# CentralHub | ||
Central hub stuff | ||
|
||
API communication between trackers and webfront | ||
This project contains the components of the CentralHub. | ||
The CentralHub takes measurements from [esp32-trackers](https://github.com/cs-23-sw-7-06/esp32-tracker) and aggregates it to derive a occupancy estimate for a given room. | ||
It contains two servers. | ||
|
||
|
||
## REST API | ||
|
||
The REST API (CentralHub.Api) is called both by the trackers and the Web UI. | ||
It exposes endpoints for managing rooms, trackers, and measurements. | ||
Every 5 minutes it takes all measurements from the trackers and aggregates them to provide occupancy estimation for all registered rooms. | ||
|
||
|
||
## Web UI | ||
|
||
This (CentralHub.WebUI) uses the REST API and provides a user interface for the REST API. | ||
More specifically, it allows the user to manage rooms and trackers, and show historical data for occupancy in a given registered room. | ||
|
||
|
||
## Building | ||
|
||
The project can be build in Visual Studio, any other IDE, or simply using the commands: | ||
|
||
```bash | ||
dotnet publish CentralHub.Api -c "Release" | ||
dotnet publish CentralHub.WebUI -c "Release" | ||
``` | ||
|
||
However, running on archlinux the [CentralHub-PKGBUILD](https://github.com/cs-23-sw-7-06/CentralHub-PKGBUILD) package is recommended instead as it provides preconfigured hardened systemd services for running this system. | ||
|
||
|
||
### Tests | ||
|
||
Unit tests are defined in the CentralHub.Api.Tests project and can be run with the command: | ||
|
||
```bash | ||
dotnet test | ||
``` |