Skip to content

A lightweight desktop notification service built with Tauri and Rust that provides an HTTP API for sending native desktop notifications from any application or script.

License

Notifications You must be signed in to change notification settings

knileshh/Kotifier

Repository files navigation

🔔 Kotifier - Desktop Notification Service

Kotifier is a lightweight desktop notification application built with Tauri and Rust. It runs a local HTTP server that listens for incoming requests and sends desktop notifications.

Features

  • HTTP API Server: Listens on port 8080 for notification requests
  • Multiple API Formats: Supports both POST (JSON) and GET (URL parameters) requests
  • Desktop Notifications: Native desktop notifications on Windows, macOS, and Linux
  • Modern UI: Beautiful React-based interface with real-time notification history
  • Lightweight: Built with Tauri for minimal resource usage

Quick Start

Development

# Install dependencies
npm install

# Start the development server
npm run tauri dev

Build for Production

# Build the application
npm run tauri build

API Usage

Once Kotifier is running, it will start an HTTP server on port 8080. You can send notifications using the following methods:

POST Request (JSON)

curl -X POST http://localhost:8080/notify \
  -H "Content-Type: application/json" \
  -d '{"title": "Hello", "body": "World", "icon": "https://example.com/icon.png"}'

GET Request (URL Parameters)

curl "http://localhost:8080/notify?title=Hello&body=World"

Simple Browser Request

You can also trigger notifications directly from your browser:

http://localhost:8080/notify?title=Quick%20Alert&body=Message

Parameters

  • title (required): The notification title
  • body (optional): The notification message
  • icon (optional): URL to an icon image

Short Parameter Names

For convenience, you can use these shorter parameter names:

  • t instead of title
  • m or message instead of body

Example:

http://localhost:8080/notify?t=Alert&m=Something%20happened

API Endpoints

  • GET / - Service information and usage help
  • POST /notify - Send notification with JSON payload
  • GET /notify - Send notification with URL parameters
  • GET /notifications - Get notification history
  • GET /health - Health check endpoint

Examples

From Command Line

# Simple notification
curl "http://localhost:8080/notify?title=Build%20Complete&body=Your%20project%20built%20successfully"

# With icon
curl -X POST http://localhost:8080/notify \
  -H "Content-Type: application/json" \
  -d '{"title": "New Message", "body": "You have 3 new emails", "icon": "https://example.com/mail-icon.png"}'

From Scripts

PowerShell:

Invoke-RestMethod -Uri "http://localhost:8080/notify" -Method POST -ContentType "application/json" -Body '{"title": "Script Complete", "body": "Task finished successfully"}'

Python:

import requests

response = requests.post('http://localhost:8080/notify', json={
    'title': 'Python Script',
    'body': 'Task completed!',
    'icon': 'https://python.org/favicon.ico'
})

Integration Examples

GitHub Actions:

- name: Notify on success
  run: |
    curl -X POST http://localhost:8080/notify \
      -H "Content-Type: application/json" \
      -d '{"title": "Build Success", "body": "Deployment completed successfully"}'

Monitoring Scripts:

#!/bin/bash
if [ $SERVICE_STATUS == "down" ]; then
  curl "http://localhost:8080/notify?title=Service%20Alert&body=Service%20is%20down"
fi

Features Overview

🚀 Lightweight & Fast

  • Built with Tauri for minimal system resource usage
  • Rust backend for high performance
  • React frontend for modern UI experience

📡 Flexible API

  • RESTful HTTP API
  • JSON and URL parameter support
  • CORS enabled for web integration

🔔 Native Notifications

  • Works with system notification systems
  • Support for custom icons
  • Notification history tracking

🎨 Modern Interface

  • Beautiful gradient design
  • Real-time notification feed
  • API usage examples built-in
  • Responsive design

Technical Stack

  • Backend: Rust with Axum web framework
  • Frontend: React with TypeScript
  • Desktop Framework: Tauri
  • Notifications: Native system notifications
  • HTTP Server: Axum with CORS support

Port Configuration

The server runs on port 8080 by default. The frontend development server runs on port 1420.

License

MIT License - feel free to use this in your projects!

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues.


Made with ❤️ using Tauri and Rust

About

A lightweight desktop notification service built with Tauri and Rust that provides an HTTP API for sending native desktop notifications from any application or script.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published