{"id":18871865,"url":"https://github.com/foxifyjs/odin","last_synced_at":"2025-04-14T15:33:03.687Z","repository":{"id":32458940,"uuid":"129619337","full_name":"foxifyjs/odin","owner":"foxifyjs","description":"Odin is an implementation of the Active Record pattern in TypeScript","archived":false,"fork":false,"pushed_at":"2024-09-06T10:00:02.000Z","size":1573,"stargazers_count":20,"open_issues_count":21,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-29T20:22:34.393Z","etag":null,"topics":["activerecord","database","graphql","model","model-schema","mongodb","nodejs","odin","typescript"],"latest_commit_sha":null,"homepage":"https://odin.js.org","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/foxifyjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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},"funding":{"github":["foxifyjs"],"patreon":null,"open_collective":"foxify","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-04-15T14:41:37.000Z","updated_at":"2021-12-21T07:20:15.000Z","dependencies_parsed_at":"2023-11-10T14:46:56.532Z","dependency_job_id":"8e1f10c4-896d-40e8-b1fd-1250438d5afc","html_url":"https://github.com/foxifyjs/odin","commit_stats":{"total_commits":149,"total_committers":2,"mean_commits":74.5,"dds":0.3422818791946308,"last_synced_commit":"f42bd0cd43f2f8f75a8a22e48066379dbf854eb1"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxifyjs%2Fodin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxifyjs%2Fodin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxifyjs%2Fodin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxifyjs%2Fodin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foxifyjs","download_url":"https://codeload.github.com/foxifyjs/odin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248419648,"owners_count":21100213,"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":["activerecord","database","graphql","model","model-schema","mongodb","nodejs","odin","typescript"],"created_at":"2024-11-08T05:27:47.866Z","updated_at":"2025-04-14T15:33:03.667Z","avatar_url":"https://github.com/foxifyjs.png","language":"TypeScript","funding_links":["https://github.com/sponsors/foxifyjs","https://opencollective.com/foxify","https://www.buymeacoffee.com/ardalanamini","https://www.patreon.com/ardalanamini"],"categories":[],"sub_categories":[],"readme":"# Odin \u003c!-- omit in toc --\u003e\n\nOdin is an implementation of [**Active Record**](https://en.wikipedia.org/wiki/Active_record_pattern) pattern in [**TypeScript**](https://typescriptlang.com).\n\n[![NPM Version](https://img.shields.io/npm/v/@foxify/odin.svg)](https://www.npmjs.com/package/@foxify/odin)\n[![Node Version](https://img.shields.io/node/v/@foxify/odin.svg)](https://nodejs.org)\n[![TypeScript Version](https://img.shields.io/npm/types/@foxify/odin.svg)](https://www.typescriptlang.org)\n[![Tested With Jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)\n[![Pull Requests](https://img.shields.io/badge/PRs-Welcome-brightgreen.svg)](https://github.com/foxifyjs/odin/pulls)\n[![License](https://img.shields.io/github/license/foxifyjs/odin.svg)](https://github.com/foxifyjs/odin/blob/master/LICENSE)\n[![Build Status](https://github.com/foxifyjs/odin/workflows/Test/badge.svg)](https://github.com/foxifyjs/odin/actions)\n[![Coverage Status](https://codecov.io/gh/foxifyjs/odin/branch/master/graph/badge.svg)](https://codecov.io/gh/foxifyjs/odin)\n[![Package Quality](http://npm.packagequality.com/shield/%40foxify%2Fodin.svg)](http://packagequality.com/#?package=@foxify/odin)\n[![Dependencies Status](https://david-dm.org/foxifyjs/odin.svg)](https://david-dm.org/foxifyjs/odin)\n[![NPM Total Downloads](https://img.shields.io/npm/dt/@foxify/odin.svg)](https://www.npmjs.com/package/@foxify/odin)\n[![NPM Monthly Downloads](https://img.shields.io/npm/dm/@foxify/odin.svg)](https://www.npmjs.com/package/@foxify/odin)\n[![Open Issues](https://img.shields.io/github/issues-raw/foxifyjs/odin.svg)](https://github.com/foxifyjs/odin/issues?q=is%3Aopen+is%3Aissue)\n[![Closed Issues](https://img.shields.io/github/issues-closed-raw/foxifyjs/odin.svg)](https://github.com/foxifyjs/odin/issues?q=is%3Aissue+is%3Aclosed)\n[![known vulnerabilities](https://snyk.io/test/github/foxifyjs/odin/badge.svg?targetFile=package.json)](https://snyk.io/test/github/foxifyjs/odin?targetFile=package.json)\n[![Github Stars](https://img.shields.io/github/stars/foxifyjs/odin.svg?style=social)](https://github.com/foxifyjs/odin)\n[![Github Forks](https://img.shields.io/github/forks/foxifyjs/odin.svg?style=social\u0026label=Fork)](https://github.com/foxifyjs/odin)\n\n## Table of Content \u003c!-- omit in toc --\u003e\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Features](#features)\n- [TODO (RoadMap to version 1.0.0)](#todo-roadmap-to-version-100)\n- [Versioning](#versioning)\n- [Changelog](#changelog)\n- [Authors](#authors)\n- [License](#license)\n- [Support](#support)\n\n## Installation\n\nBefore installing, [download and install Node.js](https://nodejs.org/en/download).\nNode.js 8 or higher is required.\n\n```bash\nnpm i -s @foxify/odin\n```\n\n## Usage\n\n```javascript\nconst Odin = require(\"@foxify/odin\");\n\nconst { Types } = Odin;\n\nclass User extends Odin {\n}\n\nUser.schema = {\n  email: Types.String.email.required,\n  name: {\n    first: Types.String.min(3).required,\n    last: Types.String.min(3),\n  }\n};\n```\n\n## Features\n\n1. Written in `ES6`\n2. `TypeScript` ready\n3. `Active Record` pattern\n4. `Schema` validation\n5. `GraphQL Schema` generator (based on model schema)\n6. `JSON Schema` generator (based on model schema)\n\n## TODO (RoadMap to version 1.0.0)\n\n- [x] `Schema` validation\n- [ ] Model\n  - [ ] Hooks\n    - [x] `create`\n    - [ ] `update`\n    - [ ] `delete`\n    - [ ] `restore`\n  - [ ] Relationships\n    - [x] `embedMany`\n    - [x] `hasMany`\n    - [x] `hasOne`\n    - [ ] `hasManyThrough`\n    - [ ] `hasOneThrough`\n    - [ ] `Polymorphic`\n      - [x] `morphMany`\n      - [x] `morphOne`\n      - [ ] `morphTo`\n      - [ ] `morphManyThrough`\n      - [ ] `morphOneThrough`\n      - [ ] `morphToThrough`\n    - [x] CRUD operations\n      - [x] Create operation\n      - [x] Read operation\n      - [x] Update operation\n      - [x] Delete operation\n  - [x] `GraphQL` support\n  - [x] `JSON Schema` support\n- [ ] Migrations\n- [ ] Seeding\n- [ ] Tests\n\n## Versioning\n\nWe use [SemVer](http://semver.org) for versioning. For the versions available, see the [tags on this repository](https://github.com/foxifyjs/odin/tags).\n\n## Changelog\n\nSee the [CHANGELOG.md](CHANGELOG.md) file for details\n\n## Authors\n\n- **Ardalan Amini** - *Core Maintainer* - [@ardalanamini](https://github.com/ardalanamini)\n\nSee also the list of [contributors](https://github.com/foxifyjs/odin/contributors) who participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n\n## Support\n\nIf my work helps you, please consider\n\n[![Buy Me A Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/ardalanamini)\n[![Become A Patron](https://c5.patreon.com/external/logo/become_a_patron_button.png)](https://www.patreon.com/ardalanamini)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxifyjs%2Fodin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxifyjs%2Fodin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxifyjs%2Fodin/lists"}