# New elm-pwa package almost ready

**URL:** <https://discourse.elm-lang.org/t/new-elm-pwa-package-almost-ready/10563>\
**Category:** Request Feedback\
**Created:** [February 19, 2026, 12:04pm UTC](https://discourse.elm-lang.org/t/new-elm-pwa-package-almost-ready/10563 "2026-02-19T12:04:23Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattpiz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/mattpiz/32/860_2.png) [@mattpiz](https://discourse.elm-lang.org/u/mattpiz)\
**Post date:** [February 19, 2026, 12:04pm UTC](https://discourse.elm-lang.org/t/new-elm-pwa-package-almost-ready/10563/1 "2026-02-19T12:04:23Z")

</div>

I’ve been working on [elm-pwa](https://github.com/mpizenberg/elm-pwa), a small package that wires browser PWA APIs to your Elm app through a single pair of ports.

It covers: service worker lifecycle (install, update, cache strategies), install prompt, online/offline detection, and push notifications.

**What it provides:**

- **Elm module** (`Pwa`) — typed events, decoder, and command helpers
- **JS module** (`init`) — wires browser events to the ports
- **Build function** (`generateSW`) — generates a configurable service worker

The generated service worker supports cache-first, network-first, and network-only strategies, SPA navigation fallback, push notifications, and automatic update checking.

**Live demo:** [elm-pwa.pages.dev](https://elm-pwa.pages.dev)

**Repo:** [github.com/mpizenberg/elm-pwa](https://github.com/mpizenberg/elm-pwa)

I’d love to get feedback on the API design and overall approach. Also, if you could try the demo on your device/browser and report whether it works (install prompt, offline mode, push notifications), that would be very helpful!

Of course elm-indexeddb will be complementary to provide the local data storage 😉

> [@New IndexedDB package (based on elm-concurrent-task)](https://discourse.elm-lang.org/t/new-indexeddb-package-based-on-elm-concurrent-task/10559):
>
> Hi, I’m about to publish a package to make it easier to use IndexedDB from elm apps. Would love some feedback before hitting the publish button of version 1.0.0. Source code here: [GitHub - mpizenberg/elm-indexeddb: IndexedDB support for Elm via elm-concurrent-task](https://github.com/mpizenberg/elm-indexeddb) Based on @andrewMacmurray elm-concurrent-task Two parts, an IndexedDb elm module and a JS companion package Relatively simple and type-safe API. Preview here: [Elm Doc Preview](https://elm-doc-preview.netlify.app/?repo=mpizenberg/elm-indexeddb&version=elm-doc-preview) Example TODO app exercising almost all of the API. Code h…

**EDIT** : screenshot after a few iterations with feedback (thank you!)

 ![1000055353](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/2X/a/a307ee959d58e850d39dc71aa985fe3e834f411d.jpeg)

---

<div class="post-metadata">

**Author:** ![mattpiz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/mattpiz/32/860_2.png) [@mattpiz](https://discourse.elm-lang.org/u/mattpiz)\
**Post date:** [February 20, 2026, 5:45pm UTC](https://discourse.elm-lang.org/t/new-elm-pwa-package-almost-ready/10563/2 "2026-02-20T17:45:45Z")

</div>

Up to now, feedback I got say that notifications with chrome on Android work, but iOS does not. So if you are and Elm dev with access to an iPhone, I’m really interested in your feedback and potential contribution.

Here is the **demo web app** : [https://elm-pwa.pages.dev/](https://elm-pwa.pages.dev/)

Install the PWA, then open it, subscribe to notifications and let me know if you receive notifications or not. And if you want to help, there are a few ways.

One is simply finding clear resources on how to make web push notifications work on iOS. Best would be resources that prove what they say by showing the code and having an example app that works.

Then the next step is trying stuff directly with the elm-pwa code. The code of the demo app is here: [elm-pwa/examples/demo at main · mpizenberg/elm-pwa · GitHub](https://github.com/mpizenberg/elm-pwa/tree/main/examples/demo)

And for the push server, I’m using this: [https://github.com/mpizenberg/go-notify-server](https://github.com/mpizenberg/go-notify-server)  
deployed here: [https://push.dokploy.zidev.ovh/](https://push.dokploy.zidev.ovh/)

---

<div class="post-metadata">

**Author:** ![mattpiz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/mattpiz/32/860_2.png) [@mattpiz](https://discourse.elm-lang.org/u/mattpiz)\
**Post date:** [February 20, 2026, 6:25pm UTC](https://discourse.elm-lang.org/t/new-elm-pwa-package-almost-ready/10563/3 "2026-02-20T18:25:52Z")

</div>

I may have fixed it now! Let me know!

---

<div class="post-metadata">

**Author:** ![akoppela](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/akoppela/32/250_2.png) [@akoppela](https://discourse.elm-lang.org/u/akoppela)\
**Post date:** [February 20, 2026, 6:35pm UTC](https://discourse.elm-lang.org/t/new-elm-pwa-package-almost-ready/10563/4 "2026-02-20T18:35:24Z")

</div>

I tried on iPhone and got no notifications. The UI said that 1 was sent.

---

<div class="post-metadata">

**Author:** ![mattpiz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/mattpiz/32/860_2.png) [@mattpiz](https://discourse.elm-lang.org/u/mattpiz)\
**Post date:** [February 20, 2026, 6:44pm UTC](https://discourse.elm-lang.org/t/new-elm-pwa-package-almost-ready/10563/5 "2026-02-20T18:44:08Z")

</div>

Would you mind sharing your device + browser and steps? Especially iOS safari version.

---

<div class="post-metadata">

**Author:** ![akoppela](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/akoppela/32/250_2.png) [@akoppela](https://discourse.elm-lang.org/u/akoppela)\
**Post date:** [February 20, 2026, 7:12pm UTC](https://discourse.elm-lang.org/t/new-elm-pwa-package-almost-ready/10563/6 "2026-02-20T19:12:23Z")

</div>

They don’t show Safari versions on iOS. But I’m on 26.1 now version of iOS, iPhone 17.

I subscribed to notifications and it requested it via native dialog, then subscribe to push. Then send a message via form. It showed green succes sent message.

---

<div class="post-metadata">

**Author:** ![mattpiz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/mattpiz/32/860_2.png) [@mattpiz](https://discourse.elm-lang.org/u/mattpiz)\
**Post date:** [February 20, 2026, 7:17pm UTC](https://discourse.elm-lang.org/t/new-elm-pwa-package-almost-ready/10563/7 "2026-02-20T19:17:01Z")

</div>

Just to make sure, did you “install” the PWA before doing these steps, and opened the installed PWA? You should see something like that:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/2X/5/50ead918561a5f9c72aac0e057951cac05746240.png)

---

<div class="post-metadata">

**Author:** ![akoppela](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/akoppela/32/250_2.png) [@akoppela](https://discourse.elm-lang.org/u/akoppela)\
**Post date:** [February 20, 2026, 7:26pm UTC](https://discourse.elm-lang.org/t/new-elm-pwa-package-almost-ready/10563/8 "2026-02-20T19:26:34Z")

</div>

I did. Otherwise there is no button to subscribe

---

<div class="post-metadata">

**Author:** ![akoppela](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/akoppela/32/250_2.png) [@akoppela](https://discourse.elm-lang.org/u/akoppela)\
**Post date:** [February 20, 2026, 7:28pm UTC](https://discourse.elm-lang.org/t/new-elm-pwa-package-almost-ready/10563/9 "2026-02-20T19:28:16Z")

</div>

I see what happen now. I had sleep on which prevents notifications 🙂 so it works as expected. I disabled sleep mode and got notifications.

---

<div class="post-metadata">

**Author:** ![paulh](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/paulh/32/5022_2.png) [@paulh](https://discourse.elm-lang.org/u/paulh)\
**Post date:** [February 21, 2026, 2:49pm UTC](https://discourse.elm-lang.org/t/new-elm-pwa-package-almost-ready/10563/10 "2026-02-21T14:49:06Z")

</div>

I get the following results on MacOS (Tahoe 26.2)

Safari (26.2 (21623.1.14.11.9)) - no option to install, permissions requested, notifications are sent and received

Firefox (147.0.4 (aarch64)) - no option to install, permissions requested, notifications are sent but not received

Chorme (145.0.7632.110 (arm64)) - installed fine, no permissions requested, notifications are sent but not received

HTH

---

<div class="post-metadata">

**Author:** ![mattpiz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/mattpiz/32/860_2.png) [@mattpiz](https://discourse.elm-lang.org/u/mattpiz)\
**Post date:** [February 27, 2026, 3:00pm UTC](https://discourse.elm-lang.org/t/new-elm-pwa-package-almost-ready/10563/11 "2026-02-27T15:00:13Z")

</div>

I have added two new features to the demo:

1. just after installation, show a banner to suggest opening the dedicated PWA instead of staying in browser.
2. later, when opening the browser while the PWA is installed, display a hint that the pwa is installed.

These are possible through web apis only available on chrome unfortunately, so will only work on android mobiles. On desktop macos, I have only (1) working, but not (2) even with chrome. And on iOS, unfortunately none of these two are possible.

---

<div class="post-metadata">

**Author:** ![mattpiz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/mattpiz/32/860_2.png) [@mattpiz](https://discourse.elm-lang.org/u/mattpiz)\
**Post date:** [March 5, 2026, 2:59pm UTC](https://discourse.elm-lang.org/t/new-elm-pwa-package-almost-ready/10563/12 "2026-03-05T14:59:31Z")

</div>

I just added support for two additional push notification fields:

- `lang`: can be used to indicate language preferences for the notification
- `silent`: indicate the notification should be silent, avoid noise and vibration. A nice gesture when your app isn’t super important.

These two fields are also supported in the accompanying push notification server [GitHub - mpizenberg/go-notify-server: A minimal, self-hosted Web Push notification server in Go · GitHub](https://github.com/mpizenberg/go-notify-server)

Also updated the [example demo app](https://elm-pwa.pages.dev/) to be able to set the `tag` field and `silent` toggle, as well as always send the notification with the `icon` field set to the app icon so that it’s visible in the notification.

The `tag` field is convenient to be able to replace notifications (with same tag) instead of staking many of them. Very useful when many notifications would be sent, so that the receiver only have 1 notification in their notification center.

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/2X/7/7dc293f1ca58e0147df1ec0214cd1c596f773fc3.png)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/1X/50a05e53677a2c3b47776d7abd0f113eb50193a1.png) [@system](https://discourse.elm-lang.org/u/system)\
**Post date:** [March 15, 2026, 3:00pm UTC](https://discourse.elm-lang.org/t/new-elm-pwa-package-almost-ready/10563/13 "2026-03-15T15:00:02Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
