Notes App with Search

A notes app is useful for practicing search, pagination, and private data.

Features

API example

GET /api/notes?search=mongodb&tag=backend&page=1&limit=20&sort=-updatedAt

MongoDB query idea

const filter = {
  userId: req.user.id,
}

if (search) {
  filter.title = { $regex: search, $options: 'i' }
}

if (tag) {
  filter.tags = tag
}

Important backend rules

What this project proves