r/mongodb • • 4h ago

I built a self-hosted, browser-based MongoDB manager for teams (open source, AGPL-3.0)

5 Upvotes

Hi r/mongodb! Compass is a great tool, but it's built for one person on one laptop. I wanted something my whole team could use from a browser, running on our own server, with roles, an audit log and backups built in. So I built Mongo Manager.

GitHub: https://github.com/mongo-manager/mongo-manager

What it does for MongoDB specifically:

  • Query plans: explain output as a tree with warnings, and a suggested index prefilled ("why is it slow?"). On sharded clusters it shows each shard's plan.
  • Aggregation builder: stage cards with a live preview of each stage on a sample; $out/$merge only run after a confirmation. Pipelines export to Node.js, Python, Java, Go, C#, PHP, Ruby and Rust.
  • Indexes: every type and option, $indexStats usage, plus Atlas Search and Vector Search indexes.
  • Schema analysis: field types, frequency and value histograms; generate validation rules from a sample and test them against existing documents.
  • Replica sets: member status and replication lag with 7 days of history, lag alerts, and change streams with filters and pre-images.
  • Sharding: chunk distribution per shard, zones, balancer windows, and a shard key check before you shard a collection.
  • Live sync: a continuous, verified copy between connections, ending with a cutover.
  • Backups: mongodump archives or encrypted files, scheduled, to S3, Google Drive, WebDAV or a local folder; restores get a dry run first.
  • Auth: SCRAM, X.509, LDAP, AWS IAM, OIDC, Kerberos, SSH tunnels; CSFLE and Queryable Encryption.

For teams: admin/editor/viewer roles, access per connection, 2FA, a hash-chained audit log, and rule-based masking of personal data.

Try it: npx @mongo-manager/app (Node 24+), Docker, or a standalone binary. Supports MongoDB 6.0+, Atlas included. Works fully offline.

About AI: there's an optional AI agent (your own provider, or Ollama locally) that never changes anything without your confirmation. Also, to be upfront: most of the code was written with Claude. I designed it, reviewed it, and the server tests run against real MongoDB 6.0, 7.0, 8.0 and 8.3 servers and replica sets.

It's a new project, so I'd really appreciate feedback, especially from people running replica sets or sharded clusters in production. What would you need before trusting a tool like this with your databases?


r/mongodb • • 1d ago

I built Rusa, an open-source MongoDB client in Flutter for Desktop & Mobile (GPLv3)

3 Upvotes

Hey everyone! After months of building, I just launched Rusa v1.0, a modern, native-feeling MongoDB client built with Flutter.Why I built it:
I wanted a lightweight alternative to heavy Electron-based MongoDB GUIs that also lets me inspect collections and run quick queries from my phone when I'm away from my desk.

What’s live in v1.0:
Supported Platforms: Windows, Linux, and Android are ready to download today (macOS and iOS are coming soon).

Open-Source (GPLv3): You can inspect the full source code and verify how credentials are stored locally.

Core Features: Fast document browsing, JSON/BSON editing, and query filtering across desktop and mobile.

Links:
Website & Downloads: https://rusa.deveditortools.com
Product Hunt Launch (would love your feedback there too!): https://www.producthunt.com/products/rusa

Let me know what OS you're testing on and what features (SSH tunneling, aggregation pipeline builder, schema analysis) would make this useful in your daily workflow!


r/mongodb • • 1d ago

My partial index was ignored because the query said $exists/$ne and the index said $gt "". Fixing that took it from 12s to 11ms.

1 Upvotes

Sharing because this cost me a deploy and the reason is easy to miss.

Setup: a collection with about 500k documents, 20 GB, growing 10 GB a month. One endpoint polls it all day: newest unclaimed request for a tenant. The query looked like this:

{ tenant, namespace, status: "New", "spec.curl": { $exists: true, $ne: "" } }

It had slowed to about 12 seconds.

Most documents in the collection are finished, so a normal index would mostly hold entries that never match. A partial index only indexes documents that match a condition, so I built one:

db.requests.createIndex(

{ tenant: 1, namespace: 1, status: 1 },

{ partialFilterExpression: { "spec.curl": { $gt: "" }, status: "New" } }

)

That covers a few thousand documents instead of 500k. Deployed it. Query still took 12 seconds.

