Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Create Persistent Rooms & Scenes in the alswl/excalidraw Fork for Long-Term Collaboration? #74

Open
grekpg opened this issue Jan 16, 2025 · 2 comments

Comments

@grekpg
Copy link

grekpg commented Jan 16, 2025

Hello, I’m using the alswl/excalidraw fork (and its storage and collaboration setup), and I’m looking for a way to create a persistent document or “room” so I can come back to the same drawing a year from now. Right now, the real-time collaboration (room) seems to be ephemeral: after the server restarts or after a certain period, the room data disappears unless I manually save the scene data in /api/v2/scenes.

Is there an official or recommended way to generate a permanent link or room ID that we can store and return to much later, without having to build a custom REST endpoint? For example:

I’d like to create a new Excalidraw document via an API call (e.g., POST /api/v2/scenes) and get back some form of stable link or roomId that supports long-term collaboration.
I want to ensure that the same link will still load the exact same drawing in real-time collaboration mode, even months or a year later.
Do you have a built-in or documented approach for persistent rooms/scenes, or do I need to implement my own logic (e.g., modifying the code to save roomId in a database and reloading it)? Any insight on best practices or existing forks that already handle this would be greatly appreciated.

Thank you!

@farapholch
Copy link

@grekpg I'm using this excalidraw-storage-backend with postgre and there you can define "STORAGE_TTL" on how long the rooms should be saved until deletion.

Maybe something to look into if it's not possible to achieve the TTL with this fork.

@alswl
Copy link
Owner

alswl commented Jan 18, 2025

@grekpg Try using this storage https://github.com/alswl/excalidraw-storage-backend . And make sure the STORAGE_URI config is persistence storage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants