The repository
One repository, one long-lived branch, holding the server, the web app, the Android, iPhone and Apple TV apps, the installers and this site. This page lists every top-level folder and every server package, each in a line, so you know where to look.
Top level
| Path | What it is |
|---|---|
cmd/soundstorm/ | The server's main, plus its subcommands: backup, restore, reset-password, train-looks. Any argument it does not know is an error, never a second server. |
cmd/soundstorm-names/ | The names service: gives each install a name under emberstorm.app and publishes ACME challenges. Deployed separately, with its own Dockerfile. |
cmd/soundstorm-caretaker/ | The box's caretaker: signed updates, snapshots and roll-back, Start over and the power button. Only on a box. |
cmd/emberstorm-setup/ | EmberStorm.exe, the Windows download: checks the signed release and starts its installer with no console. |
internal/ | Every server package (below). |
android/ | The Android app (Kotlin): phones, Google TV, Android TV and Fire TV. android/signer/ is a separate small app for signing releases with a hardware key held to a phone; it is never published. |
ios/ | The Xcode project: the iPhone app, its Share extension, the Apple TV app (SoundStormTV/), shared code and UI tests. |
mac/ | The Mac setup app (SwiftUI): installs and runs EmberStorm from the signed release with no terminal, updates it at night and removes it. |
box/ | The system image for EmberStorm preinstalled on a small computer (being tried, not for sale), its USB installer stick and its scripts. A box has one drive (the system in its first 64 GiB, the library partition after it; a repair rewrites only the system) or two (system and library apart). |
web/ | The public website, emberstorm.app. |
library/ | The folder skeleton with a README.txt per shelf, so a fresh clone has somewhere to put media. Contents are ignored by git. |
scripts/ | Development tools (below). |
docs/ | Older Markdown guides and the README's screenshots. Some of it predates later changes; this site and the code are the reference. |
site/ | This documentation site: plain HTML, one stylesheet, one script, no build step. |
docker-compose.yml | The install: EmberStorm and every backend, naming a published image and containing no build: key, so it works alone in an empty folder. |
docker-compose.dev.yml | Adds build: . back for development. |
Dockerfile | Builds the server image, cross-compiling on the builder's platform for linux/amd64 and linux/arm64. |
install.ps1, cmd/emberstorm-setup | The Windows installer (with its own window) and EmberStorm.exe, the signed program that starts it (EmberStorm-Setup.cmd is the old way, kept in the repository). |
install.sh | The Mac and Linux installer, plain /bin/sh so it runs on dash. |
tailscale-serve.json | The Tailscale sidecar's proxy config, written on every install because compose bind-mounts it. |
.github/workflows/publish.yml | CI: checks, then publishes the image to the GitHub container registry. |
.github/workflows/website.yml | Publishes the website, with this site under /docs; run by hand. |
SECURITY.md | How to report a security problem privately (the repository's Security tab). |
Server packages
Grouped by role. Each line is the package's own opening sentence, lightly shortened.
The surface
httpapi | EmberStorm's only published surface: every route, its middleware and handlers. |
webui | Serves the browser UI out of the binary, with its Content-Security-Policy, the service worker and the manifest. |
auth | Sign-in, sessions, device cookies and the throttle. |
servetls | TLS without anybody running openssl: a local authority, one port for HTTP and TLS, real certificates in auto mode. |
acme | Gets a certificate from Let's Encrypt over DNS-01 - RFC 8555 for one account and one name. |
names | Gives every install a real name, so it can have a real certificate (the service's logic). |
portmap | Opens one inbound port on a home router (PCP, NAT-PMP or UPnP) for remote access, and reads its WAN address. |
desktoprelease | Checks a signed computer release: desktop.json, its signature against the release keys, and every file's SHA-256. |
version | Which build this is - the commit and its date, stamped in by the image build, shown in Settings, About. |
Backends
source | The plug point for a backend: the Source interface, the optional capability interfaces (Streamer, MusicBrowser, Rescanner...), access in the context, and the Registry. |
source/subsonic | Navidrome, over OpenSubsonic - including the folder view of artists and albums. |
source/jellyfin | Jellyfin, registered twice (films and TV). |
source/audiobookshelf | Audiobookshelf: books, tracks, chapters, per-person positions. |
source/immich | Immich, acting as the person asking. |
source/localbooks | The ebook and documents shelves EmberStorm reads itself. |
source/storyteller | Storyteller, for read-along timelines. |
source/audiomuse | AudioMuse-AI's sound analysis, for moods and "sounds like". |
source/opds | An opt-in Calibre server running elsewhere. |
provision | Gets EmberStorm credentials on each backend without a human, and per-person accounts where needed. |
federate | Fans a query out across every source and merges the answers. |
media | The vocabulary every backend is translated into: Item, Kind, Less, ShelfCache. |
httpx | A small hardened HTTP client shared by adapters: no dot segments, no absolute references, credentials redacted from errors. |
stream | Pipes media bytes from a backend to the device: slim headers, pacing, resized covers, content guards. |
Files and formats
library | Owns the folder layout: creating it, deciding where a dropped file goes, saving uploads, the bin. Not an indexer. |
tags | Reads just enough of an audio file (ID3, MP4 atoms, Vorbis comments) to know where to file it. |
epub | Reads metadata and resources out of EPUB files, with zip-bomb guards. |
pdf | Reads what metadata a PDF is willing to admit to - XMP, then the Info dictionary, then the file name. |
mp4hls | Serves a long audiobook (.m4b) as HLS pieces cut from the file itself, so it starts at once. |
flac | Decodes FLAC, just enough to hear a song's beats on the server. |
photoimport | Brings a photo library in from Google, Apple and others: dates, places, duplicates. |
starter | Ships one item per shelf inside the binary, unpacked once. |
qr | Draws the QR code a TV shows for signing in from a phone - byte mode, level M, no dependency. |
episodeguide | Asks TVmaze (free, no key) for a show's episodes, when the owner numbers a ripped disc. |
Per person, and music
state | Persists the little EmberStorm must remember: credentials, accounts, sessions, decisions. |
collections | Each person's favorites, playlists, history, listens and own covers. |
beats | Hears a song the way the visualizers want it heard: beats, loudness, hits. |
lyrics | Finds lyrics a song's files do not have, on LRCLIB (opt-in). |
discover | Finds out about an artist from open music services (opt-in). |
scrobble | Sends plays to a person's own ListenBrainz account. |
plex | Brings playlists across from a Plex server. |
voices | Makes an audiobook from an ebook (Kokoro) and an ebook from an audiobook (Whisper). |
caretaker | The box's caretaker (updates, resets, the power button); not used by an ordinary install. |
training | Learns the looks from the developer's own taps (one install only). |
The apps' code
The web app is in internal/webui/assets: index.html,
app.js (the whole product, every media type), style.css,
reader.js, sw.js and sw-register.js (kept in a file because
the CSP forbids inline script), and vendor/. It is embedded in the Go binary with
go:embed.
Android (android/app/src/main/java): MainActivity (the
web view, system bars, back), PageScript (injected before the page's own scripts),
NativeAudio and AudioService (songs through Media3 ExoPlayer),
PlaybackService and MediaBridge (media session),
PhotoBackup and Uploads (WorkManager jobs), KeptFiles
(downloads and the offline page), Shared (the Share sheet), ServerAddress and
ServerDiscovery, PlayerLog, WebCookies.
iOS (ios/): SoundStorm/ is the iPhone shell
(ConnectViewController, WebViewController, NativeAudio,
PhotoBackup, KeptFiles, FileUploads, AppLinks);
SoundStormShare/ the Share extension; SoundStormTV/ the
native Apple TV app (player, reader, photo viewer, all twelve visualizers, song analysis);
Shared/ what both use; SoundStormUITests/ the XCUITest that drives the
phone app.
Scripts
acme-rehearsal.sh | Runs the ACME client against Pebble, Let's Encrypt's test authority, in CI. |
after-deploy.sh, smoke-stack.sh, smoke/ | The check after every deploy: the live server, then a throwaway test server walked by a browser at phone, TV and computer size. |
beats-parity.js | Runs the web app's own hearSong under Node on the Go test's samples, to prove the server hears songs identically. |
check-images.py | Verifies every committed PNG against its per-chunk CRC32 and decoded size. |
fetch-starter-media.sh | Fetches and records how each starter-library file is made. |
fetch-test-library.ps1 | Builds a ~750 MB library of real public-domain and CC media for testing. |
make-sample-media.ps1 | A synthetic library with no downloads. |
make-icons.py | Draws every icon from the cloud's three shapes. Change icons here, not in the PNGs. |
mkepub | Generates test EPUBs without Calibre. |
mobile-check.js | Playwright: mobile layouts and overflow. |
reader-swipe-check.js | Playwright: swiping the reader turns pages exactly as the arrows do. |
reader-css-check.js | Checks the reader's stylesheet cleaning against crafted references. |
desktop-release.sh | Makes a computer release: the files and desktop.json, for the release key to sign. |
signing-helper.py | Hands releases waiting on the PC to the signer app on a phone, over the developer's own private network only. |
vmtest-linux.sh | The Linux install tested end to end on a fresh throwaway virtual machine of a given distribution. |
demo-stack.sh | A separate public demo install with free media, put back every night. |
store-media.py | Made-up albums for app-store pictures, never real music. |
private-check.sh | A commit hook that refuses private details and unformatted Go code. |
calibreweb-init | Support for the opt-in external Calibre server. |
The zero-dependency rule
The Go module has no third-party dependencies and therefore no
go.sum. Password hashing is crypto/pbkdf2 from the standard library; the
ACME client, the FLAC decoder, the tag reader, the EPUB and PDF readers and the HEIC-free image
shrinking are all small and the project's own.
Vendored browser code
Two third-party libraries are checked in under internal/webui/assets/vendor/,
pinned by content, embedded with go:embed, and fetched at no point during a build:
- foliate-js (MIT) renders EPUBs. Writing it was considered and rejected for
the same reason as transcoding:
paginator.js(44 KB) andepubcfi.js(13 KB) are the two genuinely hard parts of a reader, and reflowable text needs content-anchored positions (EPUB CFIs), not page numbers. EmberStorm unzips books on the server, so no zip library runs in the browser. - hls.js (Apache 2.0) plays Jellyfin's HLS where a browser cannot natively. It is loaded lazily and only when needed.
Some app behaviour depends on foliate's internals - for example that its paginator handles
touch swipes and its fixed-layout renderer does not - so reader-swipe-check.js must
be re-run whenever foliate-js is updated.