{"id":13990814,"url":"https://github.com/plexinc/papr","last_synced_at":"2025-05-14T12:12:02.573Z","repository":{"id":36963499,"uuid":"366057712","full_name":"plexinc/papr","owner":"plexinc","description":"MongoDB TypeScript-aware Models","archived":false,"fork":false,"pushed_at":"2025-04-22T08:50:39.000Z","size":7170,"stargazers_count":472,"open_issues_count":26,"forks_count":22,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-05-13T12:57:51.703Z","etag":null,"topics":["json-schema","mongodb","schema","typescript","validation"],"latest_commit_sha":null,"homepage":"https://plexinc.github.io/papr/","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/plexinc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2021-05-10T13:46:15.000Z","updated_at":"2025-05-12T18:41:21.000Z","dependencies_parsed_at":"2023-12-12T12:26:28.736Z","dependency_job_id":"9259bea4-8345-481d-8bba-bb4fa115f299","html_url":"https://github.com/plexinc/papr","commit_stats":{"total_commits":829,"total_committers":23,"mean_commits":36.04347826086956,"dds":0.3835946924004825,"last_synced_commit":"fa2e45da060c94d75ff57c630a96a99b7be104b7"},"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plexinc%2Fpapr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plexinc%2Fpapr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plexinc%2Fpapr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plexinc%2Fpapr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plexinc","download_url":"https://codeload.github.com/plexinc/papr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253948433,"owners_count":21988957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["json-schema","mongodb","schema","typescript","validation"],"created_at":"2024-08-09T13:03:17.852Z","updated_at":"2025-05-14T12:12:02.546Z","avatar_url":"https://github.com/plexinc.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Papr\n\n\u003cdiv align=\"center\"\u003e\n\t\u003cimg alt=\"Papr\" height=\"125\" src=\"docs/logo.webp\" width=\"98\" /\u003e\n\u003c/div\u003e\n\n---\n\n- TypeScript-safe schemas\n- JSON Schema MongoDB validation\n- :tada: Lightweight library\n- :rocket: Blazing fast\n\n---\n\n[![Github Actions](https://github.com/plexinc/papr/actions/workflows/ci.yaml/badge.svg)](https://github.com/plexinc/papr/actions)\n[![NPM version](https://img.shields.io/npm/v/papr.svg?style=flat)](https://www.npmjs.com/package/papr)\n[![Install size](https://packagephobia.now.sh/badge?p=papr)](https://packagephobia.now.sh/result?p=papr)\n\n`papr` is a lightweight library built around the MongoDB NodeJS driver, written in TypeScript.\n\n`papr` uses MongoDB's [JSON Schema validation](https://docs.mongodb.com/manual/core/schema-validation/#json-schema) feature to enable validation of document writes at runtime (requires MongoDB 3.6+).\n\n`papr` has a familiar API - if you have used the raw `mongodb` methods to query and change documents before, then you already know how to use `papr`.\n\n## Sample code\n\n\u003c!-- prettier-ignore --\u003e\n```ts\nimport Papr, { schema, types } from 'papr';\n\nconst papr = new Papr();\n\nconst User = papr.model('users', schema({\n  age: types.number(),\n  firstName: types.string({ required: true }),\n  lastName: types.string({ required: true }),\n}));\n\nconst johnWick = await User.find({ firstName: 'John', lastName: 'Wick' });\n```\n\n## Documentation\n\nRead the documentation at: [plexinc.github.io/papr](https://plexinc.github.io/papr/)\n\n## Contributing\n\nPlease read the [contributing](CONTRIBUTING.md) guidelines.\n\nBefore contributing, please read the [Code of conduct](CODE_OF_CONDUCT.md).\n\n## License\n\nMIT\n\n## Inspiration\n\n- [Mongoose](https://mongoosejs.com/)\n- [ts-mongoose](https://github.com/lstkz/ts-mongoose)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplexinc%2Fpapr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplexinc%2Fpapr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplexinc%2Fpapr/lists"}