Skip to content

cnatthaphon/syncmd

Repository files navigation

SyncMD — Collaborative Markdown Editor

Status GitHub Actions License

Real-time collaborative markdown editor with Simulink-style block pipeline architecture.

SyncMD Demo

Live Demo

Deployed on Render (free plan — first load may take ~30s to wake up):

https://comd-b4ix.onrender.com

Page URL
Editor /
Login /login.html
Admin (user management) /admin.html
Pipeline Graph /graph.html
Block Table View /blocks.html

Note: Free plan spins down after 15 min idle. First visit after idle takes ~30s cold start. After that it runs normally. Files persist during session but reset on redeploy.

Local Development

npm install
node src/main.js
# Open http://localhost:3000

Docker

docker compose up

Features

  • Dual-pane editor (raw markdown + live preview)
  • Real-time sync via WebSocket (live typing)
  • Edit lock with 5-min timeout + request/accept/deny unlock
  • Claude AI integration for document editing
  • File upload and .md import
  • Block pipeline visualizer (/blocks.html)

Authentication

Built-in user authentication with role-based access control.

  • Default login: admin / admin (change on first login)
  • Roles: admin (manage users + edit), editor (edit files), viewer (read only)
  • Admin panel: /admin.html — create/edit/delete users (admin role only)
  • Session tokens with 24-hour expiry, SHA-256 hashed passwords
  • All API routes and WebSocket connections require authentication

Architecture

Simulink-style block pipeline — every operation flows through composable blocks:

READ:    Input → Validate → Render → Log → Output
SAVE:    Lock → Validate → Save → Render → Log → Output
CLAUDE:  Input → Claude → Validate → Save → Render → Log → Output

8 blocks, 5 pipelines, wired by RenderManager.

Docs

Deploy

Configured for Render with persistent disk. See render.yaml.

Stack

Node.js, Express, WebSocket, sql.js, markdown-it, vanilla HTML/JS/CSS

About

SyncMD — Real-time collaborative markdown editor with block pipeline architecture, auth, CI/CD, E2E tests

Resources

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors