Build apps for NemDisplay New
Make an app in HTML, CSS and JavaScript that NemDisplay's customers can put on their screens as a slide in the playlist.
What you can build
Apps that show data from your own or your customers' systems on the screen, such as today's menu from the canteen system, today's bookings or the waiting time in a queue.
Runs in a sandbox
Each app runs in its own sandboxed iframe on the player with a strict CSP. It has no access to the player, other apps or the network.
Data through NemDisplay
NemDisplay's data proxy fetches data from the address in the manifest and sends only the result to the screen. API keys stay on the server and never reach the screen.
Offline on the box
The app's files and the latest data are stored on the player, like images and video. If the network drops, the app keeps running with the last data it got.
Every screen format
Landscape and portrait screens and frames in a layout. The app gets its size from the player and scales with NemDisplay's typography.
How it works
- Build the app. An app is a folder with
manifest.json, HTML, CSS, JavaScript and translations. Test it in the emulator withnd-app dev. - Upload a version.
nd-app publishvalidates, packs and uploads the app as a draft. The zip can also be uploaded under Developer in app.nemdisplay.dk. A draft can run on the developer account's own screens. - Submit for review.
nd-app submitsends the version to NemDisplay for review. - Customers add it. An approved app is listed in app.nemdisplay.dk under Add app → From partners, with your company name and the domains the app fetches data from.
The developer account
- Free, with no subscription and no trial that runs out.
- For companies with a Danish CVR number.
- At most 3 screens of any player type, so the app can be tested on real hardware.
- The account's screens show the mark "Developer account – not for production". The account is for development, testing and demonstration.
- Two-factor sign-in is required.
- The Developer menu in app.nemdisplay.dk: your apps, versions with findings and review answers, upload, your own secrets and a data source test.
You create the account yourself (in Danish) with your CVR number and tell us what you have built before and which apps you plan to make. We review the sign-up, usually within 3 working days. The account is covered by the developer agreement and the terms.
The nd-app toolkit
A template, a local emulator with the same sandbox and CSP as the screen, the same validation as the server, packing and upload. It needs Node.js 18 or newer and has no dependencies. The zip contains the tool, the SDK, the template, the example app "Dagens menu" and the guide (README.md, in Danish).
# in the unpacked folder nd-app-devkit/ node devkit/bin/nd-app.js init canteen-menu # new app from the template cd canteen-menu node ../devkit/bin/nd-app.js dev # emulator on http://localhost:5173 node ../devkit/bin/nd-app.js validate # the same checks as the server node ../devkit/bin/nd-app.js pack # dist/<id>-<version>.zip node ../devkit/bin/nd-app.js publish # upload as a draft (ND_API_KEY, ND_ACCOUNT) node ../devkit/bin/nd-app.js submit 1.0.0 --note "First version"
With npm link in devkit/ the tool works as the command nd-app. The emulator has a control bar for screen size (1920 × 1080, 1080 × 1920, 4K), frames, language, theme, online/offline, stale data, no data and show/hide, and a log pane with every message, the app's log and CSP violations. publish and submit use an API key with the Editor or Administrator role on the developer account.
The SDK
nd-sdk.js and nd-tokens.css connect the app to the player. The template loads them.
nd.ready(ctx => render()); // first paint, once after init nd.onShow(fn) nd.onHide(fn) // the slide becomes visible / leaves the screen nd.onData((data, meta) => render()); // new data from the data proxy nd.onResize(fn) nd.onOnline(fn) nd.settings nd.data nd.meta nd.locale nd.theme nd.size nd.online nd.t("menu.title", { count: 3 }) // translation from i18n/da.json and en.json nd.format.date(nd.now(), "time") // the screen's language and time nd.format.number(85, { style: "currency", currency: "DKK" }) nd.done() // end the slide early nd.log.info(msg) nd.log.warn(msg) nd.log.error(msg)
| Field | Content |
|---|---|
nd.settings | The customer's settings from the form in app.nemdisplay.dk. Secret fields are never included. |
nd.data, nd.meta | Data from the data source and {fetchedAt, stale}. If the source fails, the last good data are kept with stale: true. |
nd.locale | The screen's language, da or en. |
nd.theme | The account's theme {font, bg, text, accent}, also as --nd-font, --nd-bg, --nd-text and --nd-accent. |
nd-t-* | The typography of NemDisplay's own apps: nd-t-title, nd-t-label, nd-t-big, nd-t-body, nd-t-meta, nd-t-source and nd-t-muted. The sizes follow the app's frame. |
The manifest
manifest.json in the root of the zip describes the app, the fields the customer fills in and where the data comes from.
{
"manifest_version": 1,
"id": "dk.kantinekassen.menu",
"version": "1.2.0",
"name": { "da": "Dagens menu", "en": "Today's menu" },
"developer": { "name": "Kantinekassen ApS", "support_email": "support@kantinekassen.dk" },
"entry": "index.html",
"sdk": "^1.0",
"renderer": "bundle",
"settings": [
{ "key": "shop_id", "type": "text", "required": true, "label": { "da": "Butiks-id", "en": "Shop ID" } },
{ "key": "api_key", "type": "secret", "required": true, "label": { "da": "API-nøgle", "en": "API key" } }
],
"data": {
"source": "http",
"url": "https://api.kantinekassen.dk/v2/shops/{{settings.shop_id}}/menu/today",
"headers": { "Authorization": "Bearer {{settings.api_key}}" },
"allowed_hosts": ["api.kantinekassen.dk"],
"refresh_seconds": 900,
"personal_data": "none"
},
"permissions": [],
"locales": ["da", "en"],
"preview": { "settings": { "shop_id": "demo" }, "data": "preview/data.json" }
}
- Required:
manifest_version,idin reverse domain form,version(semver, each upload has its own),namein Danish and English,developer.nameanddeveloper.support_email,entry,sdkandrenderer. - Settings: at most 30 fields of the types
text,textarea,number,bool,selectandsecret. The customer fills them in when adding the app. - Data source:
http,webhookornone. Withwebhookyour own system posts JSON to the installation's webhook address, which the customer sees on the app's settings; the screens show the new data within a minute. - Without code of your own:
renderercan bend:table,nd:listornd:cardsinstead ofbundle. The player then draws your data on one of NemDisplay's templates with the screen's theme, and the zip holds only the manifest.templatesays where the rows are in the data (items), which fields to show (fieldswithpath,label,format) and the title. - Keys only in headers, no personal data yet. The customer's keys and your own may only be in
headers, never in the address.personal_datamust be"none": apps whose data source delivers personal data are not accepted yet.
Rules and limits
- The bundle: at most 10 MB packed, 30 MB unpacked and 500 files. Only
html js css svg png jpg jpeg webp gif woff2 json txt mp4 webm. - No network from the app. The CSP blocks
fetch,XMLHttpRequest,WebSocketand files from other domains. Scripts, styles, fonts and images must be in the bundle. - Data only through the data source. The address must be https, the host must be in
allowed_hosts, and the answer must be JSON of at most 256 KB. - Refresh:
refresh_secondsis at least 60 seconds. - No inline scripts,
evalornew Function, and no external scripts. permissionsmust be empty.
Review
- Automatic on upload: the manifest, file types, sizes and a static check of the code. With errors the version is not saved, and the findings are shown in nd-app and under Developer.
- Automatic test run: within a few minutes the version runs in headless Chrome with the manifest's
previewsettings and data, in 1920×1080 and 1080×1920, in Danish and English. Four screenshots and findings (nohello, noready, errors in the log, a blank picture) are shown on the version under Developer and to NemDisplay's reviewer. - Manually by NemDisplay before each version reaches customers: that the app runs stably on the player, shows something sensible without data and without network, uses
nd-t-*, has texts in Danish and English and only fetches data from the domains in the manifest. - Response time: the goal is an answer within 3 working days. A rejection comes with a reason.
- Versions cannot be changed after upload. NemDisplay can withdraw a version or an app from every screen.
Price
The developer account is free. For now, all apps from partners are free for customers.
Get started
Support · Terms · Privacy policy · NemDisplay is operated by MGJ Development, CVR 31961742.