Create Your First Applet
In this guide you will create a signageOS applet, run it locally in the emulator, and deploy it to a real device. By the end you will have a working applet that controls device volume using the signageOS JS SDK.
This guide is aimed at developers with web development experience. If you prefer an easier approach, use the Web Editor for Applet in Box instead.
Prerequisites
Before you begin, make sure you have:
- Node.js version 10.15.0 or later (download)
- signageOS CLI installed — see CLI Setup
- A signageOS account with at least one organization (create one here)
Install CLI command autocomplete with sos autocomplete install. Read more.
1. Create a New Project
Scaffold a new applet project using the CLI:
sos applet generate
This creates a package.json with preconfigured scripts:
| Script | Purpose |
|---|---|
npm run start | Launch a local dev server with the Emulator |
npm run build | Build the applet to the dist folder |
npm run upload | Upload the built applet to signageOS |
npm run connect | Connect the applet to a real device for debugging |
Already have an existing web application? See Integrating an existing project to add the signageOS JS SDK to your codebase.
2. Write Your First Applet
Open the generated project and edit the main entry file. All signageOS API calls must happen after sos.onReady() resolves:
import sos from '@signageos/front-applet';
sos.onReady(async () => {
// Set the device backlight to 50%
await sos.management.screen.setBrightness(
00:00,
50,
23:59,
50
);
// Download and play a video
const { filePath } = await sos.offline.cache.loadOrSaveFile(
'video-1.mp4',
'https://static.signageos.io/assets/video-test-1_e07fc21a7a72e3d33478243bd75d7743.mp4',
);
await sos.video.play(filePath, 0, 0, 1280, 720);
});
The sos object is the unified API provided by the signageOS JS SDK. It exposes native device functionality — video playback, file storage, hardware management, and more — through a single interface that works across all supported platforms.
3. Run and Test Locally
Start the local development server to run your applet in the browser-based Emulator:
npm run build
npm run start
The emulator opens at http://localhost:8090 by default. Source file changes are watched and the applet reloads automatically.
4. Upload and Test on a Device
Once your applet works in the emulator, build and upload it to signageOS:
npm run build
npm run upload
To verify compatibility with older devices, run npm run escheck before uploading.
This creates a new applet version in your signageOS organization. You can then assign it to a test device using CloudControl Timings — no native app generation required.
For rapid on-device debugging with hot-reload, see Debugging on device.
Next Steps
- Applet Development Workflow — Understand the full development lifecycle, CI/CD integration, and how build quotas work
- Integrating an existing project — Add signageOS to your current web application
- Debugging on device — Connect a physical device via CLI with hot-reload
- Deployment options — Choose the right deployment strategy for your use case
- JS SDK Reference — Full API documentation for the signageOS JS SDK