{"id":43385780,"url":"https://github.com/contentstack/datasync-content-store-mongodb","last_synced_at":"2026-04-06T11:02:42.092Z","repository":{"id":57103811,"uuid":"163371370","full_name":"contentstack/datasync-content-store-mongodb","owner":"contentstack","description":"The module that stores your content in a MongoDB database after it is fetched from the Contentstack server.","archived":false,"fork":false,"pushed_at":"2026-03-03T08:05:21.000Z","size":661,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":16,"default_branch":"master","last_synced_at":"2026-03-03T11:49:53.722Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/contentstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","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":"2018-12-28T05:51:29.000Z","updated_at":"2026-03-03T08:05:27.000Z","dependencies_parsed_at":"2023-10-11T12:38:49.201Z","dependency_job_id":"ee9dc241-29fe-439b-ad61-ea0d41a17817","html_url":"https://github.com/contentstack/datasync-content-store-mongodb","commit_stats":{"total_commits":89,"total_committers":8,"mean_commits":11.125,"dds":0.4382022471910112,"last_synced_commit":"7d75de362e227cb539dfab02b4c8baca6622090e"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/contentstack/datasync-content-store-mongodb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentstack%2Fdatasync-content-store-mongodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentstack%2Fdatasync-content-store-mongodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentstack%2Fdatasync-content-store-mongodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentstack%2Fdatasync-content-store-mongodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/contentstack","download_url":"https://codeload.github.com/contentstack/datasync-content-store-mongodb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentstack%2Fdatasync-content-store-mongodb/sbom","scorecard":{"id":303471,"data":{"date":"2025-08-11","repo":{"name":"github.com/contentstack/datasync-content-store-mongodb","commit":"b1f107fda6deb55802f514fe2d1cdcf522c53c3b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.4,"checks":[{"name":"Code-Review","score":4,"reason":"Found 8/20 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:24","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:25","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/issues-jira.yml:1","Warn: no topLevel permission defined: .github/workflows/policy-scan.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/sca-scan.yml:1","Warn: no topLevel permission defined: .github/workflows/secrets-scan.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/datasync-content-store-mongodb/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/datasync-content-store-mongodb/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/datasync-content-store-mongodb/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/datasync-content-store-mongodb/codeql-analysis.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/issues-jira.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/datasync-content-store-mongodb/issues-jira.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/issues-jira.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/datasync-content-store-mongodb/issues-jira.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/policy-scan.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/datasync-content-store-mongodb/policy-scan.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/policy-scan.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/datasync-content-store-mongodb/policy-scan.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/datasync-content-store-mongodb/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/datasync-content-store-mongodb/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/datasync-content-store-mongodb/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/sca-scan.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/datasync-content-store-mongodb/sca-scan.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/sca-scan.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/datasync-content-store-mongodb/sca-scan.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/secrets-scan.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/datasync-content-store-mongodb/secrets-scan.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/release.yml:15","Warn: downloadThenRun not pinned by hash: .github/workflows/secrets-scan.yml:29","Info:   0 out of  10 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":10,"reason":"SAST tool detected","details":["Info: SAST configuration detected: CodeQL","Info: SAST configuration detected: Snyk","Info: all commits (18) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T21:21:58.819Z","repository_id":57103811,"created_at":"2025-08-17T21:21:58.819Z","updated_at":"2025-08-17T21:21:58.819Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31469744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T08:36:52.050Z","status":"ssl_error","status_checked_at":"2026-04-06T08:36:51.267Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-02-02T10:45:52.713Z","updated_at":"2026-04-06T11:02:42.086Z","avatar_url":"https://github.com/contentstack.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![Contentstack](https://www.contentstack.com/docs/static/images/contentstack.png)](https://www.contentstack.com/)\n\nContentstack is a headless CMS with an API-first approach. It is a CMS that developers can use to build powerful cross-platform applications in their favorite languages. Build your application frontend, and Contentstack will take care of the rest. [Read More](https://www.contentstack.com/).\n\n\n## Contentstack DataSync Content Store MongoDB\n\nContentstack DataSync lets you sync your Contentstack data with your database, enabling you to save data locally and serve content directly from your database. It is a combination of four powerful modules that is [DataSync Webhook Listener](https://github.com/contentstack/webhook-listener), [DataSync Manager](https://github.com/contentstack/datasync-manager), [DataSync Asset Store Filesystem](https://github.com/contentstack/datasync-asset-store-filesystem), DataSync Content Store — [Filesystem](https://github.com/contentstack/datasync-content-store-filesystem) and [MongoDB](https://github.com/contentstack/datasync-content-store-mongodb).\n\nThe Cotentstack MongoDB Content Store is part of Contentstack DataSync's content storage drivers and is used to store data in the MongoDB database. Any publish, unpublish, or delete action performed on content will be tracked by the  Webhook Listener and the relevant content will be synced accordingly in your MongoDB database.\n\n###  Prerequisite\n\n- Nodejs v20 or above\n- Mongodb v3.6 or above\n\n### Usage\n\nThis is how the datasync-content-store-filesystem is defined in the boilerplate:\n\n```js\nconst assetStore = require('@contentstack/datasync-asset-store-filesystem')\nconst contentStore = require('@contentstack/datasync-content-store-mongodb')\nconst listener = require('@contentstack/webhook-listener')\nconst syncManager = require('@contentstack/datasync-manager')\nconst config = require('./config')\n\nsyncManager.setAssetStore(assetStore)\nsyncManager.setContentStore(contentStore)// Sets required asset store to sync manager.\nsyncManager.setListener(listener)\nsyncManager.setConfig(config)\n\nsyncManager.start()\n.then(() =\u003e {\n\tconsole.log('Contentstack sync started successfully!')\n})\n.catch(console.error)\n```\n\n### Configuration\nHere is the config table for the module:\n\n|Property|Data Type|Default value|Description|\n|--|--|--|--|\n|dbName|string|contentstack-persistent-db|**Optional.** The MongoDB database name|\n|collectionName|string|contents|**Optional.** MongoDB database's collection name|\n|uri|string|mongodb://localhost:27017 |**Optional.** The MongoDB connection URI|\n| indexes | object |**[see config below](https://github.com/contentstack/datasync-content-store-mongodb#detailed-configs)** |**Optional.** Option to create db indexes via configuration|\n|unwantedKeys|object|**[see config below](https://github.com/contentstack/datasync-content-store-mongodb#detailed-configs)** |**Optional.** Keys to be removed, while data is being inserted|\n|options|object|**[see config below](https://github.com/contentstack/datasync-content-store-mongodb#detailed-configs)** |**Optional.** The MongoDB connection options|\n\n### Detailed configs\n\nBy default, this module uses the following internal configuration.\n\n```js\n{\n  dbName: 'contentstack-persistent-db',\n  collectionName: 'contents',\n  uri: 'mongodb://localhost:27017',\n  indexes: {\n    published_at: -1,\n    content_type_uid: 1,\n    locale: 1,\n    uid: 1\n  },\n  unwantedKeys: {\n    asset: {\n      action: true,\n      checkpoint: true,\n      'data.created_by': true,\n      event_at: true,\n      type: true,\n      'data.updated_by': true\n    },\n    contentType: {\n      'data.created_by': true,\n      'data.updated_by': true,\n      'data.DEFAULT_ACL': true,\n      'data.SYS_ACL': true,\n      'data.abilities': true,\n      'data.last_activity': true\n    },\n    entry: {\n      action: true,\n      checkpoint: true,\n      'data.created_by': true,\n      event_at: true,\n      type: true,\n      'data.updated_by': true\n    }\n  },\n  options: {\n    autoReconnect: true,\n    connectTimeoutMS: 15000,\n    keepAlive: true,\n    noDelay: true,\n    reconnectInterval: 1000,\n    reconnectTries: 20,\n    useNewUrlParser: true,\n  },\n}\n```\n\n### Further Reading\n\n- [Getting started with Contentstack DataSync](https://www.contentstack.com/docs/guide/synchronization/contentstack-datasync)    \n- [Contentstack DataSync](https://www.contentstack.com/docs/guide/synchronization/contentstack-datasync/configuration-files-for-contentstack-datasync) doc lists the configuration for different modules\n\n### Support and Feature requests\n\nIf you have any issues working with the library, please file an issue [here](https://github.com/contentstack/datasync-content-store-mongodb/issues) at Github.\n\nYou can send us an e-mail at [support@contentstack.com](mailto:support@contentstack.com) if you have any support or feature requests. Our support team is available 24/7 on the intercom. You can always get in touch and give us an opportunity to serve you better!\n\n### License\n\nThis repository is published under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontentstack%2Fdatasync-content-store-mongodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontentstack%2Fdatasync-content-store-mongodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontentstack%2Fdatasync-content-store-mongodb/lists"}