🏠 Home / Hub

MongoDB

Complete Developer Course

A comprehensive guide to MongoDB — from your first document to building production-ready REST APIs with Mongoose and JWT authentication. 8 lessons covering everything a modern developer needs.

NoSQL Documents Aggregation Indexes Mongoose Express.js JWT Auth REST API

Course Lessons

LESSON 01
Intro & Setup
Get started with MongoDB. Understand the document model, install MongoDB, connect with mongosh, and insert your first documents.
NoSQL vs SQL BSON Types mongosh Atlas Cloud
LESSON 02
CRUD Operations
Master all create, read, update, and delete operations. Covers cursor methods, update operators, upserts, and atomic operations.
insertOne/Many find & sort $set $inc $push upsert
LESSON 03
Schema Design
Learn the most important skill in MongoDB: when to embed vs reference. Real examples for blog, e-commerce, and social platforms.
Embedding Referencing 1:1 1:Many M:N $jsonSchema
LESSON 04
Query Operators
Deep dive into MongoDB's rich query language. Comparison, logical, element, array, and evaluation operators with real examples.
$gt $in $or $regex $text $elemMatch Projection
LESSON 05
Aggregation Pipeline
MongoDB's most powerful feature. Build complex data transformations with $match, $group, $lookup, $unwind, and $facet.
$match $group $lookup JOIN $unwind $facet
LESSON 06
Indexes & Performance
Make your queries fast. Understand COLLSCAN vs IXSCAN, use explain(), build compound indexes with ESR, and choose the right index type.
explain() ESR Rule TTL Index Partial Index
LESSON 07
Mongoose ODM
Use Mongoose with Node.js for schemas, validation, middleware hooks, virtuals, and populate. Everything you need for production Node.js apps.
Schema Types Middleware Virtuals Populate
LESSON 08
REST API Project
Build a complete Blog API with Express + Mongoose. User auth with JWT, protected routes, pagination, and full CRUD. Real production code.
Express.js JWT Auth bcrypt Pagination

Quick Reference

Core mongosh Commands

CommandDescription
show dbsList all databases
use mydbSwitch to database
show collectionsList collections
db.col.insertOne({})Insert one document
db.col.find({}).sort().limit()Query with cursor methods
db.col.updateOne({}, {$set:{}})Update first match
db.col.deleteMany({})Delete all matches
db.col.aggregate([])Run aggregation pipeline
db.col.createIndex({field:1})Create an index
db.col.find({}).explain("executionStats")Analyze query performance

Update Operators Quick Reference

OperatorUse
$setSet a field value
$unsetRemove a field
$incIncrement a number
$pushAdd to array
$pullRemove from array
$addToSetAdd to array (no duplicates)
$renameRename a field
$currentDateSet to current date

Aggregation Stages Quick Reference

StageSQL EquivalentPurpose
$matchWHEREFilter documents
$groupGROUP BYGroup & aggregate
$projectSELECTShape output fields
$sortORDER BYSort documents
$limitLIMITCap output count
$lookupJOINJoin collections
$unwindflattenExpand arrays
$facetmulti-queryMultiple pipelines at once
Ready to start? Open Lesson 1 — Intro & Setup and follow the lessons in order. Each lesson builds on the previous ones. By Lesson 8 you will have a working REST API with JWT authentication.
MongoDB Developer Course — 8 Lessons — From Beginner to Production API

📌 Study Checklist