SeuraaEdge
v1
Docs/Getting Started
Getting Started

Learn how Seuraa connects your backend and application users.

Introduction

Seuraa delivers application events to connected users over channels.

Your backend controls identity and access. It authenticates users, chooses the channels they may access, and issues short-lived channel tokens. Client applications use those tokens to subscribe and, when permitted, publish events.

Core Concepts

ConceptDescription
AppAn isolated Seuraa tenant identified by an app key.
ChannelA named stream of events within an app.
EventA named JSON payload published to a channel.
Channel tokenA short-lived credential granting a user specific channel permissions.
PresenceLive membership information for a presence:* channel.

Application Flow

  1. A user signs in to your application.
  2. The browser subscribes to a channel.
  3. The Seuraa client requests a channel token from your backend.
  4. Your backend authorizes the user and signs the token.
  5. Seuraa validates the token and connects the user to the channel.
  6. Events published to the channel are delivered to its subscribers.

Install

Seuraa SDK packages are available to early-access accounts. Use the package version supplied with your account.

bash
pnpm add @seuraa/edge

The package provides separate browser and backend entrypoints:

ts
import { Client } from "@seuraa/edge/browser";
import { Client } from "@seuraa/edge/backend";

Keep the backend entrypoint and your app secret in trusted code.