Skip to content

tridz-dev/frappe_notifier

Repository files navigation

Frappe Notifier

Push Notifications setup through Frappe Relay server

Prerequisites

Installation

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

Setup Instructions

1. Firebase Service Account Configuration

  1. Generate a firebase_service_account.json file from your Firebase project
  2. Place the firebase_service_account.json file in your bench directory
  3. Run the initialization script from the bench directory:
source ./apps/frappe_notifier/init.sh

2. Common Site Configuration

Add 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"
}

3. Site Configuration

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"
}

4. Push Notification Settings Verification

After installation:

  1. Navigate to Setup > Push Notification Settings
  2. Check "Enable Push Notifications"
  3. Verify that API Key and API Secret are generated
  4. 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

5. Firebase Configuration in "Frappe Notifier Settings"

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.

Contributing

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 install

Pre-commit is configured to use the following tools for checking and formatting your code:

  • ruff
  • eslint
  • prettier
  • pyupgrade

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •