Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add database indexes to Task and User models ⚡

Closed Beginner friendly
#584 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Mario-Mohar is already working on this.

Since Oct 9, 2026.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, mongodb
Domain
databases

Research direction

Start with the schema definitions in server/models/Task.js and server/models/User.js, then check how the listed fields are queried and whether existing data could conflict with a unique email index. Run the relevant server tests or checks after making the change; done means the requested indexes are defined and those checks pass.

Written by the indexing model from the issue text.

Description

good first issue

Add database indexes to Task and User models ⚡

File: server/models/Task.js + server/models/User.js

No indexes on frequently queried fields 💀
With 10000 tasks queries get very slow fr!!

Fix: add indexes to Task model:
// at bottom of taskSchema definition:
taskSchema.index({ status: 1 })
taskSchema.index({ assignee: 1 })
taskSchema.index({ priority: 1 })
taskSchema.index({ createdAt: -1 })
taskSchema.index({ title: 'text',
description: 'text' }) // full text search!

// in User model:
userSchema.index({ email: 1 }, { unique: true })

~6 lines across 2 files!
Makes DB queries 10x faster!! 🔥
No frontend changes needed 🎯

Dominant language
JavaScript
Stars
39
Forks
105
Avg merge
1d 18h
Merged PRs (30d)
31

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anoopcodehack/DevBoard

All issues in anoopcodehack/DevBoard

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.