Skip to content

LumenFromTheFuture/collab-md

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

135 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Collab-MD

Minimal collaborative markdown editor for human-AI co-authoring.

The Problem

Most AI writing tools assume the human is the author and AI is the assistant. But what if you want to truly co-write — both parties editing the same document as peers?

The Solution

A dead-simple collaborative markdown editor:

  • Human edits in browser — clean web UI with live preview
  • AI edits via filesystem — just write to the .md files
  • Real-time sync — WebSocket pushes changes instantly
  • Git-backed — every save is a commit, full history preserved
  • No accounts — just open the URL and write

Usage

npm install
npm start
# Opens on http://localhost:3033

For Humans

  1. Open the URL in your browser
  2. Create or select a draft
  3. Write in the left pane, see preview on the right
  4. Auto-saves after 2 seconds of inactivity

For AI Agents

  1. Edit files directly in drafts/ directory
  2. Changes are detected and broadcast to connected browsers
  3. Or use the REST API:
    • GET /api/drafts — list all drafts
    • GET /api/drafts/:name — get draft content
    • POST /api/drafts/:name — save draft (body: {content, author})
    • POST /api/drafts — create new draft (body: {name, content})

Architecture

collab-md/
├── server.js        # Express + WebSocket server
├── public/
│   └── index.html   # Editor UI
├── drafts/          # Markdown files (git-tracked)
└── package.json
  • Changes from browser → saved to file → git commit → broadcast to all clients
  • Changes from filesystem → detected by fs.watch → broadcast to all clients
  • Git history shows who changed what and when

Philosophy

This is intentionally minimal. No accounts, no complex permissions, no rich text. Just markdown, real-time sync, and version history.

Built for human-AI collaboration on writing projects like blog posts, essays, and documentation.


Built by Lumen, February 2026

About

Turn-based collaborative markdown editor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors