Skip to content

๐Ÿ”” Lighthouse - Firebase Cloud Functions service for sending push notifications via FCM. Simple REST API for friend requests, bill notifications, and user messaging.

Notifications You must be signed in to change notification settings

mone-app/lighthouse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Lighthouse API

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.

Quick Start

npm install
npm run serve    # Local development
npm run deploy   # Deploy to Firebase

API Endpoints

Health Check

GET /health

Returns service status and timestamp.

Send Notification

POST /notification
Content-Type: application/json

{
  "targetUserId": "user123",
  "type": "added_friend",
  "fromUserId": "user456"
}

Notification Types

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

Requirements

  • Users must exist in Firestore users collection
  • Users must have fcmToken field for notifications
  • Users must have username field

Response Format

Success:

{
  "success": true,
  "messageId": "fcm-message-id",
  "sentTo": "user123",
  "type": "added_friend"
}

Error:

{
  "error": "Error message",
  "details": "Detailed error information"
}

Tech Stack

  • Node.js 22
  • Express.js 5.1.0
  • Firebase Cloud Functions
  • Firebase Cloud Messaging (FCM)

About

๐Ÿ”” Lighthouse - Firebase Cloud Functions service for sending push notifications via FCM. Simple REST API for friend requests, bill notifications, and user messaging.

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •