KikoMart sends push notifications through Firebase Cloud Messaging (FCM), delivered by Appwrite Messaging.
Create a Firebase project and service account key#
- Open the Firebase Console and create a project.
- Go to Project Settings → Service Accounts.
- 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#
- In the Appwrite Console, go to Messaging → Providers → + Create Provider.
- In the Push section, select Firebase Cloud Messaging (FCM).
- Set Name to
Notification Sender. - Paste the entire content of the downloaded JSON file into the Service account JSON field and save.
- 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 name | Used for | Config 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.
