
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
custom-push
Advanced tools
All-in-one push notification package — npm library + CLI scaffolder with Safari support
Professional backend scaffolding for Firebase Cloud Messaging with seamless React integration
Custom Push is a production-grade CLI tool that scaffolds robust Firebase Cloud Messaging (FCM) infrastructure. It focuses on zero-fluff backend scaffolding (Express/NestJS) while providing an elite React package for frontend integration, including full support for Next.js App Router.
FCMHelper and routescustom-push React package'use client' directives)firebase-admin and firebasenpx custom-push init
The CLI automatically generates a src/NotificationHandler/ directory. Use it to wrap your app:
import { CustomPushProvider } from 'custom-push';
import { pushConfig } from './src/NotificationHandler/pushConfig';
import { PushNotificationManager } from './src/NotificationHandler/PushNotificationManager';
function RootLayout({ children }) {
return (
<CustomPushProvider config={pushConfig}>
{/* 💎 This component handles all foreground notifications and toasts */}
<PushNotificationManager />
{children}
</CustomPushProvider>
);
}
Check the generated src/NotificationHandler/USAGE.md for a professional, copy-pasteable permission toggle button.
For developers who need full control or prefer not to use the scaffolded handler:
npm install custom-push
import { CustomPushProvider } from 'custom-push';
const pushConfig = {
apiKey: "your-api-key",
projectId: "your-project-id",
vapidKey: "your-vapid-key"
// ...
};
function Root() {
return (
<CustomPushProvider config={pushConfig}>
<App />
</CustomPushProvider>
);
}
The usePushMessage hook provides a complete interface:
| Property | Type | Description |
|---|---|---|
token | string | null | The unique FCM device token. |
messages | PushMessage[] | Array of foreground notifications received. |
isSupported | boolean | Whether the browser supports Web Push. |
isPermissionGranted | boolean | Current notification permission status. |
requestPermission | () => Promise<boolean> | Triggers the browser permission prompt (Required for Safari). |
sendMessage | (title, body, data?) => Promise<void> | Sends a push via your configured backend. |
clearMessages | () => void | Clears the local messages state. |
The CLI generates a high-performance FCMHelper in your src/helper/ directory.
import { sendPushNotification } from './helper/FCMHelper';
await sendPushNotification({
token: 'user-device-token',
title: 'Order Shipped!',
body: 'Your package is on its way.',
route: '/orders/123',
icon: '/icons/shipping-192.png'
});
All local configuration is stored in our_pkg.json. This acts as the single source of truth.
{
"stack": { "language": "typescript", "scope": "both", "backendFramework": "express" },
"firebase": { "apiKey": "...", "vapidKey": "..." },
"backend": { "registerUrl": "http://localhost:3000/push/register" }
}
MIT © [Your Name]
Made with ❤️ for the React & Node.js communities
FAQs
All-in-one push notification package — npm library + CLI scaffolder with Safari support
The npm package custom-push receives a total of 88 weekly downloads. As such, custom-push popularity was classified as not popular.
We found that custom-push demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.