mongodb
Use when working with MongoDB — document modeling, queries, aggregation pipelines, Atlas setup, or Mongoose ODM. Also use when deciding between MongoDB and relational databases or debugging MongoDB-specific issues.
| Model | Source |
|---|---|
| sonnet | pack: database |
Full Reference
┏━ 🔧 mongodb ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Use when working with MongoDB — document model… ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
MongoDB
Section titled “MongoDB”your friendly armadillo is here to serve you
Quick Reference
Section titled “Quick Reference”| Item | Value |
|---|---|
| Current server | MongoDB 8.2 |
| Node.js driver | v7.x (npm i mongodb) |
| Mongoose ODM | v9.x (npm i mongoose) |
| Atlas connection | mongodb+srv://<user>:<pass>@<cluster>.mongodb.net/<db> |
| Default port | 27017 |
Atlas Tiers (as of Feb 2026)
Section titled “Atlas Tiers (as of Feb 2026)”| Tier | Cost | Storage | Ops/sec |
|---|---|---|---|
| Free (M0) | $0 | 512 MB | shared |
| Flex | $8–$30/mo | 5 GB base | 100–500 |
| Dedicated (M10+) | $57+/mo | custom | custom |
Serverless and M2/M5 tiers are deprecated — all migrated to Flex as of mid-2025.
Reference
Section titled “Reference”Load the file that matches the task:
| I want to… | File |
|---|---|
| Create Atlas cluster, network access, users, connection string, pricing | reference/atlas-setup.md |
| Install driver or Mongoose, connection caching, v7/v9 breaking changes | reference/client-setup.md |
| Embed vs reference, schema patterns, 16 MB limit | reference/document-modeling.md |
| insertOne/Many, find, update operators, delete, query operators, error codes | reference/crud-operations.md |
| Pipeline stages, $lookup joins, $facet, time-series | reference/aggregation-pipeline.md |
| Index types, compound ESR rule, explain plans | reference/indexing.md |
| Schema+model, virtuals, hooks, populate, lean queries | reference/mongoose-odm.md |
| Serverless connection pooling, maxPoolSize, cold starts, NoSQL injection, TLS, encryption | reference/serverless-and-security.md |
Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.