npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kode-stack/notification-web

v1.0.1

Published

Universal Web & Angular Push Notification SDK for TL Notification Service (OneSignal-like API)

Downloads

392

Readme

@kode-stack/notification-web

Official Web & Angular Push Notification SDK for TL Notification Service (OneSignal-like simplicity for browsers).

🚀 Features

  • Cross-Framework: Works with Angular, React, Vue, Next.js, and Vanilla JavaScript.
  • SSR Safe: Safe for Angular SSR (@angular/ssr) and server-rendered apps.
  • OneSignal-Like API: initialize(), requestPermission(), login(), logout(), setTags().
  • Admin Dispatcher API: Send notifications directly from Angular admin portals to mobile apps (sendNotification()).
  • Analytics & Tracking: Tracks DELIVERED and CLICKED events.

📦 Installation

npm install @kode-stack/notification-web

🛠️ Usage in Angular (tlexpress_system_angular)

1. In app.config.ts or app.component.ts (Initialization)

import { Component, OnInit } from '@angular/core';
import TLNotificationWeb from '@kode-stack/notification-web';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
})
export class AppComponent implements OnInit {
  async ngOnInit() {
    // Initialize Web SDK
    await TLNotificationWeb.initialize({
      baseUrl: 'https://notification-api.kt-store.online/',
      appKey: 'app_live_ItVYOt4Tqho3fPvZ6Ny5qmhZMXX9faU8',
      autoRegister: true, // Automatically registers when user grants permission
    });

    // Request notification permission if not yet granted
    await TLNotificationWeb.requestPermission();

    // Listen for incoming notifications
    TLNotificationWeb.onNotificationReceived((notification) => {
      console.log('Received push in browser:', notification.title);
    });

    // Listen for notification clicks
    TLNotificationWeb.onNotificationOpened((notification) => {
      console.log('User clicked notification:', notification.customData);
    });
  }
}

2. User Login / Identification

Associate the current logged-in employee or user:

// Call after successful login in Angular Auth Service:
await TLNotificationWeb.login('USER_ID_OR_STAFF_CODE', {
  role: 'DISPATCHER',
  branchId: 'BRANCH_101',
});

3. User Logout

// Call on logout:
await TLNotificationWeb.logout();

4. Sending Push Notifications to Mobile App Drivers (From Angular Portal)

Admins or operators can send real-time push alerts to mobile users directly:

await TLNotificationWeb.sendNotification({
  title: 'New Shipment Ready',
  body: 'Order #TL-9988 has been assigned to you.',
  targetType: 'EXTERNAL_IDS',
  externalIds: ['driver_123'],
  data: {
    orderId: 'TL-9988',
    screen: 'OrderDetail',
  },
});

📄 License

MIT © TL Notification Team