HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
yjs
yjs
JavaScript2017–2026
yjs / yjs

yjs

Shared data types for building collaborative software

40Distinct people
54Mentions
0Explicit recommenders
23.1KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Shared data types for building collaborative software

GitHub

Where it is used

  • Sana — Sana A learning platform with collaborative text editing powered by Yjs. Source

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:03:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year54 dated mentions

Observed mentions: 2017-09-01 16:24:46 UTC to 2026-05-14 05:37:18 UTC.

051015202017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 9 mentions; 0 submissions, 9 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 18 mentions; 3 submissions, 15 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 7 mentions; 1 submissions, 6 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 6 mentions; 2 submissions, 4 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC211
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC101
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC404
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC909
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC18315
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC716
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC624
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC303
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC312

What Hacker News says

54 sources
braden-w·Apr 7, 2026Submission

Show HN: Opensidian: Local-first notes in the browser with POSIX shell and sync

Hey HN! Braden here. Some of you might know me from Whispering a while back (https://news.ycombinator.com/item?id=44942731). Obsidian was one of the biggest inspirations behind the Epicenter project. I used it daily and think it's incredible software. But it's not open source, and Obsidian Sync never quite worked the way I wanted it to. I think any tool that sits this deep in your personal knowledge system should be open source and auditable. So I built Opensidian as an open-source proof of concept: what happens when you store notes as Yjs CRDTs, sync them across servers, encrypt them end-to-end, and put a POSIX-like filesystem on top? To do this, I built `@epicenter/filesystem`, which exposes a virtual filesystem interface on top of `@epicenter/workspace`'s CRDT tables. I then wired this into `just-bash`, a bash interpreter implemented e
Read the rest
ntirely in TypeScript, which provided 80+ Unix commands (awk, sed, grep, jq, find, sqlite3, curl, etc.) to run against the same data the editor uses. Shell commands and the UI hit the same underlying CRDTs. $ echo "# Meeting notes" > /notes/2026-04-06.md $ mkdir /notes/archive $ mv /notes/2026-04-06.md /notes/archive/ $ open /notes/archive/2026-04-06.md Those commands create and move real files that immediately appear in the editor's file tree. The best part is that all of this works in both browser and server-side contexts, since yjs (https://github.com/yjs/yjs) is isomorphic. Under the hood, metadata (name, parent, timestamps) lives in a versioned CRDT table. Document content lives in a separate Y.Doc per file, so the directory index syncs without pulling every document body. Sync uses the Yjs protocol over WebSocket, with Cloudflare Durable Objects persisting an append-only SQLite update log. Everything is encrypted end-to-end with XChaCha20-Poly1305. Keys derived via HKDF-SHA256; the sync server sees only the ciphertext. More features: CodeMirror 6 with Yjs collaboration binding, `[[` internal links that store file IDs (renames don't break them), SQLite FTS5 search, AI chat with tool-call approval UI, and Vim mode. Opensidian itself is a demo. For the last six months, I've been working on the infrastructure underneath: `@epicenter/workspace` (typed CRDT tables with versioning, migrations, encryption, and sync) and `@epicenter/filesystem` (a POSIX filesystem layer over Yjs). I'll be writing more about those APIs separately and integrating them into more apps in the ecosystem (including Whispering). The idea is that anyone can build local-first apps on the same foundation: notes, task managers, knowledge bases, etc., while solving the most difficult problems of local-first sync. The UI is rough, and the feature set is thin compared to Obsidian; this isn't trying to replace it today. But I'm excited for what the future of personal computing tools could look like! MIT licensed. Would love feedback, ideas, and roasts. Source: https://github.com/EpicenterHQ/epicenter/tree/main/apps/open... Discord: https://go.epicenter.so/discord
2 points · Open discussion
I really like these sorts of frameworks from an architectural perspective, but what's the use-case? Maybe I'm too SPA-pilled, because to me all the fun of Web development is in providing really fluid, skeuomorphic experiences like those enabled by, eg pragmatic-drag-and-drop[0] or yjs[1]. I just struggle to envision what application benefits from the efficiency that this or htmx offer, but from neither the ultra-interactive, nor the ultra-collaborative. Maybe updating stock ticker prices? Fast-service back-of-house ticketing displays? I would love to feel called to reach for this library. 0. https://github.com/atlassian/pragmatic-drag-and-drop 1. https://github.com/yjs/yjs
In Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies
Indeed, this is close to what Yjs (popular CRDT library) does: each client instance (~ browser tab) chooses a random 32-bit clientId, and character IDs combine this clientId with local counters. https://github.com/yjs/yjs/blob/987c9ebb5ad0a2a89a0230f3a0c6... Any given collaborative document will probably only see ~1k clientIds in its lifetime, so the odds of a collision are fairly low, though I'd be more comfortable with a 64-bit ID.
In Collaborative Text Editing Without CRDTs or OT
I write undo/redo/history in web/JS extensively. This the best lib out there for such tasks IMHO: https://github.com/yjs/yjs And you're right. You don't want undo/redo only in multi-user apps. You want to have each user have their own local undo/redo events that they can apply and unapply from the shared state which has its own events apart from each user. Everyone involved needs to keep track of what events they have created forever and always for things to work correctly. This is exactly what ES, OT, and CRDT patterns do, CRDT being the most recent and most capable.
In Oops.js
After reviewing the ~600 lines of code, I have to ask what about this undo/redo manager is "advanced"? This seems like a naive implementation of a snapshot collection that is selected via array index. It's not event sourcing, OT or CRDT. With every event, the entire object is serialized and put into the heap. I can't even imagine what this does for performance when you deal with any object of significant size. What if you wanted to do something like type? Thousands of copies of the same thing. Why not https://github.com/yjs/yjs? Event sourcing is cool. Operational transformation is awesome. But Conflict Free Replicated Data Types are king. Read up on event sourcing, OT and CRDT. If you're not using one of these patterns and you haven't come up with something better you're creating foot guns for the world to shoot themselves with
Read the rest
. I apologize for being so harsh. I write undo/redo on JS/web quite a lot and this is going down a dark path. Also, you should not put your dist directory in your repo. It should be a deployed artifact connected to a tagged release - or even better keep it in NPM where it belongs.
In Oops.js
jasonbw·Feb 21, 2024Submission

