Y.js sync server for instantly portaling your documents to another machine.
TelePortal: A storage, transport & runtime agnostic Y.js server/provider. Built on web primitives, supports subdocs, and handles everything without in-memory storage. Perfect for collaborative apps! ๐
This is a Y.js Server & Provider that aims to be storage, transport, and runtime agnostic.
undefined๐พ Storage: Storage is completely de-coupled from the library, you can store documents in a KV, relational database or even S3, totally up to you
unstorage which can swap out drivers for many different storage schemes.undefined๐ Transport: everything is defined using Web standard streams and encodes to a Uint8Array
undefined๐ Runtime: built on web primitives, everything should work on any JavaScript runtime, with minimal dependencies

undefined๐ Ease-of-use: We wonโt make you learn what a Y.Doc is, and make you store it somewhere, keep an instance of the provider, and youโll have everything you need!
undefined๐ Sub-docs: Full support for Y.js subdocs - there arenโt many providers out there which have implemented this, this one does ๐
undefined๐๏ธ Performance: Built on top of web-native Streams APIs, supporting control-flow, backpressure. All without actually storing the documents in-memory
undefined๐ Zero in-memory storage: Documents are never stored in memory on the server, making it perfect for scalable deployments
jose libraryread, write per message@logtape/logtapeimport { Server } from "teleportal/server";
import { createInMemory } from "teleportal/storage";
import { getWebsocketHandlers } from "teleportal/websocket-server";
const server = new Server({
getStorage: async (ctx) => {
const { documentStorage } = createInMemory();
return documentStorage;
},
});
const handlers = getWebsocketHandlers({
onConnect: async ({ transport, context, id }) => {
await server.createClient(transport, context, id);
},
onDisconnect: async (id) => {
await server.disconnectClient(id);
},
});
npm install teleportal
# or
bun add teleportal
# or
pnpm add teleportal
TelePortal provides multiple entry points:
teleportal - Core libraryteleportal/server - Server implementationteleportal/providers - Client providersteleportal/storage - Storage interfaces and implementationsteleportal/http - HTTP handlersteleportal/websocket-server - WebSocket server handlersteleportal/protocol - Protocol encoding/decodingteleportal/protocol/encryption - Encryption protocolteleportal/transports - Transport middlewareteleportal/transports/redis - Redis transportteleportal/transports/nats - NATS transportteleportal/token - JWT token utilitiesteleportal/encryption-key - Encryption key managementteleportal/monitoring - Metrics and monitoringteleportal/devtools - DevTools integrationteleportal/merkle-tree - Merkle tree utilitiesMPL-2.0
[!NOTE]
๐ง This is still a work in progress. Feedback and contributions are welcome!
We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.