{"id":15197171,"url":"https://github.com/balena-io-experimental/balena-electronjs","last_synced_at":"2025-10-02T13:31:01.523Z","repository":{"id":54494143,"uuid":"49592979","full_name":"balena-io-experimental/balena-electronjs","owner":"balena-io-experimental","description":"electronJS-based resin application template","archived":true,"fork":false,"pushed_at":"2021-02-15T18:45:59.000Z","size":571,"stargazers_count":345,"open_issues_count":30,"forks_count":115,"subscribers_count":43,"default_branch":"master","last_synced_at":"2024-09-24T23:31:22.867Z","etag":null,"topics":["boilerplate","digital-signage","docker","electron","electronjs","kiosk","nodejs","raspberry","raspberry-pi","raspberrypi","resin"],"latest_commit_sha":null,"homepage":"http://resin.io","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/balena-io-experimental.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-13T18:24:04.000Z","updated_at":"2024-08-12T19:20:54.000Z","dependencies_parsed_at":"2022-08-13T17:40:47.670Z","dependency_job_id":null,"html_url":"https://github.com/balena-io-experimental/balena-electronjs","commit_stats":null,"previous_names":["balena-io-experimental/balena-electronjs","balena-labs-projects/balena-electronjs"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balena-io-experimental%2Fbalena-electronjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balena-io-experimental%2Fbalena-electronjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balena-io-experimental%2Fbalena-electronjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balena-io-experimental%2Fbalena-electronjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/balena-io-experimental","download_url":"https://codeload.github.com/balena-io-experimental/balena-electronjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219875703,"owners_count":16554702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boilerplate","digital-signage","docker","electron","electronjs","kiosk","nodejs","raspberry","raspberry-pi","raspberrypi","resin"],"created_at":"2024-09-28T00:43:40.395Z","updated_at":"2025-10-02T13:30:56.251Z","avatar_url":"https://github.com/balena-io-experimental.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# This project is deprecated and replaced by [balena-electron-env](https://github.com/balenablocks/balena-electron-env)\n---\n## Balena Electronjs\n\na boilerplate for developing kiosks, digital signage or other human-machine interaction projects based on [ElectronJS](http://electron.atom.io/) and [balena](http://balena.io)\n\n## Warning regarding armv6\nThis project does not currently support the armv6 architecture (ie Raspberry Pi 0 and 1) due to electron limitations. If the issue is fixed on the electron side, we will include it in this project. More on this [here](https://github.com/electron/electron/issues/4677)\n\n## Getting started\n\n- Sign up on [balena](https://dashboard.balena-cloud.com/signup)\n- go through the [getting started guide](https://www.balena.io/docs/learn/getting-started/raspberry-pi/nodejs/) and create a new application\n- install the [balena-cli](https://github.com/balena-io/balena-cli) on your computer\n- clone or download this repository to your local workspace\n- `balena push \u003capplicationName\u003e`\n- see the magic happening, your device is getting updated Over-The-Air!\n\n## Configure via [environment variables](https://www.balena.io/docs/learn/manage/serv-vars/)\nVariable Name | Value | Description | Device-specific\n------------ | ------------- | ------------- | -------------\n**`RESIN_HOST_CONFIG_gpu_mem`** | a value from `64` to `396` | the amount of RAM dedicated to the GPU | Raspberry Pi (all revs)\n\nApply the above settings in the \"Fleet Configuration\" panel (if applying it for the all devices withing your application), or \"Device Configuration\" panel (if applying it for a single device).\n\n### WHY THIS TEMPLATE\n\nAchieving kinda-smooth desktop application display on devices like the raspberrypi is hard. This project aims to provide a quickstart template.\n\n### URL LAUNCHER config via ENV VARS\n*__!!! Please note that since `0.1.0` the `bool`-based env vars dropped `true` / `false` strings in favour of `0` / `1` ones. !!!__*\n\nsimply set these [environment varables](https://www.balena.io/docs/learn/manage/serv-vars/) in your app via \"Environment Variables\" panel in the balena dashboard to configure the behaviour of your devices.\n\n*__Please note that the `bool` type definition in the table is meant to accept to either `0` or `1` values.__*\n\n* **`URL_LAUNCHER_URL`** *string* - the URL to be loaded. use `file:////usr/src/app/data/index.html` to load a local electronJS (or any website) app - *defaults to* `file:////usr/src/app/data/index.html`\n* **`URL_LAUNCHER_NODE`** *bool* (converted from *string*) - whether or not enable nodejs - *defaults to* `0`\n* **`URL_LAUNCHER_KIOSK`** *bool* (converted from *string*) - whether or not enter KIOSK mode - *defaults to* `1`\n* **`URL_LAUNCHER_TITLE`** *string* - the title of the window. Seen only with `URL_LAUNCHER_FRAME`=`true` - *defaults to* `RESIN.IO`\n* **`URL_LAUNCHER_FRAME`** *bool* (converted from *string*) - set to \"true\" to display the window frame. Seen only with `URL_LAUNCHER_KIOSK`=`false` - *defaults to*  `0`\n* **`URL_LAUNCHER_CONSOLE`** *bool* (converted from *string*) - set to \"true\" to display the debug console -  *defaults to*  `0`\n* **`URL_LAUNCHER_WIDTH`**  *int* (converted from *string*) -  - *defaults to* `1920`\n* **`URL_LAUNCHER_HEIGHT`**  *int* (converted from *string*) -  - *defaults to* `1080`\n* **`URL_LAUNCHER_TOUCH`** *bool* (converted from *string*) - enables touch events if your device supports them  - *defaults to* `0`\n* **`URL_LAUNCHER_TOUCH_SIMULATE`** *bool* (converted from *string*) - simulates touch events - might be useful for touchscreen with partial driver support - be aware this could be a performance hog  - *defaults to* `0`\n* **`URL_LAUNCHER_ZOOM`** *float* (converted from *string*) - The default zoom factor of the page, 3.0 represents 300%  - *defaults to* `1.0`\n* **`URL_LAUNCHER_OVERLAY_SCROLLBARS`** *bool* (converted from *string*) - enables overlay scrollbars  - *defaults to* `0`\n* **`TFT`** *bool* (converted from *string*) - sets the target display to TFT screen like the [piTFT](https://www.adafruit.com/product/1601) but still requires you to set the proper device tree overlay configuration for it  - *defaults to* `0`\n* **`TFT_ROTATE`**  *int* (converted from *string*) - accepted values: 0,90,180,270 - *defaults to* `0`\n* **`ELECTRON_ENABLE_HW_ACCELERATION`**  *bool* (converted from *string*) - enable hardware acceleration - *defaults to* `0`\n* **`ELECTRON_BALENA_UPDATE_LOCK`**  *bool* (converted from *string*) - Enable supervisor update locking (see [Update Locking](#update-locking))\n* **`ELECTRON_APP_DATA_DIR`**  *string* - Override the `appData` directory (see [Electron API Documentation: app](https://electronjs.org/docs/api/app#appgetpathname))\n* **`ELECTRON_USER_DATA_DIR`**  *string* - Override the `userData` directory (see [Electron API Documentation: app](https://electronjs.org/docs/api/app#appgetpathname))\n\n### Update Locking\n\n**NOTE:** Take care to only listen for a response *once*, and avoid sending\nmultiple requests before the response arrived.\n\n```js\nconst {ipcRenderer} = require('electron')\n```\n\n#### Acquiring the Lock\n\n```js\n// Listen for a response\nipcRenderer.once('balena-update-lock', (event, error) =\u003e {\n  if (error) { ... }\n})\n\n// Send the 'lock' command to acquire the lock\nipcRenderer.send('balena-update-lock', 'lock')\n```\n\n#### Releasing the Lock\n\n```js\n// Listen for a response\nipcRenderer.once('balena-update-lock', (event, error) =\u003e {\n  if (error) { ... }\n})\n\n// Send the 'unlock' command to release the lock\nipcRenderer.send('balena-update-lock', 'unlock')\n```\n\n#### Checking the Lock\n\n```js\n// Listen for a response\nipcRenderer.once('balena-update-lock', (event, error, isLocked) =\u003e {\n  console.log('Locked:', error || isLocked)\n})\n\n// Send the 'check' command to check on the state of the lock\nipcRenderer.send('balena-update-lock', 'check')\n```\n\n### Related\n\n- [resin-electronjs vue boilerplate](https://github.com/imomaliev/resin-electron-vue) by [@imomaliev](https://github.com/imomaliev)\n- [balena-electronjs react boilerplate](https://github.com/balena-io-playground/balena-electronjs-react) by [@craig-mulligan](https://github.com/craig-mulligan)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalena-io-experimental%2Fbalena-electronjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbalena-io-experimental%2Fbalena-electronjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalena-io-experimental%2Fbalena-electronjs/lists"}