{"id":13469488,"url":"https://github.com/remult/remult","last_synced_at":"2026-10-19T01:05:06.839Z","repository":{"id":37004145,"uuid":"108873775","full_name":"remult/remult","owner":"remult","description":"Full-stack CRUD, simplified, with SSOT TypeScript entities","archived":false,"fork":false,"pushed_at":"2026-10-09T11:56:56.000Z","size":81370,"stargazers_count":3210,"open_issues_count":114,"forks_count":159,"subscribers_count":29,"default_branch":"main","last_synced_at":"2026-10-09T16:24:59.963Z","etag":null,"topics":["angular","api","crud","express-middleware","fullstack","fullstack-typescript","jamstack","nextjs","orm","postgresql","react","rest","typescript","validation","vue"],"latest_commit_sha":null,"homepage":"https://remult.dev","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/remult.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"claude":null,"gemini":null,"cursor":null,"copilot":null,"dco":null,"cla":null,"disclosure":null}},"created_at":"2017-10-30T15:55:17.000Z","updated_at":"2026-10-09T11:48:45.000Z","dependencies_parsed_at":"2026-10-09T13:24:44.771Z","dependency_job_id":null,"html_url":"https://github.com/remult/remult","commit_stats":{"total_commits":3864,"total_committers":36,"mean_commits":"107.33333333333333","dds":0.5157867494824017,"last_synced_commit":"28f34fd4863ccbdc9b17c033dc43144cc4c20cf4"},"previous_names":[],"tags_count":659,"template":false,"template_full_name":null,"purl":"pkg:github/remult/remult","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remult%2Fremult","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remult%2Fremult/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remult%2Fremult/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remult%2Fremult/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remult","download_url":"https://codeload.github.com/remult/remult/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remult%2Fremult/sbom","scorecard":{"id":146376,"data":{"date":"2025-08-11","repo":{"name":"github.com/remult/remult","commit":"79a2f409f882c36a095b78057547848d9a246824"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Code-Review","score":4,"reason":"Found 14/29 approved changesets -- score normalized to 4","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":"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":"Maintained","score":10,"reason":"30 commit(s) and 11 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/docs.yml:9","Info: no jobLevel write permissions found"],"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":"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":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":"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":"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":3,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'main'","Warn: could not determine whether codeowners review is allowed","Warn: no status checks found to merge onto branch 'main'","Warn: PRs are not required to make changes on branch 'main'; or we don't have data to detect it.If you think it might be the latter, make sure to run Scorecard with a PAT or use Repo Rules (that are always public) instead of Branch Protection settings"],"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/remult/remult/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/remult/remult/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/remult/remult/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:90: update your workflow using https://app.stepsecurity.io/secureworkflow/remult/remult/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/remult/remult/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/remult/remult/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/remult/remult/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/remult/remult/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/remult/remult/docs.yml/main?enable=pin","Warn: npmCommand not pinned by hash: misc/update-exp-version.sh:2","Warn: npmCommand not pinned by hash: misc/update-exp-version.sh:5","Warn: npmCommand not pinned by hash: misc/update-exp-version.sh:8","Warn: npmCommand not pinned by hash: misc/update-versions-to-starter-projects.sh:2","Warn: npmCommand not pinned by hash: misc/update-versions-to-starter-projects.sh:5","Warn: npmCommand not pinned by hash: misc/update-versions-to-starter-projects.sh:8","Warn: npmCommand not pinned by hash: misc/update-versions-to-starter-projects.sh:11","Warn: npmCommand not pinned by hash: misc/update-versions-to-starter-projects.sh:14","Warn: npmCommand not pinned by hash: misc/update-versions-to-starter-projects.sh:17","Warn: npmCommand not pinned by hash: misc/update-versions-to-starter-projects.sh:20","Warn: npmCommand not pinned by hash: misc/update-versions-to-starter-projects.sh:23","Warn: npmCommand not pinned by hash: misc/update-versions-to-starter-projects.sh:26","Warn: npmCommand not pinned by hash: misc/update-versions-to-starter-projects.sh:29","Warn: npmCommand not pinned by hash: misc/update-versions-to-starter-projects.sh:33","Warn: npmCommand not pinned by hash: misc/update-versions-to-starter-projects.sh:40","Warn: npmCommand not pinned by hash: misc/update-versions-to-starter-projects.sh:47","Warn: npmCommand not pinned by hash: misc/update-versions-to-starter-projects.sh:54","Warn: npmCommand not pinned by hash: misc/update-versions-to-starter-projects.sh:61","Warn: npmCommand not pinned by hash: misc/update-versions-to-starter-projects.sh:68","Warn: npmCommand not pinned by hash: misc/update-versions-to-starter-projects.sh:75","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:29","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:96","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:102","Info:   0 out of   9 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of  24 npmCommand dependencies pinned"],"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 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":"38 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-x7hr-w5r2-h6wg","Warn: Project is vulnerable to: GHSA-vg6x-rcgg-rjx6","Warn: Project is vulnerable to: GHSA-x574-m823-4x7w","Warn: Project is vulnerable to: GHSA-4r4m-qw57-chr8","Warn: Project is vulnerable to: GHSA-xcj6-pq6g-qj4x","Warn: Project is vulnerable to: GHSA-356w-63v5-8wf4","Warn: Project is vulnerable to: GHSA-859w-5945-r5v3","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3h52-269p-cp9r","Warn: Project is vulnerable to: GHSA-r2fc-ccr8-96c4","Warn: Project is vulnerable to: GHSA-jvhm-gjrh-3h93","Warn: Project is vulnerable to: GHSA-8g77-54rh-46hx","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-3qxh-p7jc-5xh6","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-m5vv-6r4h-3vj9","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-rrr8-f88r-h8q6","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-jgmv-j7ww-jx2x","Warn: Project is vulnerable to: GHSA-2452-6xj8-jh47","Warn: Project is vulnerable to: GHSA-f6v4-cf5j-vf3w","Warn: Project is vulnerable to: GHSA-8266-84wp-wv5c"],"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-16T09:28:55.072Z","repository_id":37004145,"created_at":"2025-08-16T09:28:55.073Z","updated_at":"2025-08-16T09:28:55.073Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38344170,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-18T02:00:06.448Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["angular","api","crud","express-middleware","fullstack","fullstack-typescript","jamstack","nextjs","orm","postgresql","react","rest","typescript","validation","vue"],"created_at":"2024-07-31T15:01:42.025Z","updated_at":"2026-10-19T01:05:06.831Z","avatar_url":"https://github.com/remult.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Projects by main language","Frameworks","API","api","Built with TypeScript","MVC Frameworks and Libraries","🌐 Web Development - Frontend"],"sub_categories":["typescript","Samples","Libraries","Runner"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eRemult\u003c/h1\u003e\n  \u003cp\u003eFull-stack CRUD, simplified, with SSOT TypeScript entities\u003c/p\u003e\n\t\u003ca href=\"https://circleci.com/gh/remult/remult/tree/main\" rel=\"nofollow\"\u003e\n\t\t\u003cimg alt=\"CircleCI\" src=\"https://circleci.com/gh/remult/remult/tree/main.svg?style=shield\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://codecov.io/gh/remult/remult\" rel=\"nofollow\"\u003e\n        \t\u003cimg src=\"https://codecov.io/gh/remult/remult/branch/main/graph/badge.svg?token=LYWQRUN3D1\"/\u003e\u003c/a\u003e\n    \t\u003ca href=\"https://raw.githubusercontent.com/remult/remult/main/LICENSE\" rel=\"nofollow\"\u003e\n\t\t\u003cimg alt=\"GitHub license\" src=\"https://img.shields.io/badge/license-MIT-blue.svg\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://www.npmjs.com/package/remult\" rel=\"nofollow\"\u003e\n\t\t\u003cimg alt=\"npm version\" src=\"https://badge.fury.io/js/remult.svg\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://www.npmjs.com/package/remult\" rel=\"nofollow\"\u003e\n\t\t\u003cimg alt=\"npm downloads\" src=\"https://img.shields.io/npm/dm/remult\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://discord.gg/GXHk7ZfuG5\" rel=\"nofollow\"\u003e\n\t\t\u003cimg alt=\"Join Discord\" src=\"https://badgen.net/discord/members/GXHk7ZfuG5?icon=discord\u0026label=Discord\"/\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr/\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"#tutorials\"\u003eTutorials\u003c/a\u003e |\n  \u003ca href=\"https://remult.dev/docs/quickstart\"\u003eQuickstart\u003c/a\u003e |\n  \u003ca href=\"https://remult.dev/docs/example-apps\"\u003eExample Apps\u003c/a\u003e\n\u003c/div\u003e\n\n\u003chr/\u003e\n\u003cbr/\u003e\n\n## What is Remult?\n\nRemult uses **TypeScript entities** as a single source of truth for: ✅ CRUD + Realtime API, ✅ frontend type-safe API client, and\n✅ backend ORM.\n\n- :zap: **Zero-boilerplate CRUD + Realtime API** with paging, sorting, and filtering\n- :ok_hand: **Fullstack type-safety** for API queries, mutations and RPC, without code generation\n- :sparkles: Input validation, **defined once**, runs both on the backend and on the frontend for best UX\n- :lock: Fine-grained **code-based API authorization**\n- :relieved: Incrementally adoptable\n\n**Remult supports all major databases**, including: PostgreSQL, MySQL, SQLite, MongoDB, MSSQL and Oracle.\n\n**Remult is frontend and backend framework agnostic** and comes with adapters for Express, Fastify, Next.js, Nuxt, SvelteKit, SolidStart, Nest, Koa, Hapi and Hono.\n\n\u003e **Want to experience Remult firsthand? [Try our interactive online tutorial](https://learn.remult.dev/).**\n\nRemult promotes a **consistent query syntax for both frontend and Backend code**:\n\n```ts\n// Frontend - GET: /api/products?_limit=10\u0026unitPrice.gt=5,_sort=name\n// Backend  - 'select name, unitPrice from products where unitPrice \u003e 5 order by name limit 10'\nawait repo(Product).find({\n  limit: 10,\n  orderBy: {\n    name: 'asc',\n  },\n  where: {\n    unitPrice: { $gt: 5 },\n  },\n})\n\n// Frontend - PUT: '/api/products/product7' (body: { \"unitPrice\" : 7 })\n// Backend  - 'update products set unitPrice = 7 where id = product7'\nawait repo(Product).update('product7', { unitPrice: 7 })\n```\n\n## Usage\n\n### Define schema in code\n\n```ts\n// shared/product.ts\n\nimport { Entity, Fields } from 'remult'\n\n@Entity('products', {\n  allowApiCrud: true,\n})\nexport class Product {\n  @Fields.id()\n  id = ''\n\n  @Fields.string()\n  name = ''\n\n  @Fields.number()\n  unitPrice = 0\n}\n```\n\n👉 **Don't like decorators?** we have full support for [Working without decorators](https://remult.dev/docs/working-without-decorators)\n\n### Add backend API with a [single line of code](https://remult.dev/docs/quickstart#server-side-initialization)\n\n_Example:_\n\n```ts\n// backend/index.ts\n\nimport express from 'express'\nimport { remultApi } from 'remult/remult-express' // adapters for: Fastify,Next.js, Nuxt, SvelteKit, SolidStart, Nest, more...\nimport { createPostgresDataProvider } from 'remult/postgres' // supported: PostgreSQL, MySQL, SQLite, MongoDB, MSSQL and Oracle\nimport { Product } from '../shared/product'\n\nconst app = express()\n\napp.use(\n  remultApi({\n    entities: [Product],\n    dataProvider: createPostgresDataProvider({\n      connectionString: 'postgres://user:password@host:5432/database',\n    }),\n  }),\n)\n\napp.listen()\n```\n\nRemult adds route handlers for a fully functional REST API and realtime live-query endpoints, optionally including an [Open API](https://remult.dev/docs/adding-swagger) spec and a [GraphQL](https://remult.dev/docs/adding-graphql) endpoint\n\n### Fetch data with type-safe frontend code\n\n```ts\nconst [products, setProducts] = useState\u003cProduct[]\u003e([])\n\nuseEffect(() =\u003e {\n  repo(Product)\n    .find({\n      limit: 10,\n      orderBy: {\n        name: 'asc',\n      },\n      where: {\n        unitPrice: { $gt: 5 },\n      },\n    })\n    .then(setProducts)\n}, [])\n```\n\n### :mega: Realtime Live Queries\n\n```ts\nuseEffect(() =\u003e {\n  return repo(Product)\n    .liveQuery({\n      limit: 10,\n      orderBy: {\n        name: 'asc',\n      },\n      where: {\n        unitPrice: { $gt: 5 },\n      },\n    })\n    .subscribe((info) =\u003e {\n      setProducts(info.applyChanges)\n    })\n}, [])\n```\n\n### :ballot_box_with_check: Data validation and constraints - defined once\n\n```ts\nimport { Entity, Fields, Validators } from 'remult'\n\n@Entity('products', {\n  allowApiCrud: true,\n})\nexport class Product {\n  @Fields.id()\n  id = ''\n\n  @Fields.string({\n    validate: Validators.required,\n  })\n  name = ''\n\n  @Fields.number\u003cProduct\u003e({\n    validate: (product) =\u003e product.unitPrice \u003e 0 || 'must be greater than 0',\n  })\n  unitPrice = 0\n}\n```\n\n#### Enforced in frontend:\n\n```ts\ntry {\n  await repo(Product).insert({ name: '', unitPrice: -1 })\n} catch (e: any) {\n  console.error(e)\n  /* Detailed error object -\u003e\n{\n  \"modelState\": {\n    \"name\": \"Should not be empty\",\n    \"unitPrice\": \"must be greater than 0\"\n  },\n  \"message\": \"Name: Should not be empty\"\n}\n*/\n}\n```\n\n#### Enforced in backend:\n\n```ts\n// POST '/api/products' BODY: { \"name\":\"\", \"unitPrice\":-1 }\n// Response: status 400, body:\n{\n  \"modelState\": {\n    \"name\": \"Should not be empty\",\n    \"unitPrice\": \"must be greater than 0\"\n  },\n  \"message\": \"Name: Should not be empty\"\n}\n```\n\n### :lock: Secure the API with fine-grained authorization\n\n```ts\n@Entity\u003cArticle\u003e('Articles', {\n  allowApiRead: true,\n  allowApiInsert: Allow.authenticated,\n  allowApiUpdate: (article) =\u003e article.author == remult.user.id,\n  apiPrefilter: () =\u003e {\n    if (remult.isAllowed('admin')) return {}\n    return {\n      author: remult.user.id,\n    }\n  },\n})\nexport class Article {\n  @Fields.string({ allowApiUpdate: false })\n  slug = ''\n\n  @Fields.string({ allowApiUpdate: false })\n  authorId = remult.user!.id\n\n  @Fields.string()\n  content = ''\n}\n```\n\n### :rocket: Relations\n\n```ts\nawait repo(Categories).find({\n  orderBy: {\n    name: 'asc ',\n  },\n  include: {\n    products: {\n      where: {\n        unitPrice: { $gt: 5 },\n      },\n    },\n  },\n})\n\n// Entity Definitions\nexport class Product {\n  //...\n  @Relations.toOne(Category)\n  category?: Category\n}\nexport class Category {\n  //...\n  @Relations.toMany\u003cCategory, Product\u003e(() =\u003e Product, `category`)\n  products?: Product[]\n}\n```\n\n### Automatic admin UI\n\n![Automatic admin UI](https://raw.githubusercontent.com/remult/remult/main/static/images/admin-ui.gif)\n\nLearn more [here](https://remult.dev/docs/admin-ui).\n\n## What about complex CRUD?\n\nWhile simple CRUD shouldn’t require any backend coding, using Remult means\nhaving the ability to handle any complex scenario by controlling the backend in\nnumerous ways:\n\n- Backend computed (read-only) fields - from simple\n  [expressions](https://remult.dev/docs/ref_field.html#serverexpression) to\n  complex data lookups or even direct db access (SQL)\n- Custom side-effects with\n  [entity lifecycle hooks](https://remult.dev/docs/ref_entity.html#saving)\n  (before/after saving/deleting)\n- Backend only updatable fields (e.g. “last updated at”)\n- [Relations](https://remult.dev/docs/entity-relations.html)\n- Roll-your-own type-safe endpoints with\n  [Backend Methods](https://remult.dev/docs/backendMethods.html)\n- Roll-your-own low-level endpoints (Express, Fastify, koa, others…)\n\n## Installation\n\nThe _remult_ package is one and the same for both the frontend bundle and the\nbackend. Install it once for a monolith project or per-repo in a monorepo.\n\n```sh\nnpm i remult\n```\n\n## Tutorials\n\nThe best way to learn Remult is by following a tutorial of a simple Todo web app\nwith a Node.js Express backend.\n\n- [Tutorial with React](https://remult.dev/tutorials/react/)\n- [Tutorial with Angular](https://remult.dev/tutorials/angular/)\n- [Tutorial with Vue](https://remult.dev/tutorials/vue/)\n- [Tutorial with Next.js](https://remult.dev/tutorials/react-next/)\n- [Tutorial with Sveltekit](https://remult.dev/tutorials/sveltekit/)\n- [Tutorial with SolidStart](https://remult.dev/tutorials/solid-start/)\n\n## Demo\n\n\u003ca href=\"https://www.youtube.com/watch?v=rEoScmSVNUE\" target=\"_blank\"\u003e\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/remult/remult/raw/main/static/images/video-thumbnail.jpg\" alt=\"Video thumbnail\"  /\u003e\n  \u003c/p\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://www.youtube.com/watch?v=rEoScmSVNUE\" target=\"_blank\"\u003e\n  \u003cp align=\"center\"\u003eWatch code demo on YouTube here (14 mins)\u003c/p\u003e\n\u003c/a\u003e\n\n## Documentation\n\nThe [documentation](https://remult.dev/docs) covers the main features of Remult.\nHowever, it is still a work-in-progress.\n\n## Example Apps\n\n- Fullstack TodoMVC example with React and Express.\n  ([Source code](https://github.com/remult/TodoMVC-eample) |\n  [CodeSandbox](https://codesandbox.io/s/github/remult/TodoMVC-example?file=/src/frontend/App.tsx))\n\n- [CRM demo](https://github.com/remult/crm-demo) with a React +\n  [MUI](https://mui.com) front-end and Postgres database.\n\n### Status\n\nRemult is **production-ready** and, in fact, used in production apps since 2018.\nHowever, we’re keeping the major version at zero so we can use community\nfeedback to finalize the v1 API.\n\n## Motivation\n\nFull-stack web development is (still) too complicated. **Simple CRUD, a common\nrequirement of any business application, should be simple to build, maintain,\nand extend** when the need arises.\n\nRemult abstracts away repetitive, boilerplate, error-prone, and poorly designed\ncode on the one hand, and enables total flexibility and control on the other.\n**Remult helps building fullstack apps using only TypeScript code you can easily\nfollow and safely refactor**, and fits nicely into any existing or new project\nby being minimalistic and completely unopinionated regarding the developer’s\nchoice of other frameworks and tools.\n\nOther frameworks tend to fall into either too much abstraction (no-code,\nlow-code, BaaS) or partial abstraction (MVC frameworks, GraphQL, ORMs, API\ngenerators, code generators), and tend to be opinionated regarding the\ndevelopment tool-chain, deployment environment, configuration/conventions or\nDSL. Remult attempts to strike a better balance.\n\n## Contributing\n\nContributions are welcome. See [CONTRIBUTING.md](https://github.com/remult/remult/blob/main/CONTRIBUTING.md).\n\n- :speech_balloon: Any feedback or suggestions? Start a\n  [discussion](https://github.com/remult/remult/discussions).\n- :muscle: Want to help out? Look for \"help wanted\" labeled\n  [issues](https://github.com/remult/remult/issues).\n- :star: Give this repo a star.\n\n## License\n\nRemult is [MIT Licensed](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremult%2Fremult","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremult%2Fremult","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremult%2Fremult/lists"}