JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 19
  • Score
    100M100P100Q71788F
  • License MIT

Lightweight developer notification tool for OTPs, errors, and events in local development.

Package Exports

  • dev-notify
  • dev-notify/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (dev-notify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

dev-notify

Lightweight developer notification utility for Node.js applications. Designed to provide instant feedback during development by sending native desktop notifications (with safe console fallback).


What Problem Does It Solve?

In local development, developers often need to quickly see runtime messages such as OTP codes, payment failures, or job completions. Traditionally, this means digging into:

  • 📧 Mailtrap/inbox for email OTPs
  • 🗄 Databases for persisted codes
  • 📜 Logs for runtime events

This workflow is slow and disruptive.

dev-notify fixes this by giving you instant, ergonomic notifications directly on your desktop (or console fallback), so you can see OTPs, job statuses, or errors in real-time while coding.


Current Capabilities (MVP)

  • Cross-platform native notifications Powered by node-notifier. Works on macOS, Windows, and Linux (requires notify-send on Linux).

  • Async API with status tracking Every call returns a Promise resolving to a status object:

    { success: true, backend: "desktop", response, metadata }

    or

    { success: false, backend: "fallback", error: "..." }
  • Ergonomic helpers Shorthand methods for common dev flows:

    await notify.success("OTP: 123456");
    await notify.error("Payment gateway failed");
    await notify.info("Cron job finished");
    await notify.warn("Low balance detected");
  • Graceful fallback If desktop notifications are unavailable (e.g., Docker, WSL), messages are logged to console with clear formatting instead of failing silently.


Future Roadmap

Phase 2 — Developer Workflow Enhancements

  • Global configure() support for defaults (sound, prefix, log formatting).
  • Colored console fallback for better readability.

Phase 3 — Pluggable Backends

  • Abstraction layer to support multiple backends:

    • desktop (default, native notifications)
    • console (fallback or explicit mode)
    • slack, discord, webhook (for remote teams)

Phase 4 — Cross-Device Notifications

  • Optional lightweight browser dashboard for Docker/remote dev environments.
  • Potential mobile push via Telegram/Pushover integration for on-the-go alerts.

Example Use Case

const notify = require('dev-notify');

async function sendOtp(otp) {
  const result = await notify.success(`OTP generated: ${otp}`);
  console.log("Notification status:", result);

  // Example: track status in DB
  await saveNotificationLog(result);
}

sendOtp("123456");

👉 Result: Developer sees a native notification with the OTP instantly. If notifications are unavailable (e.g., inside Docker), it logs:

[notify-fallback] ✅ Success: OTP generated: 123456

⚡ In Short

  • Today (v0.1.0): Instant developer notifications with async status tracking, native desktop integration, and safe console fallback.

  • Tomorrow (future releases): A pluggable, cross-device notification hub for developers — usable inside Docker, remote servers, or even via Slack/Discord.