Start Now

Get your first notification delivered in under 5 minutes. This quickstart uses your local environemnt with Notivway docker and in-memory plugins. Perfect for learning and testing.

1. Start Notiway Gateway

Create a docker-compose.yml file:

docker-compose.yml
services:
  notiway:
    container_name: notiway
    image: notiway/notify:portable-0.6.0
    ports:
      - "5000:8080"
    environment:
      - Infra__Plugins__TenantValidation__Name=NoValidation
      - Infra__Plugins__TenantValidation__Version=0.9.0
      - Infra__Plugins__Auth__Name=NoAuth
      - Infra__Plugins__Auth__Version=0.10.0
      - Config__Testing=true  # Enables HTTP test endpoint

Start the gateway:

docker-compose up -d

Gateway is now running at http://localhost:5000/notifications

2. Connect a Client

client.js
import * as signalR from "@microsoft/signalr";

const connection = new signalR.HubConnectionBuilder()
    .withUrl("http://localhost:5000/notifications")
    .withAutomaticReconnect()
    .build();

// Listen for "welcome" notifications
connection.on("welcome", (notification) => {
    console.log("Received:", notification.body);
});

await connection.start();
console.log("Connected! ✓");
Program.cs
using Microsoft.AspNetCore.SignalR.Client;

var connection = new HubConnectionBuilder()
    .WithUrl("http://localhost:5000/notifications")
    .WithAutomaticReconnect()
    .Build();

connection.On<dynamic>("welcome", notification =>
{
    Console.WriteLine($"Received: {notification.body}");
});

await connection.StartAsync();
Console.WriteLine("Connected! ✓");
client.py
from signalrcore.hub_connection_builder import HubConnectionBuilder

def on_welcome(notification):
    print(f"Received: {notification['body']}")

connection = HubConnectionBuilder() \
    .with_url("http://localhost:5000/notifications") \
    .with_automatic_reconnect() \
    .build()

connection.on("welcome", on_welcome)
connection.start()
print("Connected! ✓")
main.dart
import 'package:signalr_netcore/signalr_client.dart';

final connection = HubConnectionBuilder()
    .withUrl("http://localhost:5000/notifications")
    .withAutomaticReconnect()
    .build();

// Listen for "welcome" notifications
connection.on("welcome", (arguments) {
  final notification = arguments?[0];
  print("Received: ${notification['body']}");
});

await connection.start();
print("Connected! ✓");

3. Send Your First Notification

With testing mode enabled, send via Notiway’s HTTP test endpoint:

curl -X POST http://localhost:5000/test/notifications \
  -H "Content-Type: application/json" \
  -d '{
    "id": "notif-001",
    "type": "welcome",
    "body": {
      "message": "Hello from Notiway!"
    },
    "routing": {
      "audienceType": 1,
      "audienceValue": "global"
    },
    "metadata": {
      "producer": "quickstart",
      "timestamp": "2025-02-11T10:00:00Z",
      "isPersisted": false
    }
  }'

Your client receives the notification instantly! ✓

Note: Testing Mode Only

The /test/notifications endpoint is only available when Config__Testing=true.

In production, notifications are sent through message brokers (SNS, Redis, RabbitMQ, etc.) - see Sending Notifications for broker-based examples.

What Just Happened?

  1. Notiway Gateway started with InMemory plugins (no external dependencies)
  2. Your client connected via WebSocket
  3. Notification sent to InMemory broker → Notiway → Your client

Next Steps

Production Deployment

For production, use real infrastructure:

AWS Deployment:

Azure Deployment:

Cloud-Agnostic (Redis):

  • Image: notiway/notify:portable-0.6.0
  • Plugins: Redis Pub/Sub, Redis Streams, PostgreSQL
  • Guide: Custom Deployment

Learn More

Common Use Cases

Notify specific users:

{
  "routing": {
    "audienceType": 3,
    "audienceValue": "user-123"
  }
}

Notify all users in a tenant:

{
  "routing": {
    "audienceType": 1,
    "audienceValue": "tenant-456"
  }
}

Persist for offline users:

{
  "metadata": {
    "isPersisted": true,
    "persistedTTL": "2025-03-01T00:00:00Z"
  }
}

Note: Persistence is not supported in testing mode. Use a production deployment with a storage plugin to enable this feature.

Troubleshooting

Client can’t connect?

  • Check Notiway is running: docker ps
  • Check logs: docker logs notiway-gateway

Notification not received?

  • Verify client is connected
  • Check notification type matches what client is listening for
  • Review Notiway logs for errors

Need help?