The admin notification panel is now available in the Manager Dashboard! It includes:
-
Live Preview - See how your notification will look before sending
-
Notification Types:
- 📢 General Announcement
- 🏋️ Class Update
⚠️ Facility Alert- 🎉 Special Event
- 🔧 Maintenance Notice
-
Target Audiences:
- All Users
- Members Only
- Trainers Only
The admin panel requires a Cloud Function to send notifications. Here's how to deploy it:
cd "c:\Cursor Projects\xmca14-dev"
firebase deploy --only functions:sendNotificationNote: If you get an npm error about Node version, that's okay - Firebase will use Node 20 on their servers.
firebase deploy --only functionsThis will deploy all Cloud Functions (including the existing Stripe payment functions).
-
Login as Manager:
- Open the app
- Click "Manager" on the welcome screen
-
Navigate to Notification Panel:
- Scroll down in the Manager Dashboard
- Click "Send Push Notification" (orange card with bell icon)
-
Create Your Notification:
- Select notification type (e.g., "Facility Alert")
- Enter title (e.g., "Pool Closed")
- Enter message (e.g., "The pool will be closed tomorrow for maintenance")
- Select target audience (e.g., "All Users")
- Watch the live preview update as you type!
-
Send:
- Click "Send Notification"
- All users in the selected group will receive it instantly!
- Create notification with title: "Test Notification"
- Body: "This is a test from the admin panel!"
- Type: General
- Target: All Users
- Click Send
- Check your phone - you should receive it within seconds!
Try each notification type to see different icons:
- General: 🔔 Bell icon
- Class Update: 🏋️ Fitness icon
- Facility Alert:
⚠️ Warning icon - Event: 📅 Calendar icon
- Maintenance: 🔧 Wrench icon
Cause: Cloud Function not deployed yet
Solution: Deploy the function using the commands above
Cause: Cloud Functions API not enabled
Solution:
- Go to:
https://console.cloud.google.com/apis/library/cloudfunctions.googleapis.com?project=xmca14 - Click "Enable"
- Try deploying again
Possible causes:
- User hasn't installed the latest app build with FCM support
- User hasn't granted notification permissions
- User isn't subscribed to the target topic
Solution: Make sure you're testing with the latest app build from Firebase App Distribution
To see how many users received your notifications:
- Go to:
https://console.firebase.google.com/project/xmca14/notification - Click on "Reports"
- View delivery rates, open rates, and more
Type: Facility Alert
Title: "YMCA Closed Today"
Body: "Due to severe weather, all facilities are closed today. Stay safe!"
Target: All Users
Type: Event
Title: "New Pickleball Class!"
Body: "Join us for our new Pickleball class starting Monday at 6pm"
Target: All Users
Type: Class Update
Title: "Yoga Class Cancelled"
Body: "Today's 3pm yoga class has been cancelled due to instructor illness"
Target: Members Only
Type: Maintenance
Title: "Pool Maintenance"
Body: "The pool will be closed for cleaning from 8am-12pm tomorrow"
Target: All Users
Ideas for expanding the notification system:
- Scheduled Notifications: Send notifications at a specific time
- User Preferences: Let users choose which notification types they want
- Rich Notifications: Add images, action buttons
- Notification History: View all sent notifications
- Analytics Dashboard: Track open rates and engagement
- Template Library: Save frequently used notification templates
- Notifications are sent instantly (no delay)
- Users must have the latest app build installed
- Topic subscriptions happen automatically on first app launch
- The live preview updates as you type!
Last Updated: 2026-02-14 (Cloud Function Deployed)