All Projects → invokemedia → Vue Push Notification Example

invokemedia / Vue Push Notification Example

Licence: mit
An example repo for using browser push notifications with Vue.js and Firebase

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vue Push Notification Example

Date
A dating app that creates meaningful connections through food (Push notifications, Firebase, Chat, Schedule Calendar, Onboarding, Social media Login)
Stars: ✭ 29 (-75.83%)
Mutual labels:  firebase, push-notifications
Ng Toolkit
⭐️ Angular tool-box! Start your PWA in two steps! Add Serverless support for existing projects and much more
Stars: ✭ 1,116 (+830%)
Mutual labels:  push-notifications, push
Easynotifylibproject
Send firebase notifications to your users very easily: A new Android Lib
Stars: ✭ 31 (-74.17%)
Mutual labels:  push-notifications, push
React Native Starter
Professional react-native starter kit with everything you'll ever need to deploy rock solid apps
Stars: ✭ 579 (+382.5%)
Mutual labels:  firebase, push-notifications
Push Notification Demo
Demonstrate how to receive notifications using Firebase
Stars: ✭ 82 (-31.67%)
Mutual labels:  firebase, push-notifications
Socket.io Push
整合了小米,华为,友盟,谷歌,苹果推送的统一解决方案
Stars: ✭ 605 (+404.17%)
Mutual labels:  push-notifications, push
Social Note
Social Note - Note-taking, sharing, time & location reminder
Stars: ✭ 38 (-68.33%)
Mutual labels:  firebase, push-notifications
ejabberd mod apns
An ejabberd module to send PUSH messages to iOS devices through APNS
Stars: ✭ 31 (-74.17%)
Mutual labels:  push-notifications, push
Pushraven
A simple Java library to interface with Firebase Cloud Messaging (FCM) API. Pushraven allows you to push notifications to clients in very few lines of code.
Stars: ✭ 67 (-44.17%)
Mutual labels:  firebase, push
Push.js
The world's most versatile desktop notifications framework 🌎
Stars: ✭ 8,536 (+7013.33%)
Mutual labels:  push-notifications, push
Gmscore
Free implementation of Play Services
Stars: ✭ 4,356 (+3530%)
Mutual labels:  firebase, push-notifications
React Native Onesignal
React Native Library for OneSignal Push Notifications Service
Stars: ✭ 1,270 (+958.33%)
Mutual labels:  push-notifications, push
Falconmessenger
🌟🌟🌟🌟🌟 Falcon Messenger is a Fast and Beautiful cloud-based messaging app. With iOS and IPadOS Support. Available on the App Store.
Stars: ✭ 310 (+158.33%)
Mutual labels:  firebase, message
Thenetwork Open
TheNetwork is a blog cum chat app. It's completely built using firebase. Users can post, comment, like and bookmark the blogs, also users can send follow requests to connect with people. Users can create events and also prepare an event roadmap. Pagination for realtime data is also included in chats, blogs and events.
Stars: ✭ 17 (-85.83%)
Mutual labels:  firebase, push-notifications
Firebasepushnotificationplugin
Firebase Push Notification Plugin for Xamarin iOS and Android
Stars: ✭ 307 (+155.83%)
Mutual labels:  firebase, push-notifications
Push Fcm Plugin
Official Firebase Cloud Messaging plugin for Push.js v1.0 🔥
Stars: ✭ 37 (-69.17%)
Mutual labels:  firebase, push
spontit-api-python-wrapper
Send functional, flexible push notifications to iOS, Android, and desktop devices (without your own app or website).
Stars: ✭ 35 (-70.83%)
Mutual labels:  push-notifications, push
xinge
腾讯信鸽push Golang lib
Stars: ✭ 25 (-79.17%)
Mutual labels:  push-notifications, push
Notificationpusher
Standalone PHP library for easy devices notifications push.
Stars: ✭ 1,143 (+852.5%)
Mutual labels:  push-notifications, push
React Native Firebase
🔥 A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.
Stars: ✭ 9,674 (+7961.67%)
Mutual labels:  firebase, push-notifications

Vue.js Push Notification Example

An example repo for using browser push notifications with Vue.js. We also use Firebase in this example as it can be used to send the notifications for free and with zero-configuration.

Frontend

Signing up in the form

signup demo

Showing a notification

notification demo

Requirements

  • Firebase account
  • Server running on the project root

Installation

  • Create a manifest.json following this structure
  • Create a firebase.json with the Firebase Web credentials
  • Make sure the Firebase table can be written to

Sending Notifications

Using Firebase Function

Be sure to change into the firebase-function/functions/ directory and run npm install.

Initial Setup

Copy the "Server key" from Project Settings > Cloud Messaging page. Store it as follows in a file named firebase-function/functions/google-push-key.json:

{
  "key": "THAT SERVER KEY FROM CLOUD MESSAGING"
}

Running the app locally

In order to get the app to work locally, Firebase needs to be authenticated using a JSON file with the correct application keys and secrets.

Download the Firebase Admin SDK file from the Project Settings > Service Accounts page. Rename it and place it in firebase-function/firebase-adminsdk.json. If no Firebase auth file is found, the app will not be able to run locally. You don't need the auth file when running in the Firebase cloud function environment.

You can run the app locally by just changing to the firebase-function/functions/ folder and using npm run start.

Deploy

Read the Firebase Functions docs on getting started.

Single User

You can send the notification using cURL:

curl --header "Authorization: key=<YOUR_FIREBASE_SERVER_KEY>" --header
"Content-Type: application/json" https://android.googleapis.com/gcm/send -d
"{\"registration_ids\":[\"<SUBSCRIBER_ID>\"]}"

To get a <SUBSCRIBER_ID> for your user, you can pull it out of the endpoint that is saved to the Firebase database when the user is stored.

For example your endpoint may look like this: "https://android.googleapis.com/gcm/send/<SUBSCRIBER_ID>" and you can take that crazy ID out and place it in the registration_ids array.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].