Lighthouse is a Firebase Cloud Functions service that handles push notifications for mobile applications. It provides a simple REST API to send FCM notifications to users.
npm install
npm run serve # Local development
npm run deploy # Deploy to FirebaseGET /healthReturns service status and timestamp.
POST /notification
Content-Type: application/json
{
"targetUserId": "user123",
"type": "added_friend",
"fromUserId": "user456"
}| Type | Title | Description |
|---|---|---|
added_friend |
"New Friend!" | Friend request notification |
bill_created |
"New Bill Created" | New bill notification |
bill_settled |
"Bill Settled" | Bill settlement notification |
- Users must exist in Firestore
userscollection - Users must have
fcmTokenfield for notifications - Users must have
usernamefield
Success:
{
"success": true,
"messageId": "fcm-message-id",
"sentTo": "user123",
"type": "added_friend"
}Error:
{
"error": "Error message",
"details": "Detailed error information"
}- Node.js 22
- Express.js 5.1.0
- Firebase Cloud Functions
- Firebase Cloud Messaging (FCM)