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

wiki-plugin-mostly-harmless

v0.0.2

Published

Timeboxed collaborative editing plugin for federated wiki - allows users to collaboratively edit content for a limited time

Downloads

193

Readme

Mostly Harmless - Timeboxed Collaborative Wiki Hub

A federated wiki plugin that enables timeboxed collaborative contribution. Multiple users can contribute content within a limited time window, with each contributor getting their own linked page on the main hub.

Features

  • ⏱️ Countdown Timer - Visual countdown showing time remaining (5 minutes by default)
  • 👥 Collaborative Hub - Multiple users contribute to create a collection of linked pages
  • 🔗 Individual Content Spaces - Each contributor gets their own wiki page
  • 📋 Contributor List - Main hub displays links to all contributor pages
  • 🔗 Shareable URLs - Generate unique session URLs to invite collaborators
  • 🎨 Clean UI - Gradient design with responsive layout
  • ✅ Sessionless Auth Ready - Built with support for Sessionless authentication

Installation

npm install wiki-plugin-mostly-harmless

IMPORTANT: After installation, restart your wiki server for the plugin to load.

If you encounter issues, see TROUBLESHOOTING.md.

Usage

Creating a New Session

Add a mostly-harmless item to your wiki page:

{
  "type": "mostly-harmless",
  "id": "abc123"
}

When the page loads, a new collaborative editing session will be created automatically with a 5-minute timer.

Joining an Existing Session

To join an existing session, add a mostly-harmless item with a sessionId:

{
  "type": "mostly-harmless",
  "id": "abc123",
  "sessionId": "your-session-id-here"
}

How It Works

  1. Owner (logged in) creates a session - Adds the plugin to their wiki page, creating a new timeboxed session
  2. Owner clicks "View Hub Page" - The green button navigates to the hub page where all contributions will be linked
  3. Owner shares the hub page URL - Copies and sends the URL to collaborators
  4. Contributors (NOT logged in) can participate - No authentication required to view or contribute!
  5. Contributors click "Contribute" - Opens a full-screen writing interface
  6. Contributors enter their handle - Any name/pseudonym they choose
  7. Contributors type content - Up to 2000 characters
  8. Contributors click Submit - Each gets their own wiki page created automatically
  9. Hub page updates - The hub page now shows a link to the new contribution page
  10. Session expires - After 5 minutes, no more contributions accepted

Important: Only the page owner needs to be logged in. Contributors access the session via the shared URL without any login.

The Hub Page: This is where all the magic happens! The hub page contains:

  • The plugin UI showing the timer and contributor count
  • Clickable links to every contribution (added as paragraph items to the page)
  • Share URL for inviting more contributors

Key Concept: Individual Spaces, Collective Hub

Unlike traditional collaborative editing where everyone edits the same document, Mostly Harmless gives each contributor their own content space:

  • Each contributor gets their own wiki page - No overwriting or conflicts
  • The hub page collects all the links - Easy navigation to all contributions
  • Time-boxed collaboration - Creates urgency and focused contribution windows
  • Perfect for brainstorming sessions - Everyone contributes their own ideas
  • Great for anthology creation - Multiple authors, linked from one hub

Architecture

Client-Side (client/mostly-harmless.js)

  • Renders the hub interface with countdown timer
  • Handles user input (handle and content)
  • Submits content to server
  • Displays list of all contributors with links to their pages
  • Auto-refreshes timer every second
  • Updates contributor list in real-time after submissions

Server-Side (server/server.js)

  • Manages sessions in-memory (Map data structure)
  • Creates new sessions with expiration times
  • Accepts content submissions and generates page slugs
  • Tracks multiple contributions per session
  • Validates session expiration
  • Cleans up expired sessions automatically

API Endpoints

POST /plugin/mostly-harmless/create-session

  • Creates a new collaborative hub session
  • Returns: { sessionId, createdAt, expiresAt, contributions }

GET /plugin/mostly-harmless/session/:sessionId

  • Retrieves session information
  • Returns: Session details and all contributions with page URLs

