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

@volter/twin-mongodb

v0.1.37

Published

Local MongoDB twin: the MongoDB wire protocol (OP_MSG and the OP_QUERY handshake) served from the World state kernel, so an unmodified mongodb driver or mongoose app runs with nothing installed and no container.

Readme

@volter/twin-mongodb

A MongoDB server for a World: the MongoDB wire protocol on a loopback TCP listener, over the World state kernel. An unmodified application using the official mongodb driver or mongoose connects to mongodb://127.0.0.1:<port>/<db> as to a standalone MongoDB 7.0, with nothing installed and no container.

How a World gets it

A repository whose env names a MongoDB connection string (MONGO_URI, MONGODB_URL, a mongodb:// DATABASE_URL) is managed infrastructure: volter-world init declares the infrastructure service and points the variable at it. On a machine with a container runtime that service runs mongo:7; without one, volter-world-infra serves the mongodb kind with this package, its state under the World's data directory, so it survives down and up.

Run it alone with world-mongodb serve --port 27017 --root <dir>.

Where the state lives

In the kernel, one subject per stored thing: collection (<db>.<name>), index (<db>.<name>#<index>) and document (<db>.<name>/<_id>, the document as canonical Extended JSON). One command is one kernel entry. Checkpoints, branches, push and history work as for any twin.

Coverage

The denominator is MongoDB's command reference (171 commands) plus the semantics the answers depend on; src/mongodb-capabilities.ts is the manifest, every entry done or todo.

  • Commands done: hello, isMaster, ping, buildInfo, getParameter, connectionStatus, whatsmyuri, dbStats, listDatabases, listCollections, create, drop, dropDatabase, insert, find, getMore, killCursors, update, delete, findAndModify, count, distinct, aggregate, createIndexes, listIndexes, dropIndexes, startSession, endSessions, refreshSessions, killSessions, killAllSessions.
  • Every other command answers MongoDB's no such command: '<name>' (59 CommandNotFound).
  • Queries: $eq $ne $gt $gte $lt $lte $in $nin $exists $regex $and $or $nor $not $elemMatch $size $all $type $mod $expr, dotted paths through embedded documents and arrays. $text, $where, $jsonSchema, geo and bitwise operators are todo.
  • Updates: $set $unset $inc $mul $min $max $rename $push (with $each $position $sort $slice) $addToSet $pull $pullAll $pop $setOnInsert $currentDate $bit, positional $, $[], $[<id>] with arrayFilters, replacement and pipeline updates, upserts.
  • Aggregation: $match $project $addFields $set $unset $sort $limit $skip $count $group $sortByCount $unwind $lookup $replaceRoot $replaceWith $facet and the common expressions and accumulators. $out $merge $unionWith $bucket $sample $graphLookup and the rest answer CommandNotSupported (115).
  • Indexes: unique enforcement with E11000 duplicate key error (keyPattern, keyValue) on insert, update, upsert and index build; compound, sparse and partial unique indexes; TTL expiry (an expired document is gone from reads and deleted by the next write). Text and geo indexes are stored but not searchable.
  • Sessions: lsid is accepted; a command carrying txnNumber answers the standalone server's Transaction numbers are only allowed on a replica set member or mongos (20 IllegalOperation).
  • Planning: no index changes how a query runs; a hint is validated (BadValue for a missing index) and $natural order is honoured, and explain answers no such command.
  • Not modeled: authentication (a connection string with credentials fails), TLS, compression, non-simple collations, capped collections, views, schema validation, change streams, and numeric subtypes (a stored double holding an integral value answers as int32).

Proofs: src/mongodb-driver.integration.test.ts (the driver), src/mongodb-mongoose.integration.test.ts (mongoose models with a unique index and populate), src/mongodb-librechat.integration.test.ts (LibreChat's schemas, indexes and message/conversation query shapes).