`explain()` showed a COLLSCAN, so the index was not being used. The reason: MongoDB only uses a partial index when it can tell the query is a subset of the index condition. My query said `$exists: true, $ne: ""`. The index said `$gt: ""`. For string fields those match the same documents, but the planner does not reason that far. It wants the query to use a predicate it can match directly.

I changed the query to `"spec.curl": { $gt: "" }`. The index got used. 11 ms.

Second gotcha from the same week. Our app creates its indexes on startup and exits if an index with the same name exists with different options. One environment had an older version of this index (same name, partial filter was only `status: "New"`). The app crash-looped on deploy until that index was dropped. New rule for us: build the index in Atlas first with a rolling build, same name and options, wait for it to finish, then ship the code.

What I'd pass on:

- Write the query the same way as the partial filter. Same meaning is not enough.

- Run `explain("executionStats")` on the real query before you say the index is done.

- Partial indexes fit any "small active subset inside a big collection" pattern. Most queue-style collections are like that.

Does anyone have a check that catches "query does not match the partial filter" before deploy? Right now I catch it by reading the code.


r/mongodb • • 3d ago

mongoexport is great for one collection. What do you use for multi-collection or non-MongoDB exports?

3 Upvotes

I work on Dsync, a database migration tool, so weigh this accordingly.

mongoexport is a great tool for pulling one collection out to JSON or CSV. Two things I've wanted from it: the same kind of export from DynamoDB or Cosmos DB, and big exports that finish faster. What the MongoDB Database Tools docs say about its limits (mongoexport, mongodump):

  • mongoexport exports one collection per run (--collection is required) and has no parallel option. The only way the docs show to split an export is --sort with --skip and --limit, one command per piece. The usual workaround is parallel mongoexport processes, each with a --query on an _id range. The request for a multi-threaded mongoexport (TOOLS-248) was closed as Won't Fix.
  • JSON export is relaxed Extended JSON by default. Use --jsonFormat=canonical if you need every BSON type back.

If the data is only in MongoDB, a shell loop running mongoexport once per collection covers several collections.

For the other cases we added an open-source File connector to Dsync. It writes Dsync sources such as MongoDB and DynamoDB to CSV, one file per collection or table, and can load the files into another Dsync destination:

dsync --mode InitialSync --namespace "shop.orders,shop.customers" \
  mongodb://localhost:27017 file:///data/export

On speed: once a collection has about 100,000 documents (twice the --doc-partition default of 50,000), Dsync splits it into _id ranges and reads them in parallel. The connector still writes its files one batch at a time, and we haven't formally benchmarked it against mongoexport.

We reworked how it handles values in v0.31.0. A key that first appears in a later document becomes a new column. ObjectIDs are written as hex, dates as ISO 8601, nested documents and arrays as Extended JSON, and on reload _id and most types come back.

Disclaimer on current limits: CSV only, no field selection. A null, a missing field and an empty string all reload as missing. A top-level string of digits, such as an order number, comes back as a number unless you pass --infer-types=false (digit strings with a leading zero stay strings), and a string holding a JSON object or array comes back as an embedded document or array. The MongoDB source refuses a collection whose smallest and largest _id have different BSON types. An export overwrites an existing file for the same collection, and there's no CDC. For backups I'd still use mongodump.

Source (Go, AGPL, PRs welcome): https://github.com/adiom-data/dsync/tree/main/connectors/file


r/mongodb • • 3d ago

When would MongoDB make a sports booking app easier to build than MySQL?

1 Upvotes

Imagine a sports booking app where every facility has a name and location, but the details vary. A swimming pool lists lane count and water depth. A badminton court lists flooring and whether it’s indoors. Facilities keep adding new amenities and sports.

If you were building this, what would be easier to add or change with MongoDB than with a MySQL design built around fixed columns?

I’m trying to explain the practical difference in one sentence without using “NoSQL” or “schema flexibility”. How would you put it? If you’d choose MySQL anyway, I’d be curious what would tip the choice for you.


r/mongodb • • 4d ago

After months of job rejections, I spent 2 years building a MongoDB GUI. It just got added to Microsoft's Azure docs.

14 Upvotes

After struggling to land a job in 2024, when the market was pretty rough, I decided to take a different route and build something real. My goal was simple: either build something genuinely useful or gain more experience than anything else could offer.

Two years and countless 90-hour weeks later, VisuaLeaf is now featured in Microsoft's Azure DocumentDB documentation as a client for connecting to its MongoDB-compatible database service:

