demp.dev — developer projects

Build on DEMP

Open-source tooling, simulators and reference implementations for the Decentralized Emergency Management Protocol. Explore, prototype and integrate DEMP into your own Safety Information Systems.

Projects

Concrete tools and references to accelerate SIS implementations and DEMP ecosystem exploration.

demp-sim alpha

A Rust command-line tool that replays DEMP scenario files or consumes live event streams, rendering SIS nodes, Federations, Alerts, CDM polls and information flows in a color-coded terminal interface.

rustclisimulatorterminalfederation
v0.1.0-alpha details →
demp-sim-data-format draft

The JSON input format consumed by DEMP-SIM. A Simulation File declares a static DEMP network topology and a time-ordered event sequence — alerts, CDM polls, state changes, memberships — for the simulator to replay.

formatjsonschemascenario
v0.1.0-draft details →

DEMP Simulator

A JSON-driven simulator that renders DEMP Network graphs, animated information flows and live operational state — making the protocol tangible for developers, integrators and practitioners.

Profile: DEMP-SIM v0.1.0-alpha is written against DEMP-SPEC 0.6.0. All concepts (SIS, Safety Zone, Entity, Device, Federation, Alert, CDM) map directly to normative definitions in the specification.
network graph
Renders clusters (Federations), SIS nodes and their interconnections in a live, interactive graph.
information flow
Animates protocol messages between nodes — alerts, CDM polls, auth, discovery and custom message types.
live state
Reflects real-time operational state of every SIS, Zone, Entity and Device throughout playback.
alert propagation
Models all alert scopes: Zone, System, Federated and Open — including escalation transitions via alert.update.
cdm polling
Visualizes Consensus Decision-Making polls, votes and outcomes (approved, rejected, repeated, fallback).
scenario files
Plain JSON — version-controllable, shareable and validated against a published JSON Schema.

Getting Started

Create your first DEMP-SIM scenario in five steps.

01

Read the DEMP Specification

All DEMP-SIM concepts map directly to DEMP-SPEC. Familiarize yourself with the core architecture — SIS, Safety Zones, Entities, Devices, Federation and Alerts — before authoring a scenario. Available at demp.ch/spec/latest.

02

Define your topology

Start your simulation file with a network object and one or more nodes (SIS). Add zones, entities and devices to each node. Optionally group SIS into clusters (Federations).

03

Author your event sequence

Add an events array. Each event has an id, a time offset (e.g. PT30S) and a type-specific payload. Model alerts, CDM polls, state changes and membership transitions.

04

Validate your scenario

Validate against the JSON Schema at https://demp.dev/sim/data-format-0.1.0-draft.schema.json using AJV or Hyperjump. All IDs must be unique slugs or UUID v4 across the entire document.

05

Load into DEMP-SIM

Pass your Simulation File to the DEMP-SIM engine and replay the scenario. Follow the project on GitLab for release updates.

DEMP-SIM Data Format

A standalone JSON specification — the Simulation File — that declares a DEMP network topology and a time-ordered event sequence for DEMP-SIM to replay. Version-controllable, schema-validated and independent of the simulator runtime.

