Documentation for digiview
How digiview works, what it needs, and how to run it. Everything here describes digiview ALPHA - 0.5.0.
On this page
What digiview is
It schedules and delivers advertising to a network of screens that you operate: lobbies, atriums, retail and transit. Your team sells share of voice by screen group, the server turns bookings into a signed plan for every screen, each screen plays that plan to its own clock, and every play comes back as proof that is reconciled against the booking.
It is built for operator-run networks. Your staff book on the advertiser's behalf, and partners and BI tools read the results through the public API. It is self-hosted: the server, the database and the storage are yours.
- Book: share of voice on a 60-second loop, sold by screen group, checked live against inventory.
- Play: a signed 7-day plan and its media cached on every screen, so playout carries on through an outage.
- Prove: proof of play written on the screen, uploaded idempotently, acknowledged after commit and reconciled hour by hour.
How it fits together
The server is one Go binary that runs in several roles from the same image:
api- The console's back end, the device edge (HTTPS with mutual TLS), the public API and the live update stream (server-sent events) that keeps the console current.
worker- Background jobs: compiling plans, reconciliation, analytics rollups, reports, SIEM delivery and threat intel.
worker(media queue)- Probing, conforming and encoding uploaded media.
migrate- Runs the database migrations once, before the other roles start.
Beside it run PostgreSQL 18, S3-compatible object storage for media and archives, the web console (Next.js) and Caddy as the ingress. Caddy routes three host names on port 443:
| Host | What it serves |
|---|---|
app.digiview.example.net | The console and the phone installer, signed in through your identity provider |
edge.digiview.example.net | The device edge. TLS is passed through to the server, which checks each player's client certificate |
api.digiview.example.net | The public REST API for partners and BI |
Players are small Intel computers on an immutable Linux image. They talk only to the edge, over HTTPS with mutual TLS, and fetch media from your storage's content-addressed bucket.
Names you will type
DSMS is the product's internal name; you'll see it only in commands, variables and keys:
dsms: the server binary and its container images.dsmsctl: the operator command line (database roles, the basemap, analytics backfill, releases).dsms-agent: the agent on every player.DSMS_*: every server setting is an environment variable with this prefix; secrets are read fromDSMS_*_FILEpaths.dsms_: the prefix of public API keys and tokens, for exampledsms_live_sk_….
Everywhere else, in the console, on screens and in reports, the product is digiview.
Requirements
Server
- A Linux VM on amd64. The single-VM deployment is written for AlmaLinux 10 with rootless Podman.
- PostgreSQL 18, managed or self-run. A managed service with point-in-time recovery is recommended.
- S3-compatible object storage, for example Cloudflare R2 or Garage, with a bucket served read-only to players.
- An OpenID Connect identity provider for console sign-in.
- DNS names for the console, the device edge and the API. You create an offline device CA root with
dsmsctl ca; device certificates and the edge's own server certificate are issued from an intermediate under it, so the device edge needs no public certificate authority.
Players
- An x86-64-v2 Intel mini PC with VA-API video decode. AV1 hardware decode is needed for 4K panels.
- One HDMI output per panel, and a wired uplink, usually Ethernet to a 4G router.
- See Hardware for the design basis and the 1080p fallback.
People
- Any current evergreen browser for the console. The installer pages are built for a phone.
Compose, for evaluation
Tier 1 runs the whole back end on one machine from a single compose file, on Docker or Podman: PostgreSQL, Garage for S3, a mail catcher, a development identity provider, the migrate, api and worker roles, and the console. We use it for evaluations and demos, and it can drive simulated screens so you can watch plans compile, publish and come back as proof of play without any hardware.
The single-VM deployment
Tier 2 is one AlmaLinux 10 VM running rootless Podman under a dedicated user, with every service as a Podman Quadlet unit: Caddy, migrate, api, worker, the media worker, the console, the OpenTelemetry collector and the backup jobs. PostgreSQL 18 is a managed database with point-in-time recovery.
- Bootstrap: a cloud-init file sets up the user, packages, kernel settings, the firewall, logging and image trust. Only release-signed images may run.
- Secrets: kept encrypted with SOPS and installed as Podman secrets, mounted read-only and read through
DSMS_*_FILE. - Hardening: every container runs as an unprivileged user with a read-only root, no capabilities, no new privileges and memory, CPU and process limits.
- Releases and rollback: units never change between releases. Every image is pinned by digest, so a rollback swaps the digests back.
Backups
- A nightly
pg_dump, encrypted withageto an offline key, so the server itself cannot read past dumps. 35 daily and 12 monthly dumps are kept. - A nightly copy of media originals, manifests and the proof-of-play archive from your primary storage to a second provider (Backblaze B2 in the reference deployment).
- Both jobs write heartbeats, and an alert fires when a backup or a copy is older than it should be.
Screens keep their proof of play for 7 days after the server acknowledges it, so a restore to a point within the last 7 days can recover plays from the screens: the restore runbook asks them to upload again (REPLAY_POP). The restore drill has not run yet.
Observability
Every role is instrumented with the OpenTelemetry SDK. A bundled collector, dsms-otelcol, receives the signals and forwards them in one of four modes:
| Mode | Sends to |
|---|---|
otlp | Any OTLP back end over HTTP |
promrw | Prometheus remote write |
victoria | VictoriaMetrics and VictoriaLogs |
debug | Nowhere: the collector logs what it would send |
The collector keeps a persistent queue on disk, so it survives a back-end outage of up to about 6 hours (a 1 GiB queue) without dropping signals. Nothing in digiview depends on the collector being up. Device telemetry can be exported too: see OpenTelemetry.
Scaling
The server runs on one VM today. The roles are separate processes that share only the database and storage, so it is designed to move to Kubernetes when a network outgrows one server. A Kubernetes deployment is not available in this release.
Hardware
The design basis is an Intel N100-class mini PC: x86-64-v2, VA-API decode, one HDMI output per panel and a wired uplink.
- 4K panels need AV1 hardware decode.
- Older Intel N-series boxes without AV1 decode play 1080p. Ad renditions are AV1 only, so put those screens in groups with a 1080p panel class.
- Panel classes: 1080p30, 1080p60, 2160p30 and 2160p60. A group has one panel class, orientation and loop length.
- NVIDIA and AMD graphics are not supported.
Flash and pair
- Flash the player image to the box and power it on. It starts up and shows Pair this screen with a QR code and an 8-character code, for example
K7Q4-M2XD. - An installer scans the QR code with their phone, which opens
/install/claimin the console, or types the code there. - The installer picks the screen the player drives and works through the checklist: certificate issued, online over mTLS, plan received, clock trusted, RTC battery, display, power control, readiness, the first paid slot, and identify (the installer confirms the banner shows on the right panel).
- The player fetches its assignment and its plan, and starts playing at the next loop boundary.
/install/diag shows a player's diagnostics to an installer on site.
Device security
- Each player generates its own P-256 key; the private key never leaves the device.
- On claim, the server issues a 30-day client certificate for mutual TLS, and the player renews it itself before it expires. An alert fires when a renewal is overdue.
- Plans, assignments and manifests are signed (DSSE), and the player refuses anything that does not verify.
- You can suspend a screen (it stops receiving plans) or revoke it (its certificate is refused) at any time.
Updates
- The agent installs signed releases into A/B slots. Releases are verified against pinned keys. If the new agent fails its health checks, the player goes back to the last good slot and reports
AGENT_REVERTED. - The OS updates as a whole image. Health checks (greenboot) run after a reboot; an image that fails them is rolled back and the player reports
OS_ROLLED_BACK. - Channels: each screen follows a release channel, lab, canary or stable, so you can try a release on a few screens first.
Rest periods
Some buildings want their screens off at set times. Every site has a building schedule: weekly rest windows, plus dated exceptions to rest or to stay on, in the site's local time and snapped to 15 minutes. A screen inherits its site's schedule or overrides it, and operators can rest a screen now or wake it.
- The player follows its rest schedule on its own clock, so it rests on time even offline.
- The panel is switched off by the panel's own timer, or by SICP over RS-232 or over the LAN.
- Rest periods are not sellable: a quantum where every screen in a group rests has no capacity, and the booking checks show it.
- The console shows a resting screen as Resting, never as offline.
Idle screens
Unsold time is house time. It plays your house loop, or a calm idle screen in your brand: the lockup in the corner, your idle lines (for example Make every screen count.), and the date and time, which are on by default. A short stinger can introduce house time.
- Idle and stinger clips are rendered on the server from your brand kit and played as video; the player runs no web content.
- Long-running idle states drift slowly so no bright pixel stays put.
- Idle content only ever fills house time. It never moves or shortens a paid slot.
Loops and groups
- A screen group is the unit of sale: screens that share an orientation, a panel class and a loop.
- The default loop is 60 seconds. Spots are sold in 5-second units; the standard spot is 15 seconds.
- Inventory is counted in 15-minute quanta. A booking claims unit-loops per quantum: a 15-second spot in every loop of a quarter-hour claims 45.
Booking
A booking starts as a draft: an advertiser, a campaign, screen groups, first and last days, a number of spots per loop and the creatives. Every change is checked by the server as you type, and the Validation card shows its answer: the exact share of voice and plays per screen per day, the most spots that fit, the claim per quantum, the cache size and new download per screen, and any conflicts by day and time with the nearest cadences that do fit.
- Hold reserves the inventory for 24 hours, once extendable to 48.
- Book turns the hold into a booking; the affected groups recompile and the plan switches at the first loop boundary after the booking commits.
- Edits and make-goods claim the same ledger as bookings, with the same checks.
Inventory is claimed in one database transaction, in a fixed lock order, so concurrent holds can never oversell and never deadlock.
Priority layers
| Layer | What it is |
|---|---|
| L0 emergency | Emergency messages, ahead of everything |
| L1 takeover | A booked takeover of every slot |
| L2 guaranteed | Share of voice sold by group |
| House | Your house loop and idle screens, in unsold time |
Emergency messages
One action puts an emergency message on the screens in scope at L0, ahead of all paid content, for a duration you set: 30 minutes by default, up to 4 hours. It is signed like any plan. Online screens in scope switch to it within a frame of receiving it, interrupting the slot in flight. A screen that is offline shows it when it reconnects, if it is still active.
Publish
- The server compiles a group's bookings into a signed plan that runs 7 days ahead, and a manifest of the media it needs.
- Each screen fetches the manifest and caches the media, then applies the new plan at the first loop boundary at or after its effective time, so every screen in a group switches together.
- Readiness never blocks applying: a slot whose media is still downloading shows house content until it is cached.
- The Publish page shows each screen's status, plan, readiness, bytes remaining, horizon and last acknowledgement.
- An alert fires when a screen's plan horizon falls below 4 days.
Media
Uploads are probed and checked against the acceptance rules: kind and container, size (up to 4 GiB), duration against the booked spot, aspect ratio (within 1 %), resolution, frame rate, interlacing, HDR, rotation, audio and image colour. Each rule either rejects the source, fixes it and says so, or warns.
- Accepted media is conformed to the exact frame count of the spot and encoded to AV1 for each panel class it will play on.
- Audio is removed: screens play silent.
- The console shows a 720p preview.
Proof of play
- A screen writes a proof-of-play row to its local write-ahead log when a slot starts, and closes it when the slot ends.
- Rows are uploaded idempotently: an upload repeated after a power cut or a lost answer never creates a second play.
- The server acknowledges rows only after it has committed them, and the screen keeps them for 7 days after the acknowledgement.
In a 50-device simulation against a real server, 26,038 plays over 2 h 10 min of simulated time matched the plan slot for slot, and 50 simulated power cuts lost or duplicated none. The field pilot has not run yet.
Reconciliation
Every hour, the server reconciles what was planned for each screen against what was played. The run-time report, Planned vs delivered, shows contracted and qualified plays, booked and delivered share of voice, shortfall and its causes by day, group or screen, with a watermark that says up to when delivery data is complete.
Map
- Sites on a self-hosted basemap: the tiles are a file on your server, so the map makes no third-party requests.
- Areas from the bundled geo pack
sg/2026.1: Singapore's URA regions and planning areas (Master Plan 2019), and H3 cells. - Heat layers: delivered share of voice, delivery rate, uptime, availability, fill, shortfall rate, contracted time and screens.
- An area with fewer than 3 screens is shown as Fewer than 3 screens and its numbers are withheld.
- Site addresses are looked up through Singapore's OneMap service, a server-side call. You can pin sites by hand instead.
- Postal districts and countries other than Singapore are not available yet.
Analytics
Proof of play rolls up into an analytics store. Explore pivots plays by site, screen, group, advertiser, hour and area; the play log lists individual plays; uptime shows when screens were playing. Views can be saved.
| Data | Kept for |
|---|---|
| Hourly analytics | 35 days |
| Daily, per screen | 12 months |
| Monthly, per group and region | 12 months |
| Proof of play on the screen | 7 days after acknowledgement |
Nothing in analytics is kept for more than 12 months.
Reports and exports
- Exports in CSV, NDJSON, Parquet and PDF.
- Scheduled reports by email, with download links you can revoke.
Public API
The public API gives partners and BI tools access to your network's data: sites, screens and screen groups, devices, advertisers, campaigns, creatives and line items, planned against delivered airtime, the hourly reconciliation record, individual plays, analytics and device health. Every number is the one the console and its reports show. It is described in OpenAPI 3.1, served by the API itself at https://api.digiview.example.net/v1/openapi.yaml (and /v1/openapi.json).
- 38 paths under
/v1, all reads except creating an export. - Authentication: an API key from Settings › API clients, or OAuth 2.0 client credentials, sent as
Authorization: Bearer. Keys expire after 90 days by default; tokens live one hour. - Scopes:
inventory:read,fleet:read,telemetry:read,campaigns:read,delivery:read,analytics:read,geo:read,exports:writeand more. - Disclosure: third-party clients get the restricted partner profile: they see regions of one region set, never sites or screens, and areas with too few screens are suppressed.
- Rate limits are stated in the
RateLimitandRateLimit-Policyheaders of every response. - Paging uses opaque cursors, up to 1,000 items a page. Creating an export takes an
Idempotency-Key. Errors are RFC 9457 problem documents.
curl -H "Authorization: Bearer $API_TOKEN" \
"https://api.digiview.example.net/v1/plays?limit=1000"SDKs
Go and TypeScript SDKs generated from the OpenAPI description are supplied with the release. They are not published on public package registries.
SIEM
The server ships its security events, such as sign-ins, access changes and device enrolments, to the destinations you configure:
- syslog, as CEF, LEEF 2.0 or RFC 5424 JSON (QRadar reads LEEF);
- Splunk HTTP Event Collector;
- Elasticsearch (ECS) and OpenSearch;
- Microsoft Sentinel.
Packaged content for each family (parsers, field mappings and examples) comes with the release. Delivery was tested against rsyslog, Elasticsearch and OpenSearch, and against a contract fake of Microsoft Sentinel with a manual staging check. None of these is a vendor-certified connector.
Threat intel (TAXII 2.1)
- Consume: subscribe to TAXII 2.1 feeds of STIX 2.1 indicators. Indicators can block abusive sources at the edge, behind safeguards: networks you protect are never blocked, a circuit breaker stops a feed that suddenly blocks too much, and borderline indicators wait in a review queue. Authenticated screens are never IP-blocked. Changing intel settings needs a fresh sign-in.
- Publish: a built-in TAXII 2.1 server at
/taxii2/, with the API root/taxii2/dsms/, lets your SOC read what digiview has seen.
OpenTelemetry
Device telemetry (see the 39 metrics) can be exported over OTLP to any OpenTelemetry back end, as metrics named dsms.device.*. Export is on when you set DSMS_TELEMETRY_EXPORT_ENDPOINT, or when OpenTelemetry is on (then it goes to the bundled collector).
| Variable | What it does |
|---|---|
DSMS_TELEMETRY_EXPORT_ENDPOINT | The OTLP endpoint. Unset: telemetry goes to the bundled collector when OpenTelemetry is on, otherwise nowhere |
DSMS_TELEMETRY_EXPORT_LEVEL | core (the default) or detail |
DSMS_TELEMETRY_EXPORT_TEMPORALITY | delta (the default) or cumulative |
DSMS_TELEMETRY_EXPORT_NAMES | Site and screen names on dsms.device.info (on by default); off exports IDs only |
DSMS_TELEMETRY_EXPORT_MAX_AGE | How old an uploaded window may be and still be exported (7 days by default) |
Extra headers, such as an authentication token, come from DSMS_OTEL_HEADERS_FILE. Exported series are capped at 150,000 (DSMS_TELEMETRY_MAX_SERIES). When a fleet would exceed the cap, export steps down: from detail to core, then to per-device series for unhealthy devices only plus per-site aggregates.
Security model
- The console and its API are served from one origin. People sign in through your identity provider over OpenID Connect; there is no SAML.
- Roles, such as admin, traffic and installer, limit what each person can do.
- Changing threat-intel settings asks for a fresh sign-in.
- Players authenticate with their own certificates and accept only signed plans and releases.
- The console loads nothing from third parties: fonts and map tiles are served by your server.
Reporting a vulnerability
Write to security@kazlabs.co. Our security.txt has the details.
Device telemetry: the 39 metrics
Players sample every 10 seconds, aggregate in 5-minute windows and upload in compact hourly batches. Core metrics are always collected; detail metrics only when a screen's telemetry level is detail. Telemetry is diagnostic only and never billing evidence.
| Area | Metrics (dsms.device. + name) |
|---|---|
| CPU | cpu.utilization, cpu.temperature, cpu.throttle.events, cpu.frequency (detail) |
| Pressure | psi.cpu.some_avg10, psi.memory.some_avg10, psi.io.some_avg10 |
| Memory and disk | memory.available, process.rss, fs.var.free, cache.used (detail) |
| SSD | ssd.percentage_used, ssd.available_spare, ssd.available_spare_threshold, ssd.critical_warning, ssd.temperature, ssd.media_errors, ssd.unsafe_shutdowns, ssd.data_written, ssd.power_on_hours |
| Network | wan.up_time, link.rtt, dns.duration (detail), network.bytes, wait.errors (detail), network.throughput (detail) |
| Playback | player.restarts, frames.dropped, frames.expected, pop.start_delta, pop.plays, house.time, display.ok_time, panel.on_time (detail), pop.unacked, pop.oldest_unacked_age |
| Clock and agent | clock.offset, clock.error, agent.restarts |
Alerts
Every alert has a runbook that says what it means and what to do. They cover:
- Screens: screens offline, plan horizon below 4 days, certificate renewal overdue, rest not honoured, agent reverted.
- Hardware: device thermal (sustained CPU heat or throttling), memory pressure, SSD wear and SSD failing, playback quality.
- Proof of play: coverage and anomalies, ingest lag.
- Server: disk, stuck jobs, units failed, media queue age, backup and copy age, key expiry, the collector down.
- Integrations: SIEM destinations failing or lagging, telemetry export backlog and cardinality, threat-intel feeds stale or tripped, geocoding failing.
Not in this release
- Booking by flights or dayparts, and run-of-network booking.
- Advertiser self-serve booking and payments.
- Webhooks, and an API that writes anything but exports.
- HEVC or H.264 ad renditions: ads are AV1.
- Web pages or live HTML on screens.
- Postal districts, and countries other than Singapore on the map.
- A Kubernetes deployment.
- SAML sign-in.
Want a walkthrough on your own network?
Talk to us. We reply within 1–2 business days.