{"id":39456565,"url":"https://github.com/zakodium/adonis-mongodb","last_synced_at":"2026-01-18T04:36:41.145Z","repository":{"id":36464320,"uuid":"225640228","full_name":"zakodium/adonis-mongodb","owner":"zakodium","description":"MongoDB provider for AdonisJS 5","archived":false,"fork":false,"pushed_at":"2025-01-15T14:16:59.000Z","size":884,"stargazers_count":65,"open_issues_count":28,"forks_count":11,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-20T10:41:48.762Z","etag":null,"topics":["adonisjs","mongodb","provider"],"latest_commit_sha":null,"homepage":"https://zakodium.github.io/adonis-mongodb/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zakodium.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-12-03T14:30:03.000Z","updated_at":"2025-06-01T13:48:33.000Z","dependencies_parsed_at":"2024-05-06T07:26:03.258Z","dependency_job_id":"da721932-7e44-4827-9eb8-df5ac4fbc64f","html_url":"https://github.com/zakodium/adonis-mongodb","commit_stats":null,"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"purl":"pkg:github/zakodium/adonis-mongodb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakodium%2Fadonis-mongodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakodium%2Fadonis-mongodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakodium%2Fadonis-mongodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakodium%2Fadonis-mongodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zakodium","download_url":"https://codeload.github.com/zakodium/adonis-mongodb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakodium%2Fadonis-mongodb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28529871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adonisjs","mongodb","provider"],"created_at":"2026-01-18T04:36:41.075Z","updated_at":"2026-01-18T04:36:41.128Z","avatar_url":"https://github.com/zakodium.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Adonis MongoDB\n\nMongoDB provider for AdonisJS 5.\n\n\u003ch3 align=\"center\"\u003e\n\n  \u003ca href=\"https://www.zakodium.com\"\u003e\n    \u003cimg src=\"https://www.zakodium.com/brand/zakodium-logo-white.svg\" width=\"50\" alt=\"Zakodium logo\" /\u003e\n  \u003c/a\u003e\n\n  \u003cp\u003e\n    Maintained by \u003ca href=\"https://www.zakodium.com\"\u003eZakodium\u003c/a\u003e\n  \u003c/p\u003e\n\n[![NPM version][npm-image]][npm-url]\n[![build status][ci-image]][ci-url]\n[![Test coverage][codecov-image]][codecov-url]\n[![npm download][download-image]][download-url]\n\n| :warning: This module is unstable and in active development. Use at your own risk. |\n| ---------------------------------------------------------------------------------- |\n\n\u003c/h3\u003e\n\n## Prerequisites\n\nThis provider requires AdonisJS v5 and won't work with AdonisJS v4.\n\nWe recommend using MongoDB \u003e=5.0. Earlier versions are not tested.\n\n## Installation\n\n```console\nnpm i @zakodium/adonis-mongodb\nnode ace configure @zakodium/adonis-mongodb\n```\n\n## Documentation\n\n### Using with the authentication provider\n\nAdonis MongoDB can be used to authenticate users with the `@adonisjs/auth` addon.\nTo enable it, edit the following files:\n\n#### `contracts/auth.ts`\n\nExample of a configuration with the session guard:\n\n```ts\nimport {\n  MongodbModelAuthProviderContract,\n  MongodbModelAuthProviderConfig,\n} from '@ioc:Zakodium/Mongodb/Odm';\n\nimport User from 'App/Models/User';\n\ndeclare module '@ioc:Adonis/Addons/Auth' {\n  interface ProvidersList {\n    user: {\n      implementation: MongodbModelAuthProviderContract\u003ctypeof User\u003e;\n      config: MongodbModelAuthProviderConfig\u003ctypeof User\u003e;\n    };\n  }\n\n  interface GuardsList {\n    web: {\n      implementation: SessionGuardContract\u003c'user', 'web'\u003e;\n      config: SessionGuardConfig\u003c'user'\u003e;\n    };\n  }\n}\n```\n\n#### `config/auth.ts`\n\n```ts\nimport { AuthConfig } from '@ioc:Adonis/Addons/Auth';\n\nconst authConfig: AuthConfig = {\n  guard: 'web',\n  guards: {\n    web: {\n      driver: 'session',\n      provider: {\n        driver: 'mongodb-model',\n      },\n    },\n  },\n};\n\nexport default authConfig;\n```\n\n## Development\n\nTo run tests locally:\n\n```bash\ndocker compose up -d\nnode reset-dev.mjs\nnpm test\ndocker compose down\n```\n\n## License\n\n[MIT](./LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/@zakodium/adonis-mongodb.svg\n[npm-url]: https://www.npmjs.com/package/@zakodium/adonis-mongodb\n[ci-image]: https://github.com/zakodium/adonis-mongodb/workflows/Node.js%20CI/badge.svg?branch=main\n[ci-url]: https://github.com/zakodium/adonis-mongodb/actions?query=workflow%3A%22Node.js+CI%22\n[codecov-image]: https://img.shields.io/codecov/c/github/zakodium/adonis-mongodb.svg\n[codecov-url]: https://codecov.io/gh/zakodium/adonis-mongodb\n[download-image]: https://img.shields.io/npm/dm/@zakodium/adonis-mongodb.svg\n[download-url]: https://www.npmjs.com/package/@zakodium/adonis-mongodb\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzakodium%2Fadonis-mongodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzakodium%2Fadonis-mongodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzakodium%2Fadonis-mongodb/lists"}