Discourse Mobile Push — FCM push notifications for mobile apps

I built a new Discourse plugin for sending push notifications to native Android/iOS apps using Firebase Cloud Messaging (FCM).

Why?

The existing discourse-fcm-notifications plugin provides similar functionality, but it is no longer up to date with current Discourse. Installing it on a current Discourse installation produces warnings.

I had trouble getting the old plugin to work on other testers devices. Rather than trying to update it, I decided to build a new implementation from scratch.

Features

  • FCM push notifications for native mobile apps
  • Multiple devices per user
  • Device registration and removal through an API
  • Deep links to the relevant Discourse topic, post or chat
  • Automatic removal of invalid/expired FCM tokens
  • Retry handling for temporary Firebase failures
  • Optional privacy mode with generic notification content
  • Admin diagnostics and test-notification tools
  • Uses Discourse’s existing notification system and preferences

The plugin is intended to provide the delivery layer between Discourse and a native mobile app; Discourse remains responsible for deciding which notifications a user receives.

AI-assisted development

A significant part of this plugin was developed with the assistance of AI. I am posting it here partly to get feedback from experienced Discourse developers and to identify anything that should be changed or improved.

It is MIT licensed.

Feedback, bug reports and suggestions are welcome.

1 Like

I am happy to share how I have implemented it in my Flutter wrapper app for my Discourse forum. I haven’t done Apple yet, only Android.