npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nielpattin/documine

v1.1.3

Published

Self-hosted collaborative markdown editor (pdf preview) with inline comment threads

Downloads

55

Readme


Quick Start

pnpm install
pnpm dev

Open http://localhost:5173 for the editor and http://localhost:3120 for the API.

Prefer a global install?

pnpm add -g @nielpattin/documine
documine serve --port=3120 --data=./data

Features

| | | |---|---| | ✏️ Real-time collab | Multiple cursors, live sync, undo/redo — works across tabs and users | | 🔍 Live PDF preview | Rendered preview pane synced to the editor, with scroll sync | | 🖨️ PDF export | Configurable Pandoc PDF export with shareable, revocable links | | 💬 Anchored comments | Select text, add a thread. Reply, resolve, reopen. Threads survive edits | | 🔗 Share with control | Per-note links with configurable access: view, comment, or edit | | 🤖 Agent-ready CLI | Register with an API key or share link. Read, edit, comment — from a terminal or AI agent | | 🌓 Dark + light | Theme toggle with persisted preference | | 📱 Mobile | Responsive layout for editing on smaller screens | | 🐳 Docker | One-command deployment with docker-compose |


CLI

DocuMine's CLI works in two modes. Both are accessible to humans and agents alike.

Owner mode

Create API keys from the settings gear on the landing page. Full access to all notes.

documine register myserver https://documine.example.com <api-key>
documine myserver list
documine myserver search "query"
documine myserver read <note-id>
documine myserver create "My note"
documine myserver edit <note-id> '[{"oldText":"foo","newText":"bar"}]'
documine myserver delete <note-id>

Shared mode

Share links are the credential. No API key needed. Access level set by the owner.

documine register shared https://documine.example.com/s/abc123
documine shared read
documine shared edit '[{"oldText":"foo","newText":"bar"}]'
documine shared comment "quoted text" "comment body" --name="My Agent"

HTTP API

All owner endpoints use Authorization: Bearer <api-key>.

| Method | Endpoint | Description | | ------ | -------- | ----------- | | GET | /api/notes?q=<query> | List / search notes | | POST | /api/notes | Create note | | GET | /api/notes/:id | Read note | | PUT | /api/notes/:id | Update title, markdown, or share access | | DELETE | /api/notes/:id | Delete note | | POST | /api/notes/:id/edit | Apply text edits | | POST | /api/notes/:id/threads | Create comment thread | | POST | /api/notes/:id/threads/:tid/replies | Reply to thread | | PATCH | /api/notes/:id/threads/:tid | Resolve / reopen thread | | DELETE | /api/notes/:id/threads/:tid | Delete thread | | PATCH | /api/notes/:id/messages/:mid | Edit comment | | DELETE | /api/notes/:id/messages/:mid | Delete comment | | GET | /api/keys | List API keys | | POST | /api/keys | Create API key | | DELETE | /api/keys/:id | Delete API key |

| Method | Endpoint | Description | | ------ | -------- | ----------- | | GET | /api/share/:sid | Read shared note | | GET | /api/share/:sid/note | Read shared note (lightweight) | | POST | /api/share/:sid/edit | Edit (requires edit access) | | POST | /api/share/:sid/threads | Create comment | | POST | /api/share/:sid/threads/:tid/replies | Reply | | POST | /api/share/:sid/render | Render markdown to HTML |


Architecture

apps/web          → React + Vite frontend (editor, preview, comments)
src/server.ts     → Hono API server with WebSocket collab
data/             → .md files on disk + .json sidecars (source of truth)

Notes are stored as markdown files on disk. The .json sidecar holds the collaborative editing state (history, cursors, threads). Markdown files are written for convenience — grep, backup, and external tooling.


Docker

cd docker
bash control.sh startdev

Starts the API on http://localhost:3120 and the frontend on http://localhost:5175.


Development

git clone https://github.com/nielpattin/documine.git
cd documine
pnpm install
pnpm dev

The API runs on http://localhost:3120. The frontend runs on http://localhost:5175.


Data layout

data/
  auth.json
  notes/
    <id>.md
    <id>.json

Contributing

Contributions are welcome. Open an issue or pull request.


License

MIT