r/mongodb • u/Fun-Chicken6946 • 16h ago
A new way to practice MongoDB online for free: LeetCode-style problems with hidden test cases
Hi everyone! I've spent months building a free website for practicing MongoDB, and I wanted to share it with the community.
One thing I noticed when learning MongoDB was that there weren't many places where you could actually practice writing queries and have your solutions tested, similar to how LeetCode works. So I decided to build one. As far as I know, it's the first of its kind.
Most MongoDB practice sites just parse your query or compare it to a fixed answer. This one runs a real MongoDB-compatible database right in your browser, so you can do what you'd do in a real shell: create collections, insert and update documents, build indexes, run aggregation pipelines and check explain plans. Your code is executed and validated against hidden test cases.
What you can do:
- Practice MongoDB directly in your browser, with no install and no sign-up.
- Write real find, aggregate, and createIndex code with mongosh syntax. (even $search)
- Work through 30 MongoDB interview questions, from Medium to Expert: joins, grouping, arrays, schema drift, geo queries and window functions.
- Test your solutions against multiple hidden datasets, so queries that only work on the sample data get caught.
- Practice query optimization, with performance questions graded on your explain plan.
All the problems and their solutions have been verified against MongoDB 8.
Getting all of this to run entirely in your browser, with no server behind it, took months of work, and your queries never leave your machine.
It's completely free, and I'd love to hear what you think, especially if there are MongoDB concepts or challenges you'd like me to add.