AI Briefing
KO

A CRDT-Based, Type-Safe Real-Time Collaborative Graph Database

·2026.04.21 19:33

Key point

Released a type-safe Graph Database with Yjs-based real-time synchronization.

Details

@codemix/graph and @codemix/y-graph-storage combine a type-safe Graph Database with Yjs CRDT-based real-time collaboration.

Schemas define Vertex, Edge, and Index as plain objects, and Standard Schema-family libraries like Zod, Valibot, and ArkType can be used. Runtime validation occurs in addVertex, addEdge, and updateProperty, and types propagate throughout queries and mutations.

The traversal API is structured in Gremlin style, and steps like hasLabel, has, where, out, as, and select undergo TypeScript type checking. It's also possible to declare hash, B-tree, and full-text indexes inline in the schema, with lazy creation and incremental maintenance.

Swapping the storage from InMemoryGraphStorage to YGraph makes the entire graph operate as a Yjs document. Attaching a Yjs provider such as WebsocketProvider lets multiple tabs and peers share the same graph, with support for change events and live query subscriptions.

For collaborative properties, ZodYText and ZodYArray are provided, allowing Y.Text and Y.Array to be placed directly into the schema. Plain values are automatically converted, and each peer's edits are merged without conflicts.

Queries can also be run using a Cypher-compatible string language, making it easy to expose to MCP servers or external clients. It supports MATCH, CREATE, MERGE, SET, and DELETE, and writes can be blocked via a readonly option.

It is currently alpha-quality, and the maker states it is already in use in an internal production environment.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.