POST /plugin/mostly-harmless/submit

  • Submits content to a session and creates a page URL
  • Body: { sessionId, handle, content }
  • Returns: { success, contribution, pageUrl, contributionCount }
  • Each contribution gets a unique page slug: mostly-harmless-{sessionId}-{handle-slug}

GET /plugin/mostly-harmless/session/:sessionId/history (optional)

  • Retrieves full list of contributions for a session

Configuration

Session Duration

Default: 5 minutes (300 seconds)

To change the duration, modify SESSION_DURATION in client/mostly-harmless.js:

const SESSION_DURATION = 300; // 5 minutes in seconds

And SESSION_DURATION_MS in server/server.js:

const SESSION_DURATION_MS = 5 * 60 * 1000; // 5 minutes

Content Limits

  • Handle: 30 characters max
  • Content: 2000 characters max

Use Cases

Brainstorming Sessions

  • Host creates a session with a topic prompt
  • Team members contribute their ideas within 5 minutes
  • All ideas linked from one central hub page
  • Perfect for async or synchronous brainstorming

Writing Anthologies

  • Create a collaborative short story collection
  • Each author writes their own piece
  • Hub page becomes the table of contents
  • Time limit encourages focused writing

Event Coverage

  • Multiple reporters covering an event
  • Each submits their perspective
  • Hub aggregates all viewpoints
  • Creates a multi-faceted event record

Learning Exercises

  • Teacher creates a session with a prompt
  • Students submit their responses
  • Hub becomes a gallery of student work
  • Encourages participation without direct competition

Wiki Page Creation

✅ Implemented! When a user submits their contribution, the plugin automatically creates a real wiki page for them.

Page Structure

Each contributor's page includes:

  • Title: "{Handle}'s Contribution"
  • Content: The full text they submitted
  • Attribution: "—{Handle}"
  • Timestamp: When it was submitted

Page Format

{
  "title": "Alice's Contribution",
  "story": [
    {
      "type": "paragraph",
      "text": "The actual content submitted by the user..."
    },
    {
      "type": "paragraph",
      "text": "—Alice"
    },
    {
      "type": "paragraph",
      "text": "Submitted 1/19/2026, 3:45:00 PM"
    }
  ]
}

What Happens

  1. User submits contribution
  2. Server generates unique page slug: mostly-harmless-{sessionId}-{handle-slug}
  3. Server creates actual wiki page using fedwiki's pagehandler
  4. Page appears in wiki's page list
  5. "View Page →" link works immediately
  6. Page is discoverable via wiki search

Future Enhancements

Sessionless Authentication Integration

The plugin is designed to integrate with Sessionless authentication:

// Generate signature for session access
const sessionUrl = await sessionless.generateAuthenticatedUrl(sessionId);

This would enable:

  • Verified identities for contributors
  • Access control (only invited users can join)
  • Cryptographically signed submissions
  • Contributor verification

BDO Persistence

Instead of in-memory sessions, use BDO (Big Dumb Object) storage:

// Save session to BDO
await bdo.updateBDO(uuid, `mostly-harmless-${sessionId}`, sessionData, true);

// Retrieve session from BDO
const sessionData = await bdo.getBDO(uuid, `mostly-harmless-${sessionId}`);

Benefits:

  • Sessions persist across server restarts
  • Distributed session management
  • Long-term archival of collaborative history

Real-Time Updates

Add WebSocket support for live updates:

// Notify all connected clients when new contribution added
io.to(sessionId).emit('new-contribution', contribution);

Users would see new contributors appear in real-time without refreshing the page.

Development

Build

No build step required - pure JavaScript.

Testing Locally

  1. Install in your federated wiki instance:

    npm install /path/to/wiki-plugin-mostly-harmless
  2. Restart your wiki server

  3. Add a mostly-harmless item to a page

  4. Open the page and start collaborating!

License

MIT

Author

Planet Nine (planetnineisaspaceship)

Links

Date

January 19, 2026 - Initial release