{"id":42561961,"url":"https://github.com/subshell/data-repositories","last_synced_at":"2026-01-28T20:32:01.196Z","repository":{"id":35895239,"uuid":"220018300","full_name":"subshell/data-repositories","owner":"subshell","description":"This is a wrapper around Dexie, which itself is already a wrapper around IndexedDB. This wrapper allows to create repositories, similar as you might be used to from Java and Spring Data.","archived":false,"fork":false,"pushed_at":"2025-12-05T12:11:23.000Z","size":330,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-12-28T18:47:55.836Z","etag":null,"topics":["data-repository","dexie","indexeddb","indexeddb-wrapper","orm","typescript","web"],"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/subshell.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}},"created_at":"2019-11-06T14:39:32.000Z","updated_at":"2025-11-27T14:58:01.000Z","dependencies_parsed_at":"2023-01-16T08:46:56.212Z","dependency_job_id":null,"html_url":"https://github.com/subshell/data-repositories","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/subshell/data-repositories","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subshell%2Fdata-repositories","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subshell%2Fdata-repositories/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subshell%2Fdata-repositories/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subshell%2Fdata-repositories/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/subshell","download_url":"https://codeload.github.com/subshell/data-repositories/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subshell%2Fdata-repositories/sbom","scorecard":{"id":856944,"data":{"date":"2025-08-11","repo":{"name":"github.com/subshell/data-repositories","commit":"9cafd2c3e81a83568f17861aa43b1c89167f87a3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/21 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":"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":"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":"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 11 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":0,"reason":"12 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"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-24T00:04:47.013Z","repository_id":35895239,"created_at":"2025-08-24T00:04:47.013Z","updated_at":"2025-08-24T00:04:47.013Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28850938,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T15:15:36.453Z","status":"ssl_error","status_checked_at":"2026-01-28T15:15:13.020Z","response_time":57,"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":["data-repository","dexie","indexeddb","indexeddb-wrapper","orm","typescript","web"],"created_at":"2026-01-28T20:32:00.541Z","updated_at":"2026-01-28T20:32:01.190Z","avatar_url":"https://github.com/subshell.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @subshell/data-repositories\n\n[![CI](https://github.com/subshell/data-repositories/actions/workflows/ci.yml/badge.svg)](https://github.com/subshell/data-repositories/actions/workflows/ci.yml) [![npm version](https://badge.fury.io/js/%40subshell%2Fdata-repositories.svg)](https://badge.fury.io/js/%40subshell%2Fdata-repositories)\n\nThis is a wrapper around [Dexie](https://github.com/dexie/Dexie.js), which itself is already a wrapper around IndexedDB. This wrapper allows to create\nrepository classes, similar as you might be used to from Java and Spring Data.\n\nShort example of a repository:\n\n```typescript\n\n/*********************************************************\n* Define a class you want to store and a repository class:\n*********************************************************/\n\n\nclass Person {    \n    @Id() name: string;\n    @Unique() identificationNumber: number;\n    @Indexed() email: string;\n    \n    constructor(name: string, identificationNumber: number, email: string) {\n        this.name = name;\n        this.identificationNumber = identificationNumber;\n        this.email = email;\n    }\n}\n\nclass PersonRepository extends AbstractRepository\u003cPerson, string\u003e {\n    constructor() {\n        super(DatabaseAccess.get(PersonRepository.name), Person);\n    }\n}\n\n/*****************************\n* Somewhere else in your code:\n*****************************/\n\nconst personRepository = new PersonRepository();\nconst gandalf = new Person(\"Gandalf\", 42, \"gandalf@yahoo.com\");\n\n// Save the object\npersonRepository.save(gandalf).subscribe();\n\n// Find the object\npersonRepository.findById(\"Gandalf\").subscribe(foundGandalf =\u003e {\n    // do something with it here\n});\n```\n\nYou can define a field to be the primary key of the repository by adding `@Id()` to it. If you want a number that is incremental you can use `@IncrementalId()`. \nIf you want multiple properties to be a compound primary key you can add multiple `@CompoundId()` decorators to those fields. If you are using `@IncrementalId()` \nor `@CompoundId()` you need to add an additional generic parameter to the repository, e.g.:\n\nIn any case you **must** use one of the `@Id()`, `@CompoundId()` or `@IncrementalId()` decorators in your repository.\n\n```typescript\n/*****************************\n* Compound ID:\n*****************************/\n\nclass Person {\n    @CompoundId() firstName: string;\n    @CompoundId() lastName: string;\n    // ...\n}\nclass PersonRepository extends AbstractRepository\u003cPerson, [string, string]\u003e {\n    // ...\n}\n\n/*****************************\n* Incremental ID:\n*****************************/\nclass Person {\n    @IncrementalId() identificationNumber: number;\n    name: string;\n    // ...\n}\nclass PersonRepository extends AbstractRepository\u003cPerson, number\u003e {\n    // ...\n}\n```\n\nTo make keys unique you can use `@Unique()` and to have indexed fields (you can only use those in search queries) you need to use `@Indexed()`. \n`@CompoundId()` fields are not automatically indexed separately, so if you want to be able to query these you need to additionally add the\n`@Indexed()` decorator to them. \n\nIf you should at a later point upgrade your data model and e.g. add a unique or indexed field, you need to specify the respective database version in the decorator,\ne.g. `@Unique({sinceVersion: 2})`. Versions start with **1** so if you update your model it is definitely at least version 2.\n\nMethods you can use on repositories are: `save`, `saveAll`, `findById`, `findAll`, `delete`, `clear`, `count`.\n\nAdditionally, the `AbstractRepository` and `AbstractMappingRepository` allow searching using simple property equality checks and predicates with the `.search()` method.\nThis functionality is very basic and far from what Dexie actually offers. This is currently a low priority TODO but feel free to contribute.\n   \nIt is recommended to have separate Dexie databases for every repository (due to some issues with Dexie and the versioning across multiple repositories). Use the `DatabaseAccess` class with care and\ntry not to create those classes with duplicate names unless you know what you do.\n\nThe repositories naturally work with RxJS and Observables. Due to the nature of IndexedDB there is no synchronous way to read or write any data.\n\n* * *\n\nTake a look at this project from the [subshell](https://subshell.com) team. We make [Sophora](https://subshell.com/sophora/): a content management software for content creation, curation, and distribution. [Join our team!](https://subshell.com/jobs/) | [Imprint](https://subshell.com/about/imprint/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubshell%2Fdata-repositories","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsubshell%2Fdata-repositories","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubshell%2Fdata-repositories/lists"}