{"id":18764697,"url":"https://github.com/guoxicheng/tinycrud","last_synced_at":"2025-06-11T06:05:54.445Z","repository":{"id":205055260,"uuid":"713275025","full_name":"GuoXiCheng/TinyCRUD","owner":"GuoXiCheng","description":"基于 Issue API 的轻量级数据存储库 - Lightweight Data Repository Based on Git Issue API","archived":false,"fork":false,"pushed_at":"2024-06-06T06:58:35.000Z","size":437,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-13T10:18:24.232Z","etag":null,"topics":["crud","data-storage","issue","lightweight","typescript"],"latest_commit_sha":null,"homepage":"https://tinycrud.guoxicheng.top","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/GuoXiCheng.png","metadata":{"files":{"readme":"README.en.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2023-11-02T07:32:26.000Z","updated_at":"2024-07-09T05:11:03.000Z","dependencies_parsed_at":"2024-01-10T08:41:09.670Z","dependency_job_id":"1468be9b-563a-4d00-af1c-b53694092027","html_url":"https://github.com/GuoXiCheng/TinyCRUD","commit_stats":null,"previous_names":["guoxicheng/tinycrud"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuoXiCheng%2FTinyCRUD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuoXiCheng%2FTinyCRUD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuoXiCheng%2FTinyCRUD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuoXiCheng%2FTinyCRUD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GuoXiCheng","download_url":"https://codeload.github.com/GuoXiCheng/TinyCRUD/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuoXiCheng%2FTinyCRUD/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259211830,"owners_count":22822378,"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":["crud","data-storage","issue","lightweight","typescript"],"created_at":"2024-11-07T18:31:08.527Z","updated_at":"2025-06-11T06:05:54.421Z","avatar_url":"https://github.com/GuoXiCheng.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[简体中文](README.md) | ENGLISH\n\n# TinyCRUD\n\n![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/GuoXiCheng/TinyCRUD/ci.yml)\n![Codecov branch](https://img.shields.io/codecov/c/github/GuoXiCheng/TinyCRUD/main)\n\n## Introduction\n\nTinyCRUD is a lightweight data storage library based on the Issue API of the code hosting platform. It can use Issues as database tables, and Issue comments as records in these tables. It performs data serialization/deserialization through the Issue API to enable data addition, deletion, modification, and querying.\n\n## Applicable Scenarios\n\nTinyCRUD is suitable for small teams or personal projects that require simple and lightweight data storage, but do not want or need to set up a complex database system.\n\n## Supported code hosting platforms\n\n\u003ctable\u003e  \n    \u003ctr\u003e\n        \u003ctd\u003e\n            \u003cp align=\"center\"\u003e\n                \u003cimg src=\"https://guoxicheng.top/assets/image/tiny-crud-docs/github.svg\" title=\"Github\"/\u003e\n            \u003c/p\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\n            \u003cp align=\"center\"\u003e\n                \u003cimg src=\"https://guoxicheng.top/assets/image/tiny-crud-docs/gitlab.svg\" title=\"Gitlab\"/\u003e\n            \u003c/p\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\n            \u003cp align=\"center\"\u003e\n                \u003cimg src=\"https://guoxicheng.top/assets/image/tiny-crud-docs/gitee.svg\" title=\"Gitee\"/\u003e\n            \u003c/p\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\n            Github API latest\n        \u003c/td\u003e\n        \u003ctd\u003e\n            Gitlab API v4\n        \u003c/td\u003e\n        \u003ctd\u003e\n            Gitee API v5\n        \u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n## Supported request libraries\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\n            \u003cimg src=\"https://axios-http.com/assets/logo.svg\" /\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\n            \u003cp align=\"center\"\u003e\n                \u003cimg src=\"https://guoxicheng.top/assets/image/tiny-crud-docs/wechat.svg\" /\u003e\n            \u003c/p\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\n            axios\n        \u003c/td\u003e\n        \u003ctd\u003e\n            wx（WeChat Mini Program）\n        \u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n## Installation\n\n```shell\nnpm install tiny-crud\n```\n\n## Usage\n\n### Initialization\n\n```ts\nimport axios from \"axios\";\nimport { createRequest } from \"tiny-crud\";\n\nconst GithubRequest = createRequest({\n  httpLib: \"axios\",\n  httpClient: axios,\n  accessToken: \"Your Personal Access Token\",\n\n  platform: \"github\",\n  owner: \"Your Owner\",\n  repo: \"Your Repo\",\n});\n```\n\n### Create Model\n\n```ts\nimport { BaseModel } from \"tiny-crud\";\n\nexport interface UserModel extends BaseModel {\n  name: string;\n  age: number;\n  gender: string;\n}\n```\n\n### Create Repository\n\n```ts\nimport { GithubRepository } from \"tiny-crud\";\nimport { githubRequest } from \"./github-request\";\n\nexport class UserRepository extends GithubRepository\u003cUserModel\u003e {\n  constructor() {\n    super(githubRequest, \"Your Issue Number\");\n  }\n}\n```\n\n### Basic Operations\n\n```ts\nconst userRepository = new UserRepository();\n\n// create data\nuserRepository.create({\n  name: \"John\",\n  age: 30,\n  gender: \"male\",\n});\n\n// find data\nuserRepository.find();\n\n// update data\nuserRepository.updateById(1, {\n  name: \"Mary\",\n  age: 25,\n  gender: \"female\",\n});\n\n// delete data\nuserRepository.deleteById(1);\n```\n\n## Documentation\n\n- more detailed documentation 👉[TinyCRUD Docs](https://tinycrud.guoxicheng.top)\n- If you find it helpful, please consider giving it a little star, and thank you for your support! 🌟\n\n## License\n\n[MIT](https://github.com/GuoXiCheng/TinyCRUD/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguoxicheng%2Ftinycrud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguoxicheng%2Ftinycrud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguoxicheng%2Ftinycrud/lists"}