Show HN: Collaborate on your YC Application with CRDT-powered forms

Hi HN, Like many of you here, this is not my first time applying to YC. Each time, my co-founder and I would copy the YC application to google docs to collaborate on it, then we copy it back to submit. This got us thinking - why can't we just collaborate on the YC application in the YC application? At one point I went down the CRDT rabbit hole and realized collaborative forms would be a great use of CRDTs, so I decided to build this out to an MVP. If you're curious about CRDTs (Conflict-Free Replicated Data Types) and how they differ from OT (Operational transformation, which is what powers Google Docs) the tl;dr is that OT requires a central server to merge edits from different clients, whereas CRDTs are a data structure with commutative and idempotent operations, that can merge concurrent edits deterministically to always end up at the
Read the rest
same final state. This gives you a bunch of cool properties out of the box. Real time support as clients merge concurrent edits from other clients (usually via some central server). Offline support through deterministic merging of offline edits from multiple clients as they reconnect. P2P support because you can send the underlying operations independent of a server and clients can build up the state themselves. If you want to dig deeper there are a bunch of CRDT articles posted to HN. Two that I enjoyed reading are [1] by josephg and [2] by jakelazaroff. CRDTs are also showing up in more software. The Zed editor posted last month uses CRDTs [3] and they have a blog post explaining how it works [4]. Rumor has it that Apple Notes uses CRDTs under the hood. The CRDT library I used is Yjs [5]. If you want to try out TogetherForm for your YC S24 application, this will generate a unique link with the YC application you can share with your co-founder [6]. I'd love to hear any feedback and suggestions you have. I'm also trying to figure out where to focus my time next: a. Build out the no-code form builder. b. Build out a React library (or similar) that allows you to make your forms collaborative by, say, using a special <TogetherForm> component. One last thing: I know it's a lot to trust a random new product, so here's a Google Doc template for the S24 YC application that you can copy and keep for yourself [7]. [1] https://news.ycombinator.com/item?id=31049883 [2] https://news.ycombinator.com/item?id=37764581 [3] https://news.ycombinator.com/item?id=39119835 [4] https://zed.dev/blog/crdts [5] https://github.com/yjs/yjs [6] https://togetherform.com/yc [7] https://docs.google.com/document/d/1zpU14-9zcYGvbxmtLKEbDcsl...
22 points · Open discussion
You are absolutely right that XML is better for document structures. My current theory is that Yjs [0] is the new JSON+XML. It gives you both JSON and XML types in one nested structure, all with conflict free merging via incremental updates. Also, you note the issue with XML and overlapping inline markup. Yjs has an answer for that with its text type, you can apply attributes (for styling or anything else) via arbatary ranges. They can overlap. Obviously I'm being a little hypabolic suggesting it will replace JSON, the beauty of JSON is is simplicity, but for many systems building on Yjs or similar CRDT based serialisation systems is the future. Maybe what we need is a YjsSchema... https://github.com/yjs/yjs/
In JSON Schema Store
Most live coding languages relying on SuperCollider can take advantage of the client-server architecture of SC and support collaboration easily. So it's very interesting that the concept of collaboration is highlighted on Overtone website. Is it embedded in the language aspect? When I develop Glicol[1], I want to build a WYSIWYG style: for example commenting out a line will mute the track. But it brought some challenges to collaboration so I have to build some "consensus" mechanism on top of the Google doc style text co-editing (powered by yjs[2]). [1] https://glicol.org/ [2] https://github.com/yjs/yjs
In Overtone – programmable, live music in Clojure

Showing the 15 most recent of 54 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.