Skip to main content

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.

info

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:

tip

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:

ScriptPurpose
npm run startLaunch a local dev server with the Emulator
npm run buildBuild the applet to the dist folder
npm run uploadUpload the built applet to signageOS
npm run connectConnect the applet to a real device for debugging
info

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
tip

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