There was already an Electron powered app by another solo developer but we're not a massive fan of that technology at Cocoon. It includes the entirety of Chromium in its binary and it is notoriously heavy on RAM and CPU usage which would not be ideal for a small utility app.
Instead, we opted to use for a Safari backed macOS app that instead uses the included WebKit engine which significantly reduces the binary size to around 17MB. In comparison, the Electron project mentioned previously is almost 245MB in size.
To tidy up the interface and make it feel native we inject some custom CSS and JS.
The CSS tidies things up like hiding the logo to enable us to add back and forward buttons in its place and the JS observes browser events or passes on actions from native events such as the next or play/pause button being pressed on the keyboard.
The same JS notices whenever a song changes and passes the information back to the application layer. This is parsed and then passed on to the Now Playing centre.