Developer manual.
Everything an app can do on an ArdaForm device, one area per page, each with small complete examples. Written for a developer who has never seen ArdaForm; if you have not run an app yet, the quickstart is the faster way in.
How it fits together
An ArdaForm app is a folder of HTML, CSS and JavaScript. ardaplayer — one program, the same on your desk and on every device — serves that folder to its own browser engine and puts one object, window.Arda, in the page before your first script runs. Through it the page reads its settings and data, writes records back, and reaches the hardware: printers, cameras, screens, the on-screen keyboard. ArdaForm (the portal and the servers behind it) holds the data, packs your code from GitHub and sends it to devices.
- Definitions are yours, values are the operator's. Your
app/manifest.jsondeclares the datasets and settings; people in the portal fill in the values. - Data comes down, records go up. A device mirrors the datasets it reads and sends what it records through a durable outbox. It works offline and catches up.
- The app picks the moment for updates. A new version is downloaded and staged; your page is asked before it reloads.
- The same code runs on a desk.
ardaplayer -devruns the folder locally with no network, fake data and simulated hardware.
Contents
| Page | What it covers |
|---|---|
| Start | An empty folder to a running app in -dev, with a setting, a dataset and seed data. |
| The app folder | What goes where: app/, gui/, marketplace/, seed/, arda.dev.json; what is packed; what to keep out of git. |
| The manifest | app/manifest.json: its four sections, how it is checked, and what happens when it changes. |
| Settings | Every setting type, rows, perDevice, presets, secrets, and reading Arda.config. |
| Datasets and sync | Arda.db: reading, pushing, status(), needForBoot, partitions, offline, and what a device sees compared with a desk. |
| Files | The project's file library under /storage/, files needed at boot, progress. |
| The device | Arda.device(), .can, .features, events, power, Wi-Fi, barcode and card readers, logging. |
| The keyboard | Arda.keyboard(): layouts, fields, masks, till entry, date and time pickers, the PIN pad, styling. |
| Printers and serial | Arda.printers (copies, a status per copy) and Arda.serial. |
| Cameras | Arda.camera: playing a camera in the page, on a second monitor, ONVIF discovery, Raspberry Pi limits. |
| Screens and sound | More than one screen, brightness, scale, the Primary screen, volume. |
| Webhooks | Arda.webhook.call(), what your server receives, signatures, a webhook with no URL. |
| Headless apps | An app with no screen: what differs, fetch and WebSocket. |
| Android devices | The Android app: installing it past Android’s warnings, activating it, kiosk mode as device owner, what an app cannot do. |
| The settings page | Your own settings page in the portal: gui/settings/, ArdaGUI, the sandbox. |
| Developer mode | -dev and every key of arda.dev.json; local runs and real devices; -unbind. |
| Packaging and updates | From a push to a device: packing, apply policies, updateStart, player updates. |
| Troubleshooting | The order to do things in, the mistakes that cost the most time, and where to look when nothing shows. |
Conventions
Ardais injected before your first script. You never import it, and it exists in developer mode, on a kiosk and in a headless app alike.- Most calls return a promise. A refusal rejects with an
Errorwhose message is a sentence you can show to the person at the device.Arda.config,Arda.screens.list()andArda.camera.url()answer straight away. - Examples are written in ES5-style JavaScript with
.then(), because the same code then also runs headless.async/awaitworks in a page. - A call that needs a particular player release says so. Where a device's build might lack something, test
Arda.device().features(see features). - Each page ends with Checked: notes saying how its examples were verified. Anything that could not be run here is marked not verified against a device.