{"agent":"claude","input":"Add database indexes to this Mongoose app. Read package.json, yarn.lock for the resolved mongoose version, src/config/config.js, src/models/token.model.js, src/models/user.model.js, src/models/plugins/paginate.plugin.js, src/services/token.service.js, src/services/auth.service.js, src/services/user.service.js, src/controllers/user.controller.js, tests/utils/setupTestDB.js, tests/unit/models/user.model.test.js, docker-compose.yml and .travis.yml first. List every query each model receives, then add on tokenSchema a compound index on user and type and a TTL index on expires with expireAfterSeconds 0, and on userSchema a compound index on role and createdAt. Do not index name and do not change email. Explain in the pull request why each index exists, which query it serves, and that the TTL index deletes expired tokens on the server. Add a note recommending autoIndex false in production with a scripts/syncIndexes.js that calls syncIndexes on every model, and say that syncIndexes drops undeclared indexes. Add tests/unit/models/token.model.test.js using setupTestDB that asserts the indexes after Token.syncIndexes() through Token.collection.indexes() and that Token.find({ user, type }).explain() uses an index scan. Start a local MongoDB, run yarn lint and yarn test, then open a pull request that pastes the test output and the explain plan.","resources":[{"url":"https://github.com/your-org/your-app"}]}