Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 47 additions & 3 deletions .github/workflows/smartbotweb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
workflow_dispatch:

permissions:
Expand All @@ -16,6 +18,7 @@ env:
PUBLISH_PATH: published
CONFIGURATION: Release
DOTNET_CORE_VERSION: 10.0.300
DOTNET_TEST_RUNTIME_VERSION: 8.0.34
PROJECT_PATH: src/server/SmartBotBlazorApp/SmartBotBlazorApp.csproj
SOLUTION_PATH: src/server/SmartBotBlazorApp.sln
jobs:
Expand All @@ -27,15 +30,56 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_CORE_VERSION }}
- name: Ensure .NET 8 test runtimes
shell: bash
run: |
set -euo pipefail
dotnet --list-runtimes
dotnet_dir="$(dirname "$(readlink -f "$(command -v dotnet)")")"
installer="$RUNNER_TEMP/dotnet-install.sh"
for runtime in dotnet aspnetcore; do
framework=Microsoft.NETCore.App
if [ "$runtime" = aspnetcore ]; then framework=Microsoft.AspNetCore.App; fi
if ! dotnet --list-runtimes | grep -F "$framework $DOTNET_TEST_RUNTIME_VERSION ["; then
if [ ! -f "$installer" ]; then
curl --fail --silent --show-error --location https://dot.net/v1/dotnet-install.sh --output "$installer"
fi
bash "$installer" --runtime "$runtime" --version "$DOTNET_TEST_RUNTIME_VERSION" \
--install-dir "$dotnet_dir" --skip-non-versioned-files --no-path
fi
dotnet --list-runtimes | grep -F "$framework $DOTNET_TEST_RUNTIME_VERSION ["
done
- name: Restore
run: dotnet restore "${{ env.SOLUTION_PATH }}" --locked-mode
- name: Verify formatting
run: dotnet format "${{ env.SOLUTION_PATH }}" --verify-no-changes --no-restore
- name: Audit NuGet packages
shell: bash
run: |
dotnet list "${{ env.SOLUTION_PATH }}" package --vulnerable --include-transitive --format json > vulnerable-packages.json
test "$(jq '[.projects[]?.frameworks[]? | ((.topLevelPackages // []) + (.transitivePackages // []))[]] | length' vulnerable-packages.json)" -eq 0
set -euo pipefail
dotnet list "${{ env.SOLUTION_PATH }}" package --vulnerable --include-transitive --no-restore --format json --output-version 1 > vulnerable-packages.json
# NuGet reports source failures in problems, even when package lists are empty.
# A clean project may omit frameworks; require every solution project instead.
jq -e '
def optional_array(key): if has(key) then .[key] else [] end;
.version == 1 and
(.sources | type == "array" and length > 0 and all(.[]; type == "string" and length > 0)) and
(optional_array("problems") | type == "array" and length == 0) and
(.projects | type == "array" and length == 3) and
([.projects[].path | split("/") | last] | sort == [
"SmartBotBlazorApp.Client.csproj",
"SmartBotBlazorApp.Tests.csproj",
"SmartBotBlazorApp.csproj"
]) and
all(.projects[];
(optional_array("frameworks") | type == "array") and
all((.frameworks // [])[];
(.framework | type == "string" and length > 0) and
(optional_array("topLevelPackages") | type == "array" and length == 0) and
(optional_array("transitivePackages") | type == "array" and length == 0)
)
)
' vulnerable-packages.json
- name: Build
run: dotnet build "${{ env.SOLUTION_PATH }}" --configuration ${{ env.CONFIGURATION }} --no-restore
- name: Test
Expand All @@ -58,4 +102,4 @@ jobs:
vulnerable-packages.json
if-no-files-found: warn
- name: Build container image
run: docker build --file src/server/SmartBotBlazorApp/Dockerfile --tag smartbotapi:ci .
run: docker build --pull --file src/server/SmartBotBlazorApp/Dockerfile --tag smartbotapi:ci .
4 changes: 3 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ Service**. Robot firmware is an Arduino sketch that connects to the SignalR hub.
- `other/media/` — README screenshots, photos, and demo video.

## Build / run / test
- Build/run with the **.NET 8 SDK** (`dotnet build` / `dotnet run`).
- Build/run with the SDK selected by **`global.json`** (10.0.300, `latestPatch`)
(`dotnet build` / `dotnet run`). The projects target **`net8.0`** and use EF Core 9;
install the .NET 8 and ASP.NET Core 8 runtimes for local execution/tests.
- Tests: `dotnet test` (see `docs/getting-started.md`).

## Conventions & good practices
Expand Down
29 changes: 20 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@

**🗓️ Project period:** 2024–2025

> 🎥 **Live demo:** for the project presentation the system was **deployed to Azure App Service** and fully working — an authenticated dashboard with **live depth-map streaming** from the robot *(it is no longer hosted)*. See it running with the physical robot in the [demo video](https://www.facebook.com/reel/1991337048036257).
> 🎥 **Live demo:** for the project presentation the system was **deployed to Azure App Service** and fully working — an authenticated dashboard with **live depth-map streaming** from the robot *(it is no longer hosted)*. See it running with the physical robot in the demo videos:
>
> [▶ Watch the demo on YouTube](https://youtu.be/cAaiVYFb87Y)<br>
> [▶ Watch the demo on Facebook](https://www.facebook.com/reel/1991337048036257)

**SmartBotAPI** is a full-stack robotics platform that connects an ESP32-C3–based mobile robot to a real-time web dashboard. The robot streams live telemetry — an 8×8 time-of-flight depth map, 6-axis IMU data, and temperature — over a secure WebSocket/SignalR channel, while operators drive it remotely with an on-screen joystick or keyboard. Measurements are persisted to SQL Server and visualized as live heatmaps, interpolated depth matrices, and historical charts.

Expand Down Expand Up @@ -91,8 +94,12 @@ The robot uses a custom carrier PCB for the controller, motor-driver module, sen

A short local driving-test montage and a recorded live presentation of the complete system (Department of Computer Science, Akademia Tarnowska):

- **[▶ Watch the driving-test montage](other/media/smartbot-driving-demo-music.mp4)** *(78 s, with music)*
- **[▶ Watch the full presentation on YouTube](https://youtu.be/cAaiVYFb87Y)**
- **[▶ Watch the full presentation on Facebook](https://www.facebook.com/reel/1991337048036257)**
- **[▶ Download the web-control and live depth demo](other/media/SmartBot%20LiveDemo_WebControlls_Lidar.mp4)**

- **[▶ Watch the driving-test montage on YouTube](https://youtu.be/L9FZEDhjk6o)**
- **[▶ Download the driving-test montage](other/media/smartbot-driving-demo-music.mp4)** *(78 s, with music)*

Music: **“New Direction” — Kevin MacLeod**, [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for source and modification details.

Expand All @@ -118,17 +125,19 @@ mixing equations, dead zones, timing, key mapping, and safety behavior.

| Layer | Technology |
|---|---|
| Web framework | ASP.NET Core 8.0, Blazor (Interactive Server + WebAssembly hybrid) |
| Web framework | ASP.NET Core 8.0, Blazor (Interactive Server + WebAssembly hybrid); explicit ASP.NET Core packages 8.0.34 |
| UI components | MudBlazor 7, Bootstrap 5 |
| Real-time transport | SignalR (JSON protocol) over WebSocket/TLS |
| Data | Entity Framework Core 9, SQL Server (LocalDB in development) |
| Image processing | SixLabors.ImageSharp (heatmap rendering, bilinear interpolation) |
| Data | Entity Framework Core 9, Microsoft.Data.SqlClient 6.1.8, SQL Server (LocalDB in development) |
| Image processing | SkiaSharp 4.156.1 (heatmap rendering), SkiaSharp.NativeAssets.Linux.NoDependencies 4.156.1 (Linux native library); custom bilinear matrix interpolation |
| Identity | ASP.NET Core Identity |
| Firmware | Arduino framework on ESP32-C3 (Arduino IDE 2.x) |
| Firmware libraries | ArduinoJson, SparkFun VL53L5CX, Adafruit MPU6050, WebSockets (Markus Sattler) |
| Hardware | ESP32-C3 DevKitM-1, VL53L5CX ToF sensor, MPU6050 IMU, TB6612FNG motor driver, NeoPixel status LED |
| DevOps | Docker, GitHub Actions, Azure App Service (presentation deployment) |

**Platform support:** [.NET 8](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core) and [EF Core 9](https://learn.microsoft.com/en-us/ef/core/what-is-new/) reached end of support on November 10, 2026. This repair retains `net8.0` and EF Core 9; updating packages does not restore platform support. Migration to .NET 10 LTS, including EF Core and database regression testing, is a separate follow-up.

## Repository Structure

```
Expand Down Expand Up @@ -157,7 +166,9 @@ SmartBotAPI/

### Web Server

**Prerequisites:** [.NET SDK 10.0](https://dotnet.microsoft.com/download/dotnet/10.0) (the application targets .NET 8), SQL Server LocalDB on Windows (installed with Visual Studio) or any reachable SQL Server instance.
**Prerequisites:** [.NET SDK 10.0.300](https://dotnet.microsoft.com/download/dotnet/10.0) as selected by `global.json` (`latestPatch`), .NET 8 and ASP.NET Core 8 runtimes (8.0.34) for execution/tests, and SQL Server LocalDB on Windows (installed with Visual Studio) or any reachable SQL Server instance. The application targets `net8.0`; SDK 10 alone does not provide its runtime.

Heatmap rendering uses SkiaSharp and requires no license key. Its Linux native library is supplied by `SkiaSharp.NativeAssets.Linux.NoDependencies`, including for CI and Docker.

```powershell
cd src/server/SmartBotBlazorApp
Expand Down Expand Up @@ -228,7 +239,7 @@ The [firmware and hardware reference](docs/firmware.md) links to the manufacture

## Deployment

Pushing to `main` or opening a pull request against it triggers the GitHub Actions workflow (`.github/workflows/smartbotweb.yml`), which performs a locked restore, verifies formatting, audits NuGet packages, builds and tests with coverage, builds the container image, and publishes a deployable web-app artifact. It does not deploy to an external environment automatically.
Pushing to `main` or `develop`, or opening a pull request against either branch, triggers the GitHub Actions workflow (`.github/workflows/smartbotweb.yml`). It uses SDK 10.0.300 and checks/installs the .NET 8 and ASP.NET Core 8 runtimes at 8.0.34 on Linux, then performs a locked restore, verifies formatting, audits all NuGet dependencies including transitive packages, builds and tests with coverage, publishes a deployable web-app artifact, and builds the container image. It does not deploy to an external environment automatically.

For the project presentation, the application was deployed to the **smartbotweb** Azure App Service and the firmware targeted `smartbotweb.azurewebsites.net:443`. That service is no longer hosted; the current firmware configuration uses an explicit placeholder that must be replaced with the address of the current server before use.

Expand All @@ -242,5 +253,5 @@ This project is licensed under the [GNU General Public License v3.0](LICENSE)

## 👥 Authors

- **Kamil Rataj** — author & maintainer — [GitHub](https://github.com/Kamilr616) · [LinkedIn](https://www.linkedin.com/in/kamil-r-153ab7121/)
- **Mateusz Ciszek** ([@Matix351](https://github.com/Matix351)) — contributor
- **Kamil Rataj** — Author & maintainer — [GitHub](https://github.com/Kamilr616) · [LinkedIn](https://www.linkedin.com/in/kamil-r-153ab7121/)
- **Mateusz Ciszek** — Co-author — [GitHub](https://github.com/Matix351) · [LinkedIn](https://www.linkedin.com/in/mateusz-ciszek-15080b355/)
29 changes: 20 additions & 9 deletions README.pl.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@

**🗓️ Okres realizacji:** 2024–2025

> 🎥 **Demo na żywo:** na potrzeby prezentacji system był **wdrożony na Azure App Service** i w pełni działający — panel z uwierzytelnianiem oraz **podglądem mapy głębi na żywo** z robota *(obecnie nie jest hostowany)*. Zobacz działanie z fizycznym robotem na [filmie demonstracyjnym](https://www.facebook.com/reel/1991337048036257).
> 🎥 **Demo na żywo:** na potrzeby prezentacji system był **wdrożony na Azure App Service** i w pełni działający — panel z uwierzytelnianiem oraz **podglądem mapy głębi na żywo** z robota *(obecnie nie jest hostowany)*. Zobacz działanie z fizycznym robotem na filmach demonstracyjnych:
>
> [▶ Obejrzyj demo na YouTube](https://youtu.be/cAaiVYFb87Y)<br>
> [▶ Obejrzyj demo na Facebooku](https://www.facebook.com/reel/1991337048036257)

**SmartBotAPI** to pełnostackowa platforma robotyczna, która łączy mobilnego robota opartego na **ESP32-C3** z panelem webowym działającym w czasie rzeczywistym. Robot przesyła na żywo telemetrię — mapę głębi 8×8 z czujnika ToF, dane 6-osiowego IMU oraz temperaturę — bezpiecznym kanałem WebSocket/SignalR, a operator steruje nim zdalnie ekranowym joystickiem lub klawiaturą. Pomiary są zapisywane w SQL Server i wizualizowane jako mapy ciepła, interpolowane macierze głębi oraz wykresy historyczne.

Expand Down Expand Up @@ -91,8 +94,12 @@ Robot korzysta z dedykowanej płytki bazowej PCB dla kontrolera, modułu sterown

Krótki montaż z lokalnych testów jazdy oraz nagranie prezentacji kompletnego systemu (Katedra Informatyki, Akademia Tarnowska):

- **[▶ Obejrzyj montaż z testów jazdy](other/media/smartbot-driving-demo-music.mp4)** *(78 s, z muzyką)*
- **[▶ Obejrzyj pełną prezentację na YouTube](https://youtu.be/cAaiVYFb87Y)**
- **[▶ Obejrzyj pełną prezentację na Facebooku](https://www.facebook.com/reel/1991337048036257)**
- **[▶ Pobierz demo sterowania przez przeglądarkę i podglądu głębi na żywo](other/media/SmartBot%20LiveDemo_WebControlls_Lidar.mp4)**

- **[▶ Obejrzyj montaż z testów jazdy na YouTube](https://youtu.be/L9FZEDhjk6o)**
- **[▶ Pobierz montaż z testów jazdy](other/media/smartbot-driving-demo-music.mp4)** *(78 s, z muzyką)*

Muzyka: **„New Direction” — Kevin MacLeod**, [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Szczegóły źródła i modyfikacji: [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).

Expand All @@ -119,17 +126,19 @@ klawiszy i zabezpieczenia opisano w

| Warstwa | Technologia |
|---|---|
| Framework web | ASP.NET Core 8.0, Blazor (Interactive Server + WebAssembly) |
| Framework web | ASP.NET Core 8.0, Blazor (Interactive Server + WebAssembly); jawne pakiety ASP.NET Core 8.0.34 |
| Komponenty UI | MudBlazor 7, Bootstrap 5 |
| Transport real-time | SignalR (protokół JSON) po WebSocket/TLS |
| Dane | Entity Framework Core 9, SQL Server (LocalDB w dev) |
| Przetwarzanie obrazu | SixLabors.ImageSharp (mapa ciepła, interpolacja dwuliniowa) |
| Dane | Entity Framework Core 9, Microsoft.Data.SqlClient 6.1.8, SQL Server (LocalDB w dev) |
| Przetwarzanie obrazu | SkiaSharp 4.156.1 (mapa ciepła), SkiaSharp.NativeAssets.Linux.NoDependencies 4.156.1 (natywna biblioteka dla Linuksa); własna interpolacja dwuliniowa macierzy |
| Tożsamość | ASP.NET Core Identity |
| Firmware | Arduino na ESP32-C3 (Arduino IDE 2.x) |
| Biblioteki firmware | ArduinoJson, SparkFun VL53L5CX, Adafruit MPU6050, WebSockets (Markus Sattler) |
| Sprzęt | ESP32-C3 DevKitM-1, czujnik ToF VL53L5CX, IMU MPU6050, sterownik silników TB6612FNG, dioda statusu NeoPixel |
| DevOps | Docker, GitHub Actions, Azure App Service (wdrożenie prezentacyjne) |

**Wsparcie platformy:** [.NET 8](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core) i [EF Core 9](https://learn.microsoft.com/en-us/ef/core/what-is-new/) zakończyły okres wsparcia 10 listopada 2026 r. Ta naprawa zachowuje `net8.0` i EF Core 9; aktualizacja pakietów nie przywraca wsparcia platformy. Migracja do .NET 10 LTS, obejmująca EF Core i testy regresji bazy danych, pozostaje osobnym kolejnym zadaniem.

## Struktura repozytorium

```
Expand Down Expand Up @@ -158,7 +167,9 @@ SmartBotAPI/

### Serwer webowy

**Wymagania:** [.NET SDK 10.0](https://dotnet.microsoft.com/download/dotnet/10.0) (aplikacja jest kierowana na .NET 8), SQL Server LocalDB w systemie Windows (instalowany z Visual Studio) lub dowolna dostępna instancja SQL Server.
**Wymagania:** [.NET SDK 10.0.300](https://dotnet.microsoft.com/download/dotnet/10.0) wybierany przez `global.json` (`latestPatch`), środowiska uruchomieniowe .NET 8 i ASP.NET Core 8 (8.0.34) do uruchamiania aplikacji/testów oraz SQL Server LocalDB w systemie Windows (instalowany z Visual Studio) lub dowolna dostępna instancja SQL Server. Aplikacja ma target `net8.0`; sam SDK 10 nie dostarcza wymaganego środowiska uruchomieniowego.

Renderowanie mapy ciepła korzysta ze SkiaSharp i nie wymaga klucza licencyjnego. Pakiet `SkiaSharp.NativeAssets.Linux.NoDependencies` dostarcza natywną bibliotekę dla Linuksa, także do CI i Dockera.

```powershell
cd src/server/SmartBotBlazorApp
Expand Down Expand Up @@ -229,7 +240,7 @@ Po połączeniu robot pojawia się na stronie **Live View Image** zalogowanego p

## Wdrożenie

Push do `main` lub otwarcie pull requesta do tej gałęzi uruchamia workflow GitHub Actions (`.github/workflows/smartbotweb.yml`), który wykonuje odtwarzalny restore, sprawdza formatowanie i podatności pakietów, buduje i testuje rozwiązanie z pomiarem pokrycia, buduje obraz kontenera oraz publikuje artefakt aplikacji webowej. Workflow nie wdraża automatycznie do środowiska zewnętrznego.
Push do `main` lub `develop` albo otwarcie pull requesta do jednej z tych gałęzi uruchamia workflow GitHub Actions (`.github/workflows/smartbotweb.yml`). Workflow używa SDK 10.0.300 i sprawdza/instaluje środowiska uruchomieniowe .NET 8 oraz ASP.NET Core 8 w wersji 8.0.34 na Linuksie, następnie wykonuje restore w trybie locked, sprawdza formatowanie i podatności wszystkich zależności NuGet, w tym pośrednich, buduje i testuje rozwiązanie z pomiarem pokrycia, publikuje artefakt aplikacji webowej oraz buduje obraz kontenera. Workflow nie wdraża automatycznie do środowiska zewnętrznego.

Na potrzeby prezentacji projektu aplikacja była wdrożona na Azure App Service **smartbotweb**, a firmware łączył się z `smartbotweb.azurewebsites.net:443`. Usługa nie jest już hostowana; aktualna konfiguracja firmware zawiera jawny placeholder, który przed użyciem trzeba zastąpić adresem bieżącego serwera.

Expand All @@ -243,5 +254,5 @@ Projekt jest udostępniany na licencji [GNU General Public License v3.0](LICENSE

## 👥 Autorzy

- **Kamil Rataj** — autor i opiekun — [GitHub](https://github.com/Kamilr616) · [LinkedIn](https://www.linkedin.com/in/kamil-r-153ab7121/)
- **Mateusz Ciszek** ([@Matix351](https://github.com/Matix351)) — współtwórca
- **Kamil Rataj** — Autor i opiekun — [GitHub](https://github.com/Kamilr616) · [LinkedIn](https://www.linkedin.com/in/kamil-r-153ab7121/)
- **Mateusz Ciszek** — Współautor — [GitHub](https://github.com/Matix351) · [LinkedIn](https://www.linkedin.com/in/mateusz-ciszek-15080b355/)
Loading
Loading