A simple task manager built with Node.js, Express, and the MongoDB Node driver. No Mongoose, no frontend framework, just a clean API and a lightweight vanilla JS UI.
- Basic CRUD API for tasks
- Tasks have categories: Work, Personal, Study, Other
- Filter tasks by category
- Simple frontend served from the same app
- Input validation and basic security (helmet, size limits)
- Indexed category field for faster queries
- Graceful startup/shutdown handling
- Tests using Node's built-in test runner
git clone https://github.com/<your-username>/task-manager-with-categories.git
cd task-manager-with-categories
npm install
cp .env.example .env
# add your MongoDB connection string
npm run devMONGO_URI(required) – your MongoDB connection stringDB_NAME(optional) – defaults totaskmanagerPORT(optional) – defaults to3000
GET /tasks– list tasksGET /tasks?category=Work– filter by categoryPOST /tasks– createPUT /tasks/:id– updateDELETE /tasks/:id– delete
Errors return:
{ "error": "message" }npm testThis is meant to be simple and production-ready enough to build on. If you're deploying it for real use, you'll probably want to add auth, rate limiting, and stricter security headers.