{"id":37160382,"url":"https://github.com/payloaddev/react-at-rest","last_synced_at":"2026-01-14T19:02:08.547Z","repository":{"id":65372166,"uuid":"49676542","full_name":"PayloadDev/react-at-rest","owner":"PayloadDev","description":"A toolkit for building ridiculously fast web applications using React and RESTful APIs.","archived":true,"fork":false,"pushed_at":"2024-08-02T16:24:15.000Z","size":115,"stargazers_count":39,"open_issues_count":1,"forks_count":3,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-10-30T07:49:02.094Z","etag":null,"topics":["coffeescript","es6","react","rest-api"],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","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/PayloadDev.png","metadata":{"files":{"readme":"README.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":"2016-01-14T21:32:29.000Z","updated_at":"2024-08-02T16:25:04.000Z","dependencies_parsed_at":"2024-06-24T22:42:17.320Z","dependency_job_id":"b8a13413-d8a9-4b94-94cc-0411d4b06c33","html_url":"https://github.com/PayloadDev/react-at-rest","commit_stats":{"total_commits":111,"total_committers":4,"mean_commits":27.75,"dds":0.5765765765765766,"last_synced_commit":"bc0fa92a0187b9b15e9adcc17ec8e4cf8b6f6c65"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/PayloadDev/react-at-rest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PayloadDev%2Freact-at-rest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PayloadDev%2Freact-at-rest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PayloadDev%2Freact-at-rest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PayloadDev%2Freact-at-rest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PayloadDev","download_url":"https://codeload.github.com/PayloadDev/react-at-rest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PayloadDev%2Freact-at-rest/sbom","scorecard":{"id":108682,"data":{"date":"2025-08-11","repo":{"name":"github.com/PayloadDev/react-at-rest","commit":"e48667bad8f1d32ce9177e008135ab457b95c28b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 2/30 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":"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":"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":"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":"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 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"}}]},"last_synced_at":"2025-08-15T11:37:17.276Z","repository_id":65372166,"created_at":"2025-08-15T11:37:17.280Z","updated_at":"2025-08-15T11:37:17.280Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28431164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["coffeescript","es6","react","rest-api"],"created_at":"2026-01-14T19:02:07.706Z","updated_at":"2026-01-14T19:02:08.538Z","avatar_url":"https://github.com/PayloadDev.png","language":"CoffeeScript","readme":"# React-at-Rest\nA toolkit for building ridiculously fast web applications using React and RESTful APIs.\n\n![Codeship Badge](https://codeship.com/projects/27ad5260-a389-0133-6b2c-3a486f5179bd/status?branch=master)\n\n# WARNING: `react-at-rest` is deprecated\nThis package is deprecated and is no longer being maintained.\n\n## Documentation\n\n* [v2.0.0 Upgrade Guide](docs/updgrade.md)\n* [Overview](docs/overview.md)\n* [Store](docs/store.md)\n* [DeliveryService](docs/deliveryservice.md)\n* [RestForm](docs/restform.md)\n* [App Events](docs/appevents.md)\n\n## Sample Projects\n\nClone the react-at-rest examples repo to get started! https://github.com/PayloadDev/react-at-rest-examples\n\nThe examples project contains sample code in both [ES6](https://github.com/PayloadDev/react-at-rest-examples/tree/master/src/addressbook) and [CoffeeScript](https://github.com/PayloadDev/react-at-rest-examples/tree/master/src/blog).\n\n## Main Concepts\n\n* React-at-Rest is composed of 3 main classes, working in concert: `Store`, `DeliveryService`, and `RestForm`.\n  * `Store`: manages all AJAX requests and holds the data returned by the server.\n  * `DeliveryService`: React Component that manages and simplifies communication with the Stores.\n  * `RestForm`: React Component for building forms and managing RESTful data flow.\n* Uses Events for Store-\u003eComponent communication.\n* Written in CoffeeScript, **fully compatible with ES6**.\n* Uses Bootstrap classes by default, but doesn't depend on Bootstrap.\n* Uses subclasses instead of mixins or composition.\n* Plays nicely with [react-router](https://github.com/rackt/react-router/)\n\n## Requirements and Installation\n\nReact-at-Rest depends on `react`.\n\n`npm install --save react-at-rest react`\n\n## Battle Tested and Pragmatic\n\nReact-at-Rest is a collection of powerful tools that make writing SPAs faster and simpler. You'll be amazed at what you can accomplish in a very short period of time.\n\nReact-at-Rest powers the Payload SPA at payload.net.\n\n# Getting Started\n\nYou can trivially consume a RESTful API using `Store` and `DeliveryService`\n\n#### ES6\n```es6\nclass BlogPosts extends DeliveryService {\n\n  constructor(props) {\n    super(props);\n    // create a new Store which connected to an API at /posts\n    this.postStore = new Store('posts');\n  }\n\n  // override bindResources to load all the resources needed for this component\n  bindResources(props) {\n    // retrieve all the posts from the Post Store\n    this.retrieveAll(this.postStore);\n  }\n\n  render() {\n    // show a loading message while loading data\n    if !this.state.loaded\n      return (\u003cspan\u003eLoading...\u003c/span\u003e)\n\n    // iterate over all the blog posts loaded from our API\n    let posts = this.state.posts.map((post) =\u003e {\n      return (\n        \u003cdiv className=\"panel panel-default\" key={post.id}\u003e\n          \u003cdiv className=\"panel-heading\"\u003e\n            \u003ch3 className=\"panel-title\"\u003e{post.title}\u003c/h3\u003e\n          \u003c/div\u003e\n          \u003cdiv className=\"panel-body\"\u003e\n            {post.body}\n          \u003c/div\u003e\n        \u003c/div\u003e\n      )\n\n    // render the posts\n    return (\n      \u003cdiv\u003e\n        {posts}\n      \u003c/div\u003e\n    )\n  }   \n}\n```\n\n#### CoffeeScript\n```coffeescript\nclass BlogPosts extends DeliveryService\n\n  constructor: (props) -\u003e\n    super props\n    # create a new Store which connected to an API at /posts\n    @postStore = new Store 'posts'\n\n\n  # override bindResources to load all the resources needed for this component\n  bindResources: (props) -\u003e\n    # retrieve all the posts from the Post Store\n    @retrieveAll @postStore\n\n\n  render: -\u003e\n    # show a loading message while loading data\n    return \u003cspan\u003eLoading...\u003c/span\u003e unless @state.loaded\n\n    # iterate over all the blog posts loaded from our API\n    posts = for post in @state.posts\n      \u003cdiv className=\"panel panel-default\" key={post.id}\u003e\n        \u003cdiv className=\"panel-heading\"\u003e\n          \u003ch3 className=\"panel-title\"\u003e{post.title}\u003c/h3\u003e\n        \u003c/div\u003e\n        \u003cdiv className=\"panel-body\"\u003e\n          {post.body}\n        \u003c/div\u003e\n      \u003c/div\u003e\n\n    # render the posts\n    \u003cdiv\u003e\n      {posts}\n    \u003c/div\u003e\n```\n\nOr to load a single resource:\n\n#### ES6\n```es6\nclass BlogPost extends DeliveryService {\n\n  constructor(props) {\n    super(props);\n    // create a new Store which connected to an API at /posts\n    this.postStore = new Store('posts');\n  }\n\n  // override bindResources to load all the resources needed for this component\n  bindResources(props) {\n    // retrieve the post from the Post Store by id\n    this.retrieveResource({this.postStore, id: this.props.postId});\n  }\n\n  render() {\n    // show a loading message while loading data\n    if !this.state.loaded\n      return (\u003cspan\u003eLoading...\u003c/span\u003e )\n\n    // render the post\n    return (\n      \u003cdiv\u003e\n        \u003cdiv className=\"panel panel-default\"\u003e\n          \u003cdiv className=\"panel-heading\"\u003e\n            \u003ch3 className=\"panel-title\"\u003e{this.state.post.title}\u003c/h3\u003e\n          \u003c/div\u003e\n          \u003cdiv className=\"panel-body\"\u003e\n            {this.state.post.body}\n          \u003c/div\u003e\n        \u003c/div\u003e\n      \u003c/div\u003e\n    )\n  }\n}\n```\n\n#### CoffeeScript\n```coffeescript\nclass BlogPost extends DeliveryService\n\n  constructor: (props) -\u003e\n    super props\n    # create a new Store which connected to an API at /posts\n    @postStore = new Store 'posts'\n\n\n  # override bindResources to load all the resources needed for this component\n  bindResources: (props) -\u003e\n    # retrieve the post from the Post Store by id\n    @retrieveResource @postStore, id: @props.postId\n\n\n  render: -\u003e\n    # show a loading message while loading data\n    return \u003cspan\u003eLoading...\u003c/span\u003e unless @state.loaded\n\n    # render the post\n    \u003cdiv\u003e\n      \u003cdiv className=\"panel panel-default\"\u003e\n        \u003cdiv className=\"panel-heading\"\u003e\n          \u003ch3 className=\"panel-title\"\u003e{@state.post.title}\u003c/h3\u003e\n        \u003c/div\u003e\n        \u003cdiv className=\"panel-body\"\u003e\n          {@state.post.body}\n        \u003c/div\u003e\n      \u003c/div\u003e\n    \u003c/div\u003e\n```\n\nDeliveryService can load multiple resources in `bindResources`. Simply execute additional `subscribeAll`, `subscribeResource`, `retrieveAll` or `retrieveResource` methods.\n\n## Creating and updating resources\n\n`RestForm` takes care of rendering create/edit forms and submitting to the API.\n\n#### ES6\n```es6\nclass BlogPostForm extends RestForm {\n\n  //build your form using Reactified versions of regular HTML form elements\n  render() {\n    return (\n      \u003cform onSubmit={this.handleSubmit} className=\"form-horizontal\"\u003e\n        \u003cForms.TextAreaInput {...this.getFieldProps('body')}\n          labelClassName='col-sm-4'\n          inputWrapperClassName='col-sm-8'/\u003e\n        \u003cForms.TextInput {...this.getFieldProps('author')}\n          labelClassName='col-sm-4'\n          inputWrapperClassName='col-sm-8'/\u003e\n        \u003cdiv className='text-right'\u003e\n          \u003cbutton className='btn btn-primary'\u003eCreate Post\u003c/button\u003e\n        \u003c/div\u003e\n      \u003c/form\u003e\n    )\n  }\n}\n```\n\n#### CoffeeScript\n```coffeescript\nclass BlogPostForm extends RestForm\n\n  # build your form using Reactified versions of regular HTML form elements\n  render: -\u003e\n    \u003cform onSubmit={@handleSubmit} className=\"form-horizontal\"\u003e\n      \u003cForms.TextAreaInput {...@getFieldProps('body')}\n        labelClassName='col-sm-4'\n        inputWrapperClassName='col-sm-8'/\u003e\n      \u003cForms.TextInput {...@getFieldProps('author')}\n        labelClassName='col-sm-4'\n        inputWrapperClassName='col-sm-8'/\u003e\n      \u003cdiv className='text-right'\u003e\n        \u003cbutton className='btn btn-primary'\u003eCreate Post\u003c/button\u003e\n      \u003c/div\u003e\n    \u003c/form\u003e\n```\n\nThen render your form component with either a blank model, or one retrieved from the API\n\n#### ES6\n```es6\n// in \u003cBlogPosts /\u003e component\n\u003cBlogPostForm model={{}} store={this.postStore} /\u003e\n\n// or to edit a blog posted loaded in a DeliveryService subclass\n\u003cBlogPostForm model={this.state.post} store={this.postStore} /\u003e\n```\n\n#### CoffeeScript\n```coffeescript\n# in \u003cBlogPosts /\u003e component\n\u003cBlogPostForm model={{}} store={@postStore} /\u003e\n\n# or to edit a blog posted loaded in a DeliveryService subclass\n\u003cBlogPostForm model={@state.post} store={@postStore} /\u003e\n```\n\n# Credits\nReact-at-Rest was developed by the team at [Payload](payload.net) and maintained by [Ben Sargent](https://github.com/fortybillion).\n\nEvent code from the [Backbone project](https://github.com/jashkenas/backbone).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpayloaddev%2Freact-at-rest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpayloaddev%2Freact-at-rest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpayloaddev%2Freact-at-rest/lists"}