Skip to content

Architecture

goprocker edited this page Nov 8, 2026 · 2 revisions

Architecture

Islet is an Electron app. The main process talks to Windows through small PowerShell helpers and draws the notch in one frameless, transparent, always-on-top window.

src/            main process
  main.js         window, tray, hotkeys, config, IPC; spawns the helpers
  preload.js      the window.bridge API the notch uses
  *.js            one module per feature (weather, lyrics, search, phone-drop, pet-pack…)
  *.ps1, *.cs     Windows helpers (media, audio capture, system, radios, volume HUD)
renderer/       the notch: index.html, notch.css, notch.js, pet.js, blackhole.js, units.js
settings/       the settings and welcome windows
hooks/          islet-hook.js, run by Claude Code and Codex for every hook event
builtin-pets/   pets that ship with the app
test/           one *.test.js per area (node --test)
landing/        the website (Netlify)
docs/           screenshots, the guide source, design notes
build/          installer script (firewall rule), signing helpers

hooks/ stays at the repo root on purpose: installed hooks in ~/.claude/settings.json point at its full path.

How data flows

  • Media: helpers.ps1 runs the watchers in one PowerShell process. media.ps1 reads the Windows media session every second. spotify-audio.ps1 loads spotify-audio.cs with Add-Type, so no unsigned exe ships, and captures the player's audio as 24 FFT bands.
  • Agents: hooks/islet-hook.js POSTs each hook event to 127.0.0.1:47321, where src/claude-bridge.js checks its token and updates the sessions. Permission requests are held so you can Allow / Deny in the notch.
  • Notifications: Windows has no listener API for unpackaged apps, so src/notifications.js reads the notification database read-only and turns Windows' own banners off while Islet runs (restored on quit).
  • Window shape: src/shape.js cuts the window to the pill with setShape, so clicks outside it reach the desktop.
  • Agent releases: src/agent-updates.js checks the npm registry for new Claude Code and Codex versions (only for agents with a config folder in your home directory) and shows a pop-up once per new version.
  • Phone drop: src/phone-drop.js serves a LAN page for 10 minutes; callers that start it while it is still binding share one startup and get the same URL.
  • Config: %APPDATA%\islet\config.json, watched for hand edits; a file that can't be read is never overwritten.

The notch

renderer/notch.js switches states with CSS classes on #notch (open, toast, hidden, quiet, idle, charging) and opens dock tools with showPanel(id). renderer/pet.js picks the pet's mood in priority order: sick, alert, ask, plant, work, code, dance, sleep, idle.

Clone this wiki locally