Smart Site
Home Docs Getting Started ss-data Data Platform System Overview

ss-data Data Platform System Overview

Interface Screenshot

System Overview - Data Platform Home (English UI)

Captured from the live Smart Site system with the English UI. See the zh-CN counterpart for the Chinese-UI screenshot.

1. Product Positioning

Smart SCADA Data Platform (ss-data) is an industrial data visualization and management platform providing end-to-end capabilities from device collection to data presentation for industrial scenarios.

Dimension Description
Product Type Industrial IoT data platform
Target Users Factory operations, energy management, environmental monitoring teams
Deployment On-premises / Private cloud deployment
Core Value Unified device access · Real-time data collection · Intelligent alarm detection · Automated report generation

2. Core Capabilities

Capability Description Module
Device Management Device CRUD, grouping, online status monitoring Device Management
Industrial Protocol Collection Modbus / OPC UA / MQTT / S7 / Virtual devices Collection Management
Data Tags Tag definition, binding, variable management Device Management §4
Alarm Engine Alarm rules, triggers, notifications, escalation Alarm Management
Script Engine Script editing, sandboxed execution, Cron scheduling Script Engine Management
Report System Report design, scheduled export, data sources Report System
Time-Series Data Storage InfluxDB time-series storage, data archiving Storage Management
Real-Time Communication WebSocket push, real-time data Real-Time Communication

3. System Architecture

3.1 Overall Architecture

┌──────────────────────────────────────────────────────────────┐
│                      Frontend (ss-editor)                       │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────────┐   │
│  │ Data Platform │  │ SCADA Editor │  │ Real-time Monitor │   │
│  │   Views       │  │   (Konva)    │  │   Dashboard       │   │
│  │  (Vue 3)      │  │              │  │  (WebSocket)      │   │
│  └──────┬───────┘  └──────┬───────┘  └──────────────────┘   │
└─────────────────────────┼────────────────────────────────────┘
                          │ REST API + WebSocket
┌─────────────────────────┼────────────────────────────────────┐
│                    Backend (ss-data)                            │
│  ┌──────────────────────┴─────────────────────────────────┐   │
│  │              NestJS Application (Port 4000)              │   │
│  │  • REST API Controller                                    │   │
│  │  • WebSocket Gateway (Socket.IO)                          │   │
│  │  • JWT Auth + RBAC                                        │   │
│  └──────────────────────┬─────────────────────────────────┘   │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐         │
│  │ ss-device│ │ ss-collect│ │ ss-alarm │ │ ss-script│         │
│  │  Device  │ │ Collector │ │  Alarm   │ │  Script  │         │
│  └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘         │
│       │            │            │            │                │
│  ┌────┴────────────┴────────────┴────────────┴─────┐          │
│  │              EventBus (EventEmitter2)             │          │
│  └──────────────────────┬───────────────────────────┘          │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐                       │
│  │ ss-storage│ │ ss-report│ │ ss-system│                       │
│  │ Storage  │ │  Report  │ │  System  │                       │
│  └────┬─────┘ └──────────┘ └──────────┘                       │
│       │                                                         │
│  ┌────┴─────────────────────────────────────┐                  │
│  │  SQLite (metadata) + InfluxDB (time-series) │                │
│  └──────────────────────────────────────────┘                  │
└──────────────────────────────────────────────────────────────┘

3.2 Backend Module Layering

Controller  →  Service  →  Repository  →  DB
     ↓
Interceptor/Guard (cross-cutting concerns)
     ↓
EventBus (inter-module decoupling)
  • Global Modules (@Global()): ConfigModule, I18nModule, LoggerModule
  • Infrastructure Package: ss-core provides Auth, EventBus, Pipeline, WebSocket, ConfigWatcher
  • Business Packages: ss-device / ss-project / ss-alarm / ss-script, etc., depend on ss-core
  • Collector Packages: ss-collector-modbus / mqtt / opcua / s7 / virtual

4. Tech Stack

4.1 Frontend Tech Stack

Technology Version Purpose
Vue 3 3.x Composition API + <script setup>
TypeScript 5.2 Strict mode
Vite 5.x Build tool
pnpm 8+ Package manager + workspace
Pinia — State management
Naive UI — UI component library
vue-i18n — Internationalization
Vue Router 4.x Routing
Vitest 1.6 Unit testing

4.2 Backend Tech Stack

Technology Version Purpose
NestJS 10.3 Application framework
TypeScript 5.2 Strict mode
TypeORM — ORM
SQLite (better-sqlite3) — Metadata storage (per-project isolated DB)
InfluxDB — Time-series data storage
Socket.IO — WebSocket real-time communication
@nestjs/jwt + passport — JWT authentication + RBAC
Jest 29.7 Unit testing
node-opcua 2.170 OPC UA protocol
modbus-serial 8.0 Modbus protocol
mqtt 5.15 MQTT protocol
EventEmitter2 — Inter-module event decoupling

5. Use Cases

Scenario Description Core Modules
Factory Monitoring Production line device status monitoring, fault alarms Device Management + Collection + Alarm
Energy Management Water/electricity/gas consumption data collection and analysis Collection + Storage + Report
Environmental Monitoring Temperature/humidity/PM2.5/noise environmental data Collection + Alarm + Report
Device Operations Device health, OEE, predictive maintenance Device Management + Script Engine
Process Optimization Process parameter collection, analysis, optimization Collection + Script Engine + Report

6. Database Isolation Strategy

Data Type Storage Location Description
Global Configuration ss-data/data/ss-data.db system_configs, users tables
Project Data {PROJECTS_DIR}/{projectName}/db/system.db devices, device_groups, etc. tables
Project Configuration projectinfo.json file Not stored in DB
Time-Series Data InfluxDB Real-time data collected from devices

The environment variable PROJECT_DB_MODE=isolated controls the database isolation mode.

7. Quick Entry Points

  • Data Platform Home: http://localhost:5173/system
  • Backend API Docs: http://localhost:4000/api-docs
  • WebSocket Monitor: http://localhost:5173/system/ws-monitor
  • System Settings: http://localhost:5173/system/settings