LogoKikoMart Docs

Push Notifications

Connect Firebase Cloud Messaging to Appwrite and create the messaging topics.

KikoMart sends push notifications through Firebase Cloud Messaging (FCM), delivered by Appwrite Messaging.

Create a Firebase project and service account key#

  1. Open the Firebase Console and create a project.
  2. Go to Project Settings → Service Accounts.
  3. Click Generate new private key. A JSON file is downloaded.

This JSON file gives full access to your Firebase project. Keep it private.

Add FCM as a provider in Appwrite#

  1. In the Appwrite Console, go to Messaging → Providers → + Create Provider.
  2. In the Push section, select Firebase Cloud Messaging (FCM).
  3. Set Name to Notification Sender.
  4. Paste the entire content of the downloaded JSON file into the Service account JSON field and save.
  5. Note down the Provider ID. The apps use it as messagingProviderId.

Create the messaging topics#

Go to Messaging → Topics → + Create topic and create these three topics. Use the names exactly as shown:

Topic nameUsed forConfig constant
Broadcast topic Messages to all users broadCastTopicId
Store admin topic Store admin alerts (e.g. new orders) storeAdminTopicId
deliveryman topic Delivery partner alerts allDeliverymanTopicId

Note down each Topic ID. You'll need them when connecting the apps.