{"id":15555030,"url":"https://github.com/davinci2015/mongoose-seedr","last_synced_at":"2026-04-11T19:35:37.640Z","repository":{"id":57302251,"uuid":"103122664","full_name":"davinci2015/mongoose-seedr","owner":"davinci2015","description":"Seed MongoDB with fake data","archived":false,"fork":false,"pushed_at":"2018-05-04T18:22:30.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-13T03:36:16.665Z","etag":null,"topics":["database","mongo","mongodb","mongoose","node","nodejs","seed","seeder"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davinci2015.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-11T10:30:29.000Z","updated_at":"2018-09-26T14:09:52.000Z","dependencies_parsed_at":"2022-09-14T22:54:41.509Z","dependency_job_id":null,"html_url":"https://github.com/davinci2015/mongoose-seedr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davinci2015/mongoose-seedr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davinci2015%2Fmongoose-seedr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davinci2015%2Fmongoose-seedr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davinci2015%2Fmongoose-seedr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davinci2015%2Fmongoose-seedr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davinci2015","download_url":"https://codeload.github.com/davinci2015/mongoose-seedr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davinci2015%2Fmongoose-seedr/sbom","scorecard":{"id":327902,"data":{"date":"2025-08-11","repo":{"name":"github.com/davinci2015/mongoose-seedr","commit":"130841e61ebe804d25d0c020b6108f29017a5150"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.3,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","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":"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":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"Vulnerabilities","score":0,"reason":"24 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-4jwp-vfvf-657p","Warn: Project is vulnerable to: GHSA-v8w9-2789-6hhr","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-mh5c-679w-hh4r","Warn: Project is vulnerable to: GHSA-8687-vv9j-hgph","Warn: Project is vulnerable to: GHSA-f825-f98c-gj3g","Warn: Project is vulnerable to: GHSA-h8hf-x3f4-xwgp","Warn: Project is vulnerable to: GHSA-9m93-w8w6-76hh","Warn: Project is vulnerable to: GHSA-m7xq-9374-9rvx","Warn: Project is vulnerable to: GHSA-vg7j-7cwx-8wgw","Warn: Project is vulnerable to: GHSA-h466-j336-74wx","Warn: Project is vulnerable to: GHSA-p92x-r36w-9395","Warn: Project is vulnerable to: GHSA-45q2-34rf-mr94","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-8462-q7x7-g2x4","Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm"],"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-18T02:55:23.400Z","repository_id":57302251,"created_at":"2025-08-18T02:55:23.400Z","updated_at":"2025-08-18T02:55:23.400Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31693272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["database","mongo","mongodb","mongoose","node","nodejs","seed","seeder"],"created_at":"2024-10-02T15:05:58.479Z","updated_at":"2026-04-11T19:35:37.619Z","avatar_url":"https://github.com/davinci2015.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mongoose-seedr\n\n_mongoose-seedr_ lets you seed your database with fake data. \u003cbr\u003e\nIn case when you need to insert data into a database that is linked to another data you can easily set references and it will automatically connect collections and populate database. This way, we don't have to manually link them together.\n\n## Installation\n```\n$ npm install mongoose-seedr --save-dev\n```\n\n## Usage example\n\n```js\n// seedDatabase.js\nconst seedr = require('mongoose-seedr');\nconst path = require('path');\n\nseedr.seed({\n    databaseURL: 'mongodb://localhost:27017/seed-test',\n    seed: [\n        {\n            documents: path.join(__dirname, 'users.js'),\n            collection: 'users'\n        },\n        {\n            documents: path.join(__dirname, 'pets.js'),\n            collection: 'pets'\n        }\n    ]\n});\n\n```\nRun script and _voila_, you seeded your database.\n```\n$ node seedDatabase.js\n```\n\n### Fake data example\n`users.js` and `pets.js` are _JS_ files with fake data that will be inserted into database. \u003cbr\u003e\n\n**users.js** \u003cbr\u003e\n```js\nmodule.exports = [\n    {\n        firstName: 'Terrence',\n        lastName: 'Hudnall',\n        pets: [\n            'ref:pets._id',\n            'ref:pets._id'\n        ]\n    },\n    {\n        firstName: 'Jordan',\n        lastName: 'Kelly',\n        pets: [\n            {\n                size: 'ref:pets.size',\n                name: 'ref:pets.name'\n            }\n        ]\n    }\n]\n```\n\n**pets.js** \u003cbr\u003e\n```js\nmodule.exports = [\n    {\n        name: 'Nacho',\n        size: 'small'\n    },\n    {\n        name: 'Pepper',\n        size: 'big'\n    }\n]\n```\n\nAs we can see in the previous example, `users.js` file holds the list of users. An user have _pets_ array that have references to documents in _pets_ collection. \u003cbr\u003e\nIn this case, we're using `ref:` followed by collection name and property that we want to get from document in another collection. _mongoose-seedr_ will pick random document from that collection and pull out property that you've specified. \u003cbr\u003e\n\n### Configuration\nConfiguration object that you pass into the _seed_ method: \u003cbr\u003e\n\n| Prop name  | Description | Type | Default | Required |\n| ---------- | ----------- | :--: | :-----: | :------: |\n| `databaseURL` | url to database | `String` | - | `true`\n| `seed` | array of seed objects | `Array` | - | `true`\n| `seed[].documents` | File path to the _JS_ file that contains fake documents | `String` | - | `true`\n| `seed[].collection` | Name of a collection that will be inserted into a database | `String` | - | `true`\n| `dropDatabase` | Defines if script should drop a database before inserting a fake data | `Boolean` | `true` | `false`\n| `referenceKey` | Prefix key which you're using to link documents between collections | `String` | `\"ref:\"` | `false`\n\n## Contributors\n\n- Danijel Vincijanović (Author) [\u003cdanijel.vincijanovic@gmail.com\u003e]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavinci2015%2Fmongoose-seedr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavinci2015%2Fmongoose-seedr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavinci2015%2Fmongoose-seedr/lists"}