A real-time collaborative markdown editor that works peer-to-peer, built with Svelte, Yjs and WebRTC.
This project allows multiple users to simultaneously edit markdown documents in real-time without requiring a central server. All collaboration happens directly between peers' browsers using WebRTC technology.
- Real-time collaborative editing
- Peer-to-peer connection (no central server needed)
- Markdown preview
- Syntax highlighting
- Automatic conflict resolution
- Works offline (changes sync when reconnected)
- Session persistence
# Clone the repository
git clone https://github.com/mateoroldos/collaborative-markdown.git
cd collaborative-markdown
# Install dependencies
pnpm install
# Start the development server
pnpm run dev
# Turn on the WebRTC signaling server
PORT=4444 node ./node_modules/y-webrtc/bin/server.js
# Create a production build
pnpm run build
# Preview the production build locally
pnpm run preview
- Start the application and share the unique room URL with collaborators
- Each collaborator with the link can join the editing session
- Changes are synchronized in real-time between all participants
- The document is automatically saved in the browser's local storage
The application uses:
- Svelte and SvelteKit for the UI and application framework
- WebRTC peer-to-peer connections
- Yjs for conflict-free replicated data types (CRDT)
- IndexedDB for local storage of documents
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request