https://learn.microsoft.com/en-us/azure/documentdb/how-to-connect-visualeaf

It started as a MongoDB GUI, so posting this announcement really means a lot to me since this was the subreddit that started it all.

From the beginning, I wanted every part of the database workflow to feel as straightforward as possible, from exploring nested documents and building queries to database management and integrating AI. VisuaLeaf has evolved quite a bit since I first shared it here.

Today, VisuaLeaf supports MongoDB, Postgres, MySQL, SQLite, DuckDB, and 40+ more database engines.

What it does:

  • Table + tree views built for nested documents: Expand nested objects and arrays directly into columns within the table instead of having to deal with json in 1 cell, or having a separate embedded view dedicated for an array. Both views stay smooth even with massive collections.
  • Visual query builder + MongoDB shell: Build queries by clicking or dragging fields directly from the table and tree views, or write commands in the built-in MongoDB shell with real-time syntax error highlighting and intelligent autocomplete. Generated queries are readable and can be copied or executed.
  • Data transfers with transformations: Move data between databases (Postgres → MongoDB, SQLite → MongoDB, MongoDB → MongoDB), mask sensitive fields, apply custom JavaScript transformations, and enrich data with lookups from other collections.
  • Compare and sync: Compare collection structures and data, preview differences, and synchronize databases between environments, with dry-run support.
  • AI / MCP:  The MCP server is read-only by default. You can grant write access per connection, so an agent can run aggregations, data transfers, or anything else the app can do. There's also a built-in assistant for quick tasks, similar to Compass's.
  • Sharding and clusters: manage shards on any sharded cluster (shard-key advisor, chunks, zones, balancer, resharding), or deploy and run your own self-hosted replica set or sharded cluster on Docker or Kubernetes.
  • ERDs, charts, dashboards, mock data, index management, query profilers, and a lot more than I can fit into one post
  • Performance:  I've stress-tested datasets up to 1.6 GB, and the tree can expand thousands of rows at once. Existing grid libraries like AG-Grid couldn't support the nested column expansion I wanted, so I built my own grid from scratch, which took roughly a year to develop and optimize. (In my testing, VisuaLeaf also loaded data several seconds faster than nearly all MongoDB GUIs I’ve tested it against).

There's a free version that covers what most people need day to day:

https://visualeaf.com

I'd really appreciate feedback! And happy to answer any questions!

PS. VisuaLeaf is the only app that actually supports MongoDB Version 3.4 and newer versions of MongoDB in one app (from what I’ve seen). 


r/mongodb • • 4d ago

MongoDB Acquires Firebolt to Bring Lightning-Fast Real-Time Analytics Into Its Intelligent Data Platform

Thumbnail mongodb.com
28 Upvotes

what do you guys think? Analytics play beneficial here? Are they trying to infringe on Snowflake/Databrick's turf (since I know Databricks has bought Neon, a postgres company). AI narrative?


r/mongodb • • 4d ago

i m new to mongo db and have to upload this assignment now This assignment needs to be done in MongoDB using mongosh (MongoDB Shell) or MongoDB Compass

0 Upvotes

i want screenshots to upload Please 1. Q1

5 marks

Create the four collections (mentioned in Problem Statement) in MongoDB.\

For posts and comments, justify in one line each whether userId should be embedded (storing user details directly inside the document) or referenced (storing only the _id and looking it up separately), and implement the chosen design consistently across all four collections.\

Insert one sample document into each collection and display it with find() to confirm the structure before proceeding.

Drag & drop or click to browsePDF, ZIP, DOCX, PNG, JPG, DOC, TXT up to 25MB · max 1 fileQ2. Data Population

5 marks

Q2 Insert at least 6 users, 10 posts (across different users), 15 comments (across different posts) and 20 likes (across different posts/users), ensuring enough variety to support later aggregation (e.g., at least one user with multiple posts, at least one post with no comments).

Then perform: (a) find() with a filter (e.g., posts by one specific user), (b) updateOne() to edit a post's content, (c) deleteOne() to remove one comment, showing the collection state after each operation.

Drag & drop or click to browsePDF, DOCX, DOC, JPG, PNG, ZIP, TXT up to 25MB · max 1 file

Q3. Aggregation pipelines

5 marks

Write three aggregation pipelines using $match, $group and $sort: (a) total likes per post, sorted descending, (b) total posts per user, (c) average number of comments per post across the whole posts collection.

