A proof-of-concept implementation of a tree-based CRDT algorithm with local SQLite database and PartyKit-based backend. Each thoughtspace gets its own room and Turso SQLite database. Real-time collaboration is powered by WebSocket connections through PartyKit, with full history synchronization via HTTP streaming.
- Tree-based CRDT algorithm for conflict-free collaborative editing
- Local SQLite database for offline-first capabilities
- Real-time collaboration via PartyKit WebSocket connections
- Full history synchronization through HTTP streaming
- Separate room and Turso SQLite DB for each thoughtspace
- Foreground sync with all capabilities until local client is fully hydrated
To start the development environment:
yarn dev
This will open two terminal tabs:
- Client development server
- PartyKit development server
You can also run them separately:
# Run the client development server
yarn client:dev
# Run the PartyKit server
yarn server:dev
# Build the client
yarn client:build
# Deploy to PartyKit
yarn deploy
# Seed the database
yarn seed
src/shared
- Shared code between client and serversrc/party/server.ts
- PartyKit server implementationsrc/app
- Client-side React applicationsrc/app/worker
- Web Workers for database operations
For more information about PartyKit, visit the PartyKit documentation.