LetsMarkdown: Lightweight Collaborative Markdown Editor Powered by Rust

7月17日 Published inMarkdown Tools

LetsMarkdown.com offers a streamlined, web-based Markdown editing experience. It operates without accounts or tracking, providing a clean workspace for individual writing or real-time collaboration.

Key Features

  • Live Collaboration: Edit the same document simultaneously with teammates. Changes appear instantaneously as they happen.
  • Familiar Interface: Features like syntax highlighting, autocompletion, and a command palette will feel familiar to users accustomed to code editors. Themes can be switched to suit your preference.
  • Dark Mode: A dark theme is available to reduce eye strain.
  • Emoji Shortcuts: Type : to access and select from a list of emojis.
  • Rust Under the Hood: The backend leverages WebAssembly and Rust, ensuring fast and efficient performance.
  • Upcoming Features: Cursor tracking, synchronized scrolling, and extended Markdown syntax for footnotes and inserts are planned for future releases.

The Stack

The backend coordination server, a fork of Rustpad, is written in Rust. The frontend is built with TypeScript and React. A WebSocket connection facilitates real-time communication between these components. Markdown rendering is handled by the markdown-it.js library, styled with a custom markdown.css stylesheet.

Run It Locally

  1. Install Rust, wasm-pack, and Node.js. Verify your installations with:

    rustup -V && wasm-pack -V && npm -v
    
  2. Build the WebAssembly module:

    wasm-pack build --target web letsmarkdown-wasm
    
  3. Install frontend dependencies:

    npm install
    
  4. Start the Rust backend:

    cargo run
    
  5. In a separate terminal window, start the React development server:

    npm run dev
    

    A browser tab will open to http://localhost:3000. Edits trigger hot reloads.

Deploy with Docker

LetsMarkdown is distributed as a single 12MB Docker image, built automatically from the repository's Dockerfile. It supports both linux/amd64 and linux/arm64 architectures.

Pull the latest image:

docker pull cveinnt/letsmarkdown

Run the container:

docker run --rm -dp 3030:3030 cveinnt/letsmarkdown

Then, visit http://localhost:3030.

You can also build the image manually from the project root:

docker build -t rustpad .

The entire setup is remarkably lightweight. There are no databases or user tables; simply share a URL and begin typing with others.