Push Notifications setup through Frappe Relay server
- Google Cloud Authentication
- Firebase project with Firebase Cloud Messaging (FCM) enabled
- Frappe Bench environment
You can install this app using the bench CLI:
cd $PATH_TO_YOUR_BENCH
bench get-app $URL_OF_THIS_REPO --branch develop
bench install-app frappe_notifier- Generate a
firebase_service_account.jsonfile from your Firebase project - Place the
firebase_service_account.jsonfile in your bench directory - Run the initialization script from the bench directory:
source ./apps/frappe_notifier/init.shAdd the push relay server URL to your common_site_config.json:
{
"push_relay_server_url": "https://your-site-domain.com"
}Example:
{
"push_relay_server_url": "https://visaguy.erpcode.tridz.in"
}Add the hostname to the domains array in your site_config.json:
{
"domains": [
"your-site-domain.com"
],
"hostname": "your-site-domain.com"
}Example:
{
"domains": [
"visaguy.erpcode.tridz.in"
],
"hostname": "visaguy.erpcode.tridz.in"
}After installation:
- Navigate to Setup > Push Notification Settings
- Check "Enable Push Notifications"
- Verify that API Key and API Secret are generated
- If API Key/Secret are missing:
- Check if "Notification Manager" user exists
- If not, create the "Notification Manager" user
- Generate API key and secret for this user
Add your Firebase project values to the Frappe Notifier Settings doctype:
Example Configuration:
- Project ID:
your-firebase-project-id - Vapid Public Key:
your-vapid-public-key - Firebase Config:
{
"apiKey": "your-api-key",
"authDomain": "your-project.firebaseapp.com",
"projectId": "your-project-id",
"storageBucket": "your-project.firebasestorage.app",
"messagingSenderId": "your-sender-id",
"appId": "your-app-id",
"measurementId": "your-measurement-id"
}Note: Replace the example values with your actual Firebase project configuration. The values shown above are masked for security purposes.
This app uses pre-commit for code formatting and linting. Please install pre-commit and enable it for this repository:
cd apps/frappe_notifier
pre-commit installPre-commit is configured to use the following tools for checking and formatting your code:
- ruff
- eslint
- prettier
- pyupgrade
MIT