Use $lookup in at least one pipeline to join posts with users and display the user's name alongside their post's like count.

Drag & drop or click to browsePDF, ZIP, TXT, DOCX, PNG, DOC, JPG up to 25MB · max 1 file

4. Q4. Index

5 marks

Create a single-field index on posts.userId and a compound index on comments covering postId and createdAt.

Re-run one query from Q3 before and after creating the relevant index, and compare the output of explain("executionStats") (documents examined, execution time) for both runs.

Drag & drop or click to browsePDF, ZIP, TXT, DOCX, PNG, DOC, JPG up to 25MB · max 1 file

You can submit once. Make sure all files are added.

Submit

Give each image for each question seperate


r/mongodb • • 5d ago

Data migration

6 Upvotes

Hi,

We're using the Community Edition and want to migrate 20TB of data to a new cloud environment. Do you have any recommendations on the best approach, or any other advice you could share?


r/mongodb • • 8d ago

Does anyone actually use SQL with mongo?

4 Upvotes

I make a database app (https://beekeeperstudio.io), and we built our own SQL to mongo transpiler but frankly it's not as popular as I thought it would be.

I know mongo themselves have a SQL layer. Does anyone actually use it? If so, why use it over regular mongo queries?


r/mongodb • • 10d ago

i need help installing mongodb on my mac

Post image
2 Upvotes

i need to download it for an assignment but everytime i try to install it this happens can any one help


r/mongodb • • 10d ago

Giving an AI agent a throwaway copy of a MongoDB database, then reviewing what it changed

3 Upvotes

I maintain an open-source tool called Argon and wanted to share the workflow, since "how do I let an agent touch my data safely" comes up a lot.

The idea: instead of pointing an agent at the real database or an empty one, fork a sandbox from the real data. It is an ordinary MongoDB database with its own connection string and a TTL. Any driver works. Change streams record what the agent writes, so afterwards you get a diff and can merge it back or throw it away.

argon import database --uri "$MONGODB_URI" --database shop --project shop --source-quiesced
argon sandbox create -p shop --ttl 1h --watch --actor agent:run-1
# hand the printed connection string to the agent, then:
argon diff -p shop -b <sandbox>
argon merge preview -p shop -b <sandbox>     # or: argon sandbox discard

In a test run the script was asked to apply a 10% discount and also deleted a product. The diff showed two updates and one delete, the source database was unchanged, and I discarded the run.

Honest limits:

  • Needs a replica set (one node is fine), because it relies on change streams with pre- and post-images.
  • A sandbox is a full physical copy, so creation time and storage grow with the data.
  • A collection the agent creates needs changeStreamPreAndPostImages enabled before its first update, or that run's history is incomplete.
  • It is not an access-control boundary. Use a restricted MongoDB user.

MIT licensed, self-hosted: https://github.com/argon-lab/argon

Longer write-up on code sandboxes vs data sandboxes: https://argonlabs.tech/blog/code-sandbox-vs-data-sandbox-for-ai-agents

Curious how others handle this today. Dump and restore per run? A staging cluster?


r/mongodb • • 10d ago

Building a multi-platform gaming project (E-commerce + Community + Video) — Need stack & database feedback

2 Upvotes

Hey everyone,

I’m planning to build a multi-platform gaming project that includes:

  1. E-commerce store for gaming products, accessories, and merchandise
  2. Real-time community with posts, likes, comments, shares, images and videos
  3. Dedicated video section with playlists, individual video pages, and a main video feed
  4. Multi-language, multi-currency, and multi-payment support
  5. Everything working in real-time

My current preferred stack:

- Frontend: Next.js 15 + React + TypeScript + Tailwind + GSAP + Three.js

- Backend: Node.js + Express + Socket.io

- Database: MongoDB Atlas

- Cache / Real-time: Redis

- Media storage: Cloudflare R2 + CDN

Questions:

  1. Which database is better for a multi-platform gaming project like this — MongoDB, PostgreSQL, Cassandra, or something else?
  2. Is MongoDB a good primary choice for this mix of e-commerce + community + video features?
  3. Would you recommend adding PostgreSQL for orders and payments?
  4. Any better alternatives for real-time features or video handling?
  5. Overall architecture suggestions?

Would love honest feedback from people who have built similar multi-platform projects. Thanks!


r/mongodb • • 10d ago

MongoDB

1 Upvotes

I’m trying to aggregate collections from two different database and getsiblingdb is not working. The alternate I found if mongo script but I couldn’t export the result. Whats the real time solution


r/mongodb • • 11d ago

How WiredTiger cache dirty pages and eviction can throttle your MongoDB writes

Thumbnail shiftmag.dev
3 Upvotes

r/mongodb • • 12d ago

Why separating compute from storage matters: MongoDB Atlas Infinite under the hood

Thumbnail reddit.com
13 Upvotes

r/mongodb • • 12d ago

You can now use MongoDB as the persistent memory store for applications and agents built with the Vercel AI SDK.

Post image
3 Upvotes

r/mongodb • • 13d ago

Why is MongoDB so popular? What to choose bw MongoDB, Supabase, Firebase, Custom?

Thumbnail gallery
8 Upvotes

A lot of people seems to use MongoDB for Node backend and they made the full MERN abbreviation for that .why is that so.

Everyone on the social media says MERN,MERN,....

Why the hell is it???

Why only mongo everywhere.

Why people don't say much about the SUPABASE or the FIREBASE DB?

Whereas both other free versions have good reasoning limits for any projects

What to choose between the SupaBase, Mongo , Firebase or any other ? What's the real diff

Tell me why that's so.???

\[Note:- I don't want answers like It's relational, other is json.

I want someone's real experienced answers , why is it so,

Is this just hype or something else?\]


r/mongodb • • 12d ago

Is MongoDB still a great place to work in 2026?

0 Upvotes

For current and former MongoDB employees: How would you rate MongoDB as an employer in 2026? For engineers considering a move, MongoDB Interview Questions has read-write lock practice, and LandOffer can save repeat form filling across supported applications.

I’m particularly interested in:

  • Compensation, bonuses and RSU refreshers
  • Work-life balance and workload
  • Management and company culture
  • Job security, layoffs and PIP pressure
  • Career growth and promotion opportunities
  • Engineering culture and technical innovation
  • Remote work and flexibility

How has the company changed over the past few years? Would you recommend joining MongoDB today?

Would appreciate honest feedback across different roles and regions.


r/mongodb • • 14d ago

Good experiences with mongodb in real products?

26 Upvotes

I'm working in a startup born just months ago and I was suggested to use mongodb and I think I'm doing a good work at keeping things "clean" and well structured but by searching online I see ONLY critics about mongodb and I'm worried that I'll find myself struggling in the future while the project grows in features.

I'm searching for experiences of people that are using mongodb with real products and are actually happy of using it.

Just for context: the startup is about creating a management software for farms, with the idea of growing in compatibility with existing products (hardware and software)


r/mongodb • • 14d ago

Now available: convert MongoDB to PostgreSQL on Layerbase

Thumbnail layerbase.com
6 Upvotes

We built a tool to convert MongoDB to Postgres while mapping relational data.

Right now the tool requires a plan on Layerbase (which essentially means that it will cost $5 to use) but we have plans to open source the tool once we decouple it from our infrastructure.

We also have MongoDB to MySQL/MariaDB/libSQL/SQLite all planned for the near-future.

If anyone wants to try this for free, I've been authorized to give out a few 100% off coupon codes this weekend so feel free to DM me about it.


r/mongodb • • 14d ago

Using TTL deletes as wakeup signals for delayed jobs. What failure cases would you test?

1 Upvotes

I’m working on MongoSnooze, a small Node.js scheduler for jobs that can tolerate some lateness. It keeps the durable job record in one collection and a disposable TTL wakeup in another. The worker listens for deletes on the wakeup collection, then claims the job from the durable collection. If it misses the event, a periodic sweep can still find the due job.

I’m interested in what happens on a real replica set during worker downtime or a primary failover. If you’ve operated a change-stream consumer, which failure case would you test first? I’m especially curious whether expired resume tokens or bursts of TTL deletes caused surprises in practice.

I’m the maintainer. The architecture and tradeoffs are here.


r/mongodb • • 15d ago

Now Generally Available: MongoDB Memory + Google ADK!

Thumbnail reddit.com
7 Upvotes

r/mongodb • • 16d ago

Mongo: One write, two logs

Thumbnail shiftmag.dev
4 Upvotes

I picked up Mongo for longer than a year now and the helpful thing was correlating internal workings with something I'm familiar with, PostgreSQL.

Here's the first post from my journey talking about how a write get's persisted and replicated.

Would like to hear comments, and helpful tips from your journeys.