Collaborative Editing
Integrates with any editor supporting Y.js - ProseMirror, Quill, Monaco, BlockNote, Tiptap, and more.
Tip Click on Pepper, the parrot, to open the Teleportal devtools!
Collaborative Editing
Integrates with any editor supporting Y.js - ProseMirror, Quill, Monaco, BlockNote, Tiptap, and more.
Storage Agnostic
Use any storage backend - Redis, PostgreSQL, S3, Cloudflare R2, or implement your own. Documents are never stored in-memory, making it perfect for scalable deployments.
Transport Flexible
Works with WebSockets, HTTP, Server-Sent Events, or any transport that supports bidirectional communication. Built on web-native Streams APIs.
Runtime Agnostic
Built on web primitives and works on any JavaScript runtime - Node.js, Bun, Deno, or any modern JavaScript environment. It’s only plain JavaScript.
Modular Architecture
Teleportal is built as a composable set of modules that can be used together to make a complete sync server. Use your own auth, storage, and more.
Encryption
Supports end-to-end encryption and encryption at rest. Optional AES-GCM encryption for document updates and file transfers. Includes key management utilities and encrypted transport layers.
Monitoring & Observability
Built-in Prometheus metrics, health checks, and status endpoints. Track clients, sessions, messages, and performance metrics.
7 collapsed lines
import { serve } from "crossws/server";import { createTokenManager } from "teleportal/token";import { tokenAuthenticatedWebsocketHandler } from "teleportal/websocket-server";import { tokenAuthenticatedHTTPHandler } from "teleportal/http";import { checkPermissionWithTokenManager, Server } from "teleportal/server";import { YDocStorage } from "teleportal/storage";
// token manager is a JWT token verifier and manager.const tokenManager = createTokenManager({ secret: "your-secret-key-here", expiresIn: 3600, // 1 hour issuer: "teleportal.tools",});
// Create a Teleportal server instanceconst server = new Server({ // you can use any storage backend you want, this one is in-memory storage: new YDocStorage(), // every message is verified against the token's permissions to the document checkPermission: checkPermissionWithTokenManager(tokenManager),});
// Serve the Teleportal server with crossws (for multi-runtime support)serve({ // websocket upgrades are denied if the token is invalid websocket: tokenAuthenticatedWebsocketHandler({ server, tokenManager }), // HTTP requests are denied if the token is invalid fetch: tokenAuthenticatedHTTPHandler({ server, tokenManager }),});3 collapsed lines
// Clientimport { Provider } from "teleportal/providers";
// Create a provider that connects to the serverconst provider = await Provider.create({ url: "https://teleportal.tools?token=your-token-here", document: "my-document",});
// Wait for the document to sync with the serverawait provider.synced;
// Insert text into the documentconst ytext = provider.doc.getText("content");ytext.insert(0, "Hello, world!");With that, you have token-authenticated, real-time collaborative editing with Y.js!
Teleportal is designed not as a standalone server that you need to setup and deploy, but as a framework to build your own sync server, with just the features you need. You don’t need to wait until Teleportal has all of the features you need, no more waiting for new APIs or plugins, just build it!
This allows you to use:
Any storage
Use any storage backend you want, from Redis to PostgreSQL to S3
Any transport
Use any transport you want, from WebSockets to HTTP to HTTP SSE
Any JS runtime
Use any JS runtime you want, from Node.js to Bun to Deno (it even works in the browser!)
Any authentication
Use any authentication provider you want, from JWT to OAuth to custom