Skip to content

pandashreyan/notifyzzz

Repository files navigation

Notifyzzz 🔔

Notifyzzz is a Firebase-powered notification management system designed to handle and deliver notifications to users through email (SendGrid), SMS (Twilio), or other channels. It uses Firebase Cloud Functions, Firestore, and Firebase Emulator Suite for local development and testing.


🚀 Features

  • Send notifications to users
  • Store notification history in Firestore
  • Background processing and retry mechanism for failed notifications
  • Firebase Emulator support for local development
  • Easily extendable for email/SMS/Push notifications

📅 Tech Stack

  • Firebase Functions: Serverless backend
  • Firestore: Notification storage
  • Pub/Sub: Retry queue
  • SendGrid: Email notifications (optional)
  • Twilio: SMS notifications (optional)

🚧 Local Development

1. Start Firebase Emulators

firebase emulators:start

2. Send a Test Notification

curl -X POST http://127.0.0.1:5001/notifyzen2003/us-central1/sendNotification \
  -H "Content-Type: application/json" \
  -d '{
        "userId": "user123",
        "type": "sms",
        "content": "This is a test notification"
      }'

3. Get User Notifications

curl "http://127.0.0.1:5001/notifyzen2003/us-central1/getUserNotifications?userId=user123"

4. View Emulator UI

Open in browser:

http://localhost:4000

🔒 Firestore Rules (firestore.rules)

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if true;
    }
  }
}

Update firebase.json:

"firestore": {
  "rules": "firestore.rules"
}

🔐 Environment Variables

Set in functions/.env or Firebase config:

  • twilio.account_sid
  • twilio.auth_token
  • sendgrid.key
  • sendgrid.from_email

If not configured, those notification types will fail gracefully.


📤 Deployment

Make sure you are logged in and initialized Firebase.

firebase deploy --only functions

📂 Project Structure

studio/
├── functions/
│   ├── index.js
│   ├── notificationService.js
│   └── ...
├── firestore.rules
├── firebase.json
└── README.md

👨‍💻 Author

Shreyan Panda GitHub


📄 License

This project is licensed under the MIT License.

About

A system to send notifications to users

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published