Skip to content

AliHasanov16/DevicePulse

Repository files navigation

DevicePulse

A mini device monitoring system — Agent + API + Live Admin Panel

About

DevicePulse consists of a lightweight Agent application installed on permitted computers and an admin panel that displays live data from these Agents.

Technologies

  • Backend: ASP.NET Core Web API (.NET 8)
  • Real-Time: SignalR
  • Database: MSSQL + Entity Framework Core
  • Frontend: Blazor Server
  • Architecture: Clean Architecture
  • Auth: JWT Token

Project Structure

DevicePulse/ ├── DevicePulse.Domain/ → Entities, Enums ├── DevicePulse.Application/ → Interfaces, DTOs ├── DevicePulse.Infrastructure/ → EF Core, MSSQL, Repositories ├── DevicePulse.Api/ → Web API, SignalR Hub, JWT ├── DevicePulse.Agent/ → Monitoring Agent (Worker Service) ├── DevicePulse.Admin/ → Blazor Admin Panel └── DevicePulse.Shared/ → Shared DTOs

Setup

Requirements

  • .NET 8 SDK
  • SQL Server (MSSQL)
  • Visual Studio 2022

1. Database Setup

Update the connection string in DevicePulse.Api/appsettings.json:

"ConnectionStrings": {
  "DefaultConnection": "Server=YOUR_SERVER;Database=DevicePulseDb;Trusted_Connection=True;TrustServerCertificate=True"
}

Apply migrations via Package Manager Console: Update-Database -Project DevicePulse.Infrastructure -StartupProject DevicePulse.Api

2. Create First User

While the API is running, use Swagger at /api/auth/register:

{
  "username": "admin",
  "password": "yourpassword"
}

3. Agent Configuration

Edit DevicePulse.Agent/appsettings.json:

{
  "AgentSettings": {
    "ServerUrl": "http://API_SERVER_IP:5056",
    "DeviceKey": "UNIQUE-DEVICE-ID",
    "DeviceName": "Device Name",
    "Mode": "Console",
    "WatchedProcesses": ["notepad.exe", "chrome.exe"]
  }
}

4. Running the Project

Set Multiple Startup Projects in Visual Studio:

  • DevicePulse.Api → Start
  • DevicePulse.Agent → Start
  • DevicePulse.Admin → Start

Demo Scenario

  1. Start API, Admin Panel and Agent
  2. Device appears online in the admin panel
  3. CPU/RAM/Disk values update in real-time
  4. Open notepad.exe → panel shows "Started"
  5. Close notepad.exe → panel shows "Stopped"
  6. Use Simulator Mode to simulate multiple devices
  7. Test Ping, RefreshMetrics, SendAgentLogs commands

Simulator Mode

To simulate multiple devices on a single computer, update appsettings.json:

"Mode": "Simulator",
"DeviceKey": "SIM-PC-01",
"DeviceName": "Simulation-PC-01"

Agent Modes

Mode Description
Console Reads real metrics, displays logs on screen
Simulator Generates fake metrics, used for demo purposes

Security

  • All API endpoints protected with JWT
  • Agent authenticated with token
  • Admin commands limited to whitelist
  • Passwords hashed with SHA256
  • No screenshots, keylogger or invasive features

About

DevicePulse is a real-time device monitoring system built with .NET 8. A lightweight Agent runs on monitored computers and sends live CPU, RAM, disk usage and process state changes to a central API via SignalR. An admin panel built with Blazor displays all connected devices and their metrics in real-time.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages