Build for hyadeOS
Everything you need to go from an empty folder to an app in the Store: setting up hyadeOS for development, building with ACode, talking to the desktop, and publishing updates.
00What is a hyadeOS app
hyadeOS is a web-based OS: an Electron shell on top of a local
Node.js / Express backend (the "kernel", server.js). Every app you see
on the desktop is a web page.
An app is a folder with an index.html. When it's installed it lives in
desktop/apps/<app-id>/, and the desktop opens it inside a window. hyadeOS draws
the window frame for you (move, minimize, maximize, close), so your page only has to fill the inside.
There are two kinds of apps, and the difference matters for what your code can do:
| Kind | Who | Runs on | Can call the system API |
|---|---|---|---|
| System / first-party | Built into the OS, or installed from a hyadeOS or
mariowstech GitHub repo |
The shell's origin | Yes (fetch('/api/...')) |
| Third-party | Any other GitHub owner, or sideloaded from your home folder | Its own isolated origin | No: only the three shell messages in section 04 |
So most community apps should be self-contained web apps: plain HTML, CSS and
JavaScript, with their own data in localStorage or a web service of their own.
01Set up your machine
You need Node.js 22.12 or newer and git. Work on the
development repository: it's where all changes land before they are packed into
stable images.
- Clone the repository
shell
git clone https://github.com/hyadeOS/development cd development - Install dependencies
shell
npm installnpm installdoes not always download the Electron binary on these repos. If Electron fails to start, run its installer once (it writespath.txt):shellnode node_modules/electron/install.js - Boot hyadeOS
shell
npm run start-osElectron starts the backend, shows the boot screen while it checks readiness, then opens the OS fullscreen. You can also double-click
start.bat(Windows), runsh start.sh(Linux) or openstart.command(macOS; runchmod +x start.commandonce first).
Verbose boot
To see each startup stage over the boot logo, turn on verbose boot. It stays on across restarts until you turn it off. Startup errors are always shown, verbose or not.
npm run boot:verbose # turn on
npm run boot:quiet # turn off
npm run boot:status # check the current mode
Repository layout
In development the OS lives in system/. The stable repo has
the same files at its root (and no start-os script). Either way,
electron launcher.js boots it and spawns node server.js.
The kernel listens on port 3000 (HYADEOS_PORT). Third-party apps are
served from a second origin on the next port, 3001 by default
(HYADEOS_APPS_PORT).
development is not meant to be used as your everyday system. For a daily driver,
use the stable repository.
02Your first app with ACode
ACode is the hyadeOS IDE: a Monaco-based editor with a terminal, live runner, error checker and packer. Install it from the Store, or from the Terminal:
get install acode
Projects are ordinary folders in ~/ACode/<project>, so the Files app,
nano and the Terminal can all see them.
- Create a project
In ACode press
CtrlAltN, or from the Terminal:hyadeOS terminalacode new myapp -t app - Run it
Press Run (
CtrlEnter) in ACode. It opens your app in a preview window and shows its errors live. In the Terminal:hyadeOS terminalcd ~/ACode/myapp acode run - Check and build
acode checkscans every file for errors.acode buildchecks the project, then packs it into~/ACode/dist/<project>.zip; a build with errors stops before packing. - Install it on your system
hyadeOS terminal
acode install myappThis asks for your account password. The app then shows up on the desktop like any other.
Templates
| Template | What you get |
|---|---|
blank |
One index.html, ready to fill. |
app |
index.html, style.css and app.js in separate
files, with a working click counter. |
system |
An app that talks to hyadeOS: shows storage use
(/api/system/storage) and Wi-Fi networks
(/api/system/networks). |
Three rules from the starter template
- Keep the
bodybackground transparent to get the system's glass effect behind your window. - Don't draw your own title bar. hyadeOS draws the window frame and its buttons.
- Same-origin system APIs work in the preview, e.g.
fetch('/api/system/networks'). Remember they won't be reachable once your app installs as third-party (section 06).
03Anatomy of an app
Only index.html is required. The other files are optional, but the Store looks for them
by name at the root of your repo's main (or master) branch:
version.json
A single field with a semantic version. The Store compares it to the installed copy to offer updates (see section 08).
{
"version": "1.0.0"
}
App IDs
The app ID is the folder name in desktop/apps/. It may only contain letters, digits,
- and _. IDs of built-in apps (terminal,
settings, store…) are refused, so pick something unique.
04Talking to the shell
Your app runs in an iframe inside the desktop. It talks to the desktop with
window.parent.postMessage. Any app, isolated or not, can send these three messages:
| type | Fields | Does |
|---|---|---|
show-notification |
title, msg |
Shows a system notification. For isolated apps the title is cut to 80 characters and the message to 300. |
maximize-app |
(none) | Toggles your window between maximized and normal. |
close-app |
(none) | Closes your window. |
// Notify the user when an export finishes
window.parent.postMessage({
type: "show-notification",
title: "Export done",
msg: "Your file was saved to ~/Documents."
}, "*");
// A custom "Close" button inside your app
document.getElementById("quit").addEventListener("click", () => {
window.parent.postMessage({ type: "close-app" }, "*");
});
The desktop works out which app sent the message from the window it came from, so an isolated app
can only close or maximize its own window. System apps on the shell's origin also pass
their appId and may set an icon on notifications.
Messages the shell sends you
Listen for message events to react to system changes. For example, when the user
moves the volume slider, every open app window receives:
window.addEventListener("message", event => {
if (event.data?.type === "system-volume-change") {
myAudio.volume = event.data.volume; // 0 – 1
}
});
05System SDK
System apps share a few helper scripts from /desktop/assets/. They are served on the
shell's origin, so a third-party app can't rely on them: copy what you need into
your own app instead.
Dialogs: mDialog
Native alert/confirm/prompt steal keyboard focus in Electron on
Windows and don't match the OS. hyadeos-dialogs.js replaces them with in-page dialogs
that return Promises (and restyles legacy alert() calls too).
<script src="/desktop/assets/hyadeos-dialogs.js"></script>
await mDialog.alert("Saved!"); // undefined
const ok = await mDialog.confirm("Delete it?"); // true / false
const pw = await mDialog.prompt("Password:", { type: "password" }); // string / null
Accent colour: accent.js
Follows the accent the user picks in Settings › Wallpaper & Style. Load it in
<head> right after i18n.js so the first paint already has the right
colours. It sets and keeps updated three CSS variables on :root:
| Variable | Use it for |
|---|---|
--sys-accent |
Fills: buttons, selected items, progress bars. |
--sys-accent-on |
Text and icons placed on top of a --sys-accent fill. |
--sys-accent-text |
Text, icons and thin marks on dark surfaces. |
Users can pick very dark or very light accents. Never use --sys-accent for text,
and never hard-code white text on it: that's what the other two variables are for.
Translations: i18n.js
English is written directly in your HTML and is the fallback. Load the language data first:
<script src="/desktop/assets/i18n-data.js"></script>
<script src="/desktop/assets/i18n.js"></script>
<h1 data-i18n="myapp.title">My App</h1>
<input data-i18n-placeholder="myapp.search" placeholder="Search">
- In HTML:
data-i18nfor text, anddata-i18n-placeholder/-title/-aria-labelfor attributes. Elements added later are translated automatically. - In scripts:
hyadeOSI18n.t("key", "English text"), or with valueshyadeOSI18n.t("key", "Hello {name}", { name }). - Dates and numbers: pass
hyadeOSI18n.localetotoLocaleString/Intl.
System API
Same-origin apps can call the kernel directly with fetch. Some examples:
| Endpoint | Returns |
|---|---|
GET /api/system/storage |
usedBytes, totalBytes, usagePercent |
GET /api/system/networks |
Wi-Fi networks in range |
GET /api/system/files?path=/home |
A folder listing |
GET /api/system/files/content?path=…&name=… |
A text file's content |
POST /api/system/files/content |
Writes a text file: { path, name, content } |
State-changing requests need a logged-in session, and file content reads are limited to
/home.
06Security model
Knowing these rules up front saves you from "why doesn't my fetch work" moments.
Third-party apps are isolated
An app installed from a GitHub owner other than hyadeOS / mariowstech, or
sideloaded from your home folder, runs on its own origin instead of as a same-origin iframe. The
browser keeps it away from the shell's page, cookies and storage, and:
- it can't read the system API: no CORS headers are ever sent to it;
- it can't write to it: state-changing requests from foreign origins are refused;
- its files are not served on the shell's origin, so it can't sneak back in.
Dangerous actions ask for the password
Remote commands, recovery debugging, factory reset, restore and clearing the password re-check the
account password at the route itself, so a rogue app can't trigger them. Installing and removing
apps from the Terminal (store add, store remove, acode install)
also asks for it.
app-permissions.json is accountability, not a wall
system/app-permissions.json maps endpoint prefixes to the apps meant to use them (for
example /api/terminal/ → terminal). Apps prove who they are with an
X-App-Token header from POST /api/app/token. Because same-origin apps can
ask for any app's token, this gives least privilege by convention and logging, not real isolation.
It ships disabled ("enforced": false), and unlisted paths stay open.
07Shipping your app
Apps are installed from https GitHub URLs only, or from your own home folder. There are three ways to get your app onto a machine:
A. Sideload while developing
Install a folder with an index.html (or a single .html file) from your home
folder. An icon.png next to index.html becomes the icon.
store add ~/Projects/my-app --title "My App"
store add page.html --id notes2
B. Install straight from GitHub
A repository is cloned (git clone --depth 1) into desktop/apps/<id>.
A raw .html file on raw.githubusercontent.com is saved as the app's
index.html.
store add https://github.com/you/my-app
C. List it in the Store
The Store shows a catalog that merges the official remote list from
hyadeOS/store-catalog with the local
store-catalog.json. To add your app to your own machine's Store:
store publish my-app https://github.com/you/my-app --desc "Does things" --dev "you"
To reach everyone, your app needs an entry in the official catalog. Each entry looks like this:
{
"id": "my-app",
"title": "My App",
"developer": "you",
"desc": "One or two sentences about what it does.",
"icon": "https://raw.githubusercontent.com/you/my-app/main/icon.png",
"repoUrl": "https://github.com/you/my-app.git",
"eula": "Optional text shown before install."
}
id, title, developer, desc and
repoUrl are required. The icon can also be an emoji. If you leave it out,
the Store uses icon.png from your repo. Ending repoUrl in
.git means "clone the repo"; any other URL is treated as a single HTML file.
Check that index.html sits at the repo root, the app works with no system API access
(it will install as third-party), icon.png and version.json are in
place, and your licence is in LICENSE or EULA.txt. Ask on
Discord if you're unsure how to get listed.
08Updates
The Store reads version.json from your repo's main (or
master) branch and compares it with the version recorded at install. To ship an update:
- Bump the version
Raise
versioninversion.json, e.g.1.0.0→1.1.0. - Push to your default branch
Commit and push. Users see the update the next time the Store checks.
- An update is offered only for a strictly newer version: there are no silent downgrades.
- Updates run
git pull --ff-onlyfrom the origin the app was installed from, so never force-push or rewrite history on your default branch, or the pull fails. - Only apps installed as a git clone can update this way. A single-file app is updated by installing it again.
09Translating hyadeOS
Every language is one JSON file in desktop/assets/locales/, and a partial translation is
fine: anything missing stays in English. No code changes are needed.
- Create the file (lowercase code, e.g.
frorpt-br)shellnode tools/check-locales.js --new fr - Translate the values, never the keys
Keep words in braces as they are:
"Deleted {count} files"must still contain{count}. - Register the language
Add it to
locales/languages.json, with its name written in that language, e.g."fr": "Français". - Check, then open a pull request
shell
node tools/check-locales.js # progress + mistakes node tools/check-locales.js --missing fr # what's left to translate
10Command reference
acode
Without a project name, the folder you're in (or the project open in ACode) is used. In ACode's own
terminal, build, run, check and install work on
their own.
| Command | Does |
|---|---|
acode open [project] |
Open ACode, on a project if you name one. |
acode new <name> [-t blank|app|system] |
Create a project in ~/ACode from a template. |
acode list |
List your projects. |
acode check [project] |
Look for errors in every file. |
acode build [project] |
Check, then pack into ~/ACode/dist/<project>.zip. |
acode run [project] [-d] |
Open a preview window and show errors live (-d: don't wait). |
acode install [project] |
Install the project as an app on this system (password). |
store
| Command | Does |
|---|---|
store add <source> [--id] [--title] [--icon] |
Install from a GitHub repo, a raw .html URL, or a folder / .html
file in your home (password). |
store publish <id> <github-url> [--title] [--desc] [--dev] [--icon] |
Add an app to the local Store catalog. |
store list |
List installed apps and where they came from. |
store info <id> |
Show what the Store knows about an app. |
store remove <id> |
Uninstall an app (password). |
store open |
Open the Store app. |
Store API
| Route | Does |
|---|---|
GET /api/store/catalog |
Remote catalog merged with the local one. |
POST /api/store/install |
{ appId, title, icon, repoUrl }: clone or download an app. |
POST /api/store/sideload |
{ appId, title, icon, path }: install from /home. |
POST /api/store/uninstall |
{ appId }: remove a Store app. |
GET /api/store/check-upgrades |
Apps whose repo declares a newer version.json. |
POST /api/store/do-upgrade |
Pull every upgradable app. |
POST /api/store/publish |
Add an entry to the local catalog. |
11Troubleshooting
Electron doesn't start after npm install
Run node node_modules/electron/install.js to download the Electron binary, and check
node --version is 22.12 or newer.
My app works in ACode's preview but not once installed
It probably calls /api/... or loads /desktop/assets/.... The preview runs
on the shell's origin, but a third-party install is isolated (section 06).
Bundle your own scripts and keep data in localStorage.
"is a built-in app and cannot be replaced"
Your app ID matches a system app's folder. Pick another ID with --id.
"Only https github.com repository URLs are allowed"
Use https://github.com/owner/repo or a raw.githubusercontent.com link to an
.html file. Other hosts, http:// and local paths (outside
store add ~/…) are refused.
My update isn't offered
Check version.json is on main or master, is valid JSON, and is
higher than the installed version. If the pull fails, make sure you didn't rewrite history.
My window has a solid background
Set background: transparent on body to get the system glass.