{
  "$schema": "https://demp.dev/sim/data-format-0.1.0-draft.schema.json",
  "profile": "https://demp.ch/spec/0.6.0",
  "meta":    { /* scenario metadata               */ },
  "network": { /* DEMP Network descriptor          */ },
  "nodes":   [ /* Safety Information Systems (≥1) */ ],
  "clusters":[ /* Federation definitions           */ ],
  "events":  [ /* time-ordered simulation events   */ ]
}
"meta": {
  "id":          "scenario-alpine-flood-2026",
  "name":        "Alpine Flood Response",
  "description": "Flash flood alert propagation across a federation.",
  "author":      "DEMP Working Group",
  "keywords":   ["flood", "federation", "open-alert"],
  "startDate":   "2026-03-01T08:00:00Z",
  "endDate":     "2026-03-01T09:00:00Z"
}
field type req description
id string yes Unique scenario identifier (slug)
name string yes Display title
description string no Free-text scenario description
author string no Author or organization
keywords string[] no Classification tags
startDate ISO 8601 no Simulation start time (UTC)
endDate ISO 8601 no Simulation end time (UTC)
"network": {
  "type":      "dev.demp.network",
  "id":        "net-ch-alps",
  "name":      "Swiss Alps Emergency Network",
  "scope":     "wan",
  "discovery": true
}
field type req description
type string yes Always "dev.demp.network"
id string yes Unique network identifier
name string yes Display name
scope enum yes "wan" | "lan" | "vpn" | "adhoc"
discovery boolean no Whether the network supports SIS discovery (default: false)
{
  "type":      "dev.demp.sis",
  "id":        "sis-city-a",
  "name":      "City A SIS",
  "state": {
    "type":         "dev.demp.sis.state",
    "availability": true,
    "connectivity": 95
  },
  "access":    { "type": "dev.demp.sis.hub", "visibility": "private" },
  "directory": true,
  "zones": [], "entities": [], "devices": []
}
field type req description
type string yes Always "dev.demp.sis"
id string yes Unique SIS identifier
name string yes Display name
state.availability boolean no Operational status
state.connectivity integer no Network quality 0–100
access.visibility enum yes "public" | "private"
directory boolean no Opts in to network directory (default: false)
zones / entities / devices array no Nested objects for this SIS
{
  "type":  "dev.demp.sis.zone.physical",
  "id":    "zone-rhone-valley",
  "name":  "Rhône Valley",
  "state": {
    "type":      "dev.demp.sis.zone.state",
    "mobility": "static",
    "geo": {
      "type":        "Polygon",
      "coordinates": [[[7.3,46.1],[7.8,46.1],[7.8,46.5],[7.3,46.5],[7.3,46.1]]]
    }
  }
}
field type req description
type enum yes "dev.demp.sis.zone.physical" | "dev.demp.sis.zone.virtual"
state.mobility enum no "static" | "dynamic" (physical zones only)
state.geo GeoJSON cond. Required for physical zones (Point, Polygon, …)
state.validFrom ISO 8601 no Zone activation time (UTC)
state.validUntil ISO 8601 no Zone expiry time (UTC)
{
  "type":         "dev.demp.entity",
  "id":           "entity-city-a-ops",
  "name":         "City A Operations Center",
  "role":         { "type": "dev.demp.entity.role.organization" },
  "capabilities": ["alert.create", "alert.respond", "cdm.vote"],
  "state": {
    "type":         "dev.demp.entity.state",
    "availability": true,
    "trust": {
      "certification": { "type": "dev.demp.certification", "status": "issued" },
      "identity":      { "type": "dev.demp.identity",      "status": "explicit" }
    }
  }
}
field type req description
role.type enum yes role.individual | role.organization | role.agent
capabilities string[] no Capability tokens e.g. "alert.create", "cdm.vote"
trust.certification.status enum no "issued" | "expired" | "suspended" | "revoked"
trust.identity.status enum no "tofu" | "explicit" | "delegated" | "self_asserted"
{
  "type":  "dev.demp.device",
  "id":    "device-rain-gauge-01",
  "name":  "Rain Gauge Station #1",
  "owner": { "type": "dev.demp.entity", "id": "entity-sensor-agent" },
  "mode":  "passive",
  "state": {
    "type":         "dev.demp.device.state",
    "connectivity": 100,
    "battery":      85,
    "geo": { "type": "Point", "coordinates": [7.35, 46.23] }
  }
}
field type req description
mode enum yes "active" | "passive"
owner object yes Owning entity typed reference
state.connectivity integer no Signal quality 0–100
state.battery integer no Battery level 0–100 (omit for non-battery devices)
state.geo GeoJSON no Device position — used to infer zone membership
{
  "type": "dev.demp.federation",
  "id":   "fed-southwest",
  "name": "Southwest Regional Federation",
  "participants": [
    { "type": "dev.demp.sis",        "id": "sis-city-a" },
    { "type": "dev.demp.sis",        "id": "sis-vaud"   },
    { "type": "dev.demp.federation", "id": "fed-east"   }
  ]
}
Participants use typed references — a federation can include other federations as members, enabling hierarchical structures as defined in DEMP-SPEC. The type field disambiguates dev.demp.sis from dev.demp.federation.

Events are processed in time order. Time may be ISO 8601 UTC or an ISO 8601 duration offset (e.g. PT30S, PT2M).

alert.zone

Zone Alert for a specific Safety Zone.

alert.system

System Alert for all zones in a SIS.

alert.federated

Federated Alert across a cluster.

alert.open

Open Alert across the DEMP Network.

alert.update

Update alert status, level or scope.

message

Animated information flow between components.

cdm.poll

Initiate a CDM poll within a SIS.

cdm.vote

Record an entity's vote.

cdm.result

Record the CDM poll outcome.

sis.state

State change for a SIS node.

zone.state

State change for a Safety Zone.

entity.state

State change for an Entity.

device.state

State change for a Device.

membership.join

Participant joins a network or federation.

membership.leave

Participant leaves a network or federation.

annotation

Timeline note with optional directed relationship.

// Example: Zone Alert event
{
  "id":   "evt-003",
  "time": "PT6S",
  "type": "alert.zone",
  "payload": {
    "id":          "alert-flood-001",
    "propagation": "zone",
    "node":        { "type": "dev.demp.sis",              "id": "sis-city-a"       },
    "zone":        { "type": "dev.demp.sis.zone.physical", "id": "zone-rhone-valley" },
    "level":       "emergency",
    "status":      "reported",
    "name":        "Flash Flood – Rhône Valley",
    "description": "Water level 2.3m above critical threshold."
  }
}

Contributing & Feedback

DEMP developer projects are open to contributions, feedback and issues. The data format specification and DEMP-SPEC are maintained on GitLab and mirrored to GitHub.