Step 01
Create a realtime app
An app is an isolated realtime project. It has its own app ID, public key, secret preview, allowed origins, region, environment, and limits.Step 02
Add trusted origins
Allowed origins tell DomVia Realtime which websites are allowed to connect. Add your production domain before real users connect.Step 03
Use the public key on clients
The public key is safe for browser, mobile, and client SDK setup. It identifies the app that should receive the realtime connection.Step 04
Authorize private access
For private and presence channels, your trusted server route should verify the user and return a signed authorization response.const realtime = new DomViaRealtime({
key: "pk_live_your_public_key",
host: "ws.domvia.net",
});
const channel = realtime.subscribe("private-chat.room.42");
channel.on("message.new", (event) => {
console.log("New message:", event);
});