2026-06-02 17:40:41 -04:00
2026-05-26 19:42:20 +00:00
2026-05-26 19:42:20 +00:00
2026-05-26 19:42:20 +00:00
2026-05-26 19:42:20 +00:00
2026-05-26 19:42:20 +00:00
2026-05-26 19:42:20 +00:00
2026-05-26 19:42:20 +00:00
2026-05-26 19:42:20 +00:00
2026-05-26 19:42:20 +00:00
2026-05-26 19:42:20 +00:00
2026-05-26 19:42:20 +00:00
2026-05-26 19:42:20 +00:00
2026-06-02 17:40:41 -04:00
2026-05-26 19:42:20 +00:00
2026-05-26 19:42:20 +00:00
2026-05-26 19:42:20 +00:00

ModPulse

A lean, high-performance headless Modbus TCP/RTU data-logger and pulse-controller with a single-page web GUI.

modpulse demo

Quick Start (One Command)

Prerequisites

Start the Application

Linux/Mac:

./start.sh        # Local development
./start.sh docker # With Docker

Windows (PowerShell):

.\start.ps1       # Local development
.\start.ps1 docker # With Docker

Then open http://localhost:5000

That's it! The script auto-configures a development API key and data directory. For production, create a .env file (see below).

Features

  • Dual SQLite Database: Config DB for read-heavy operations, Time-Series Log DB with monthly partitioning
  • Modbus Support: TCP and RTU with connection pooling via FluentModbus
  • Rule Engine: DynamicExpresso-powered conditional rules and NCrontab cron scheduling
  • Real-time Updates: SignalR backplane for live data streaming
  • Minimalist Web UI: HTMX + Alpine.js frontend with Chart.js visualization

Deployment Options

Method Command Best For
Quick Start ./start.sh Development, testing
Docker ./start.sh docker Production, portable deployment
systemd sudo ./deploy.sh systemd Linux server background service
Build Only ./deploy.sh build-only CI/CD pipelines

Configuration

Production Setup

Create a .env file:

cp .env.example .env
# Edit .env and set a secure API key
# Required
MODPULSE_API_KEY=your-secure-api-key-here

# Optional
ASPNETCORE_URLS=http://+:5000
ASPNETCORE_ENVIRONMENT=Production
DataDirectory=/app/data

Generate a secure key:

openssl rand -base64 32

Docker Compose

# With custom env
docker-compose up -d --build

# Stop
docker-compose down

API Endpoints

Endpoint Method Description
/api/devices GET, POST List/Create devices
/api/devices/{id} GET, PUT, DELETE Device CRUD
/api/registermaps GET, POST, PUT, DELETE Register maps
/api/rules GET, POST, PUT, DELETE Pulse rules
/api/data/{deviceId}/history GET Historical data
/hub/modbus SignalR Real-time updates

Project Structure

ModPulse/
├── start.sh / start.ps1      # One-command start scripts
├── deploy.sh / deploy.ps1    # Full deployment scripts
├── docker-compose.yml        # Docker orchestration
├── src/
│   ├── ModPulse.Api/         # Web API, SignalR, endpoints
│   ├── ModPulse.Engine/      # Background services, Modbus
│   ├── ModPulse.Data/        # EF Core, repositories
│   ├── ModPulse.Core/        # Domain models
│   └── ModPulse.Web/         # HTMX/Alpine frontend
└── uat/                      # Playwright tests

Testing

# Run UAT tests (requires app running at localhost:5000)
cd uat
npm install
npx playwright install chromium
npm test

Development

Visual Studio:

  1. Open ModPulse.sln
  2. Set ModPulse.Api as startup project
  3. Press F5

CLI:

dotnet build
dotnet test
cd src/ModPulse.Api && dotnet run

License

The GPL V2 license applies to this project. All copyrights belong to their respective copyright holders and all trademarks belong to their trademark holders.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.)
S
Description
A lean, high-performance headless Modbus TCP/RTU data-logger and pulse-controller with a single-page web GUI
Readme
532 KiB
Languages
C# 49.6%
JavaScript 19%
HTML 15.4%
CSS 9.7%
PowerShell 3.2%
Other 3.1%