{"id":13422391,"url":"https://github.com/cerebral/cerebral","last_synced_at":"2025-05-13T00:04:53.961Z","repository":{"id":31760224,"uuid":"35326416","full_name":"cerebral/cerebral","owner":"cerebral","description":"Declarative state and side effects management for popular JavaScript frameworks","archived":false,"fork":false,"pushed_at":"2025-05-01T15:17:35.000Z","size":15186,"stargazers_count":1998,"open_issues_count":1,"forks_count":124,"subscribers_count":44,"default_branch":"next","last_synced_at":"2025-05-09T15:06:26.387Z","etag":null,"topics":["cerebral","controller","debugger","firebase","function-tree","inferno","javascript","monorepo","npm-module","react","state-management"],"latest_commit_sha":null,"homepage":"http://cerebraljs.com","language":"JavaScript","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/cerebral.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-05-09T11:40:05.000Z","updated_at":"2025-05-08T06:12:50.000Z","dependencies_parsed_at":"2022-08-08T22:15:16.671Z","dependency_job_id":"a6041c90-aff0-4dc1-b4b9-67189d3cf3f7","html_url":"https://github.com/cerebral/cerebral","commit_stats":{"total_commits":2145,"total_committers":91,"mean_commits":"23.571428571428573","dds":"0.47832167832167827","last_synced_commit":"a16df066ee9428ac15679cee85fe2c2674d66412"},"previous_names":[],"tags_count":137,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerebral%2Fcerebral","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerebral%2Fcerebral/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerebral%2Fcerebral/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerebral%2Fcerebral/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cerebral","download_url":"https://codeload.github.com/cerebral/cerebral/tar.gz/refs/heads/next","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253411566,"owners_count":21904151,"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":["cerebral","controller","debugger","firebase","function-tree","inferno","javascript","monorepo","npm-module","react","state-management"],"created_at":"2024-07-30T23:00:43.625Z","updated_at":"2025-05-13T00:04:53.912Z","avatar_url":"https://github.com/cerebral.png","language":"JavaScript","readme":"# Cerebral\n\nA declarative state and side effects management solution for popular JavaScript frameworks\n\n[![NPM version][npm-image]][npm-url]\n[![Commitizen friendly][commitizen-image]][commitizen-url]\n[![Discord][discord-image]][discord-url]\n![Cerebral Logo](images/logo.png)\n\n## Project Status\n\nCerebral 5.3 is the latest release, bringing modern API patterns and significant improvements:\n\n- Supports full type safety in your application\n- Updated integrations for the latest view libraries (React, Vue, etc.)\n- Compatibility with modern lint, build and publish tools\n- Updated documentation\n- Bug fixes and performance improvements\n\nThe project is currently in maintenance mode. We accept PRs and Issues for bug fixes.\nWhile we're not actively developing new features, if you have a reasonable feature request,\nplease create an issue. If we agree that the request adds value and it receives community\nsupport (indicated by thumbs up), we may consider implementing it.\n\n## Framework Support\n\nCerebral works seamlessly with all major frontend frameworks:\n\n- **React**: Compatible with React 16.3 through React 19\n- **Vue**: Full support for Vue 3, with backward compatibility for Vue 2.6+\n- **Preact**: Works with Preact X (v10+) and older v8\n- **Inferno**: Supports v4 through v9\n- **Angular**: Compatible with Angular 14 through 19\n\n## Getting Started\n\n### Installation\n\n```sh\n# Using npm\nnpm install cerebral\n\n# Using yarn\nyarn add cerebral\n\n# Using pnpm\npnpm add cerebral\n```\n\n### Basic Example (React)\n\n```jsx\nimport React from 'react'\nimport { createApp } from 'cerebral'\nimport { Container, connect } from '@cerebral/react'\nimport { state, sequences } from 'cerebral'\n\n// Create an action\nconst increment = ({ store, get }) =\u003e {\n  // Use 'store' to update state\n  store.set(state`count`, get(state`count`) + 1)\n}\n\n// Create app with state and sequences\nconst app = createApp({\n  state: {\n    count: 0\n  },\n  sequences: {\n    increment: [increment]\n  }\n})\n\n// Connect component to Cerebral\nconst Counter = connect(\n  {\n    count: state`count`,\n    increment: sequences`increment`\n  },\n  function Counter({ count, increment }) {\n    return (\n      \u003cdiv\u003e\n        \u003ch1\u003eCount: {count}\u003c/h1\u003e\n        \u003cbutton onClick={() =\u003e increment()}\u003eIncrement\u003c/button\u003e\n      \u003c/div\u003e\n    )\n  }\n)\n\n// Provide the app to your component tree\nconst App = () =\u003e (\n  \u003cContainer app={app}\u003e\n    \u003cCounter /\u003e\n  \u003c/Container\u003e\n)\n```\n\nFor more detailed examples, check the documentation. If you prefer the proxy syntax (`state.count` instead of `` state`count` ``), see our [proxy documentation](http://www.cerebraljs.com/docs/api/proxy.html).\n\n## Documentation\n\nYou can find the Cerebral documentation at [cerebraljs.com](http://www.cerebraljs.com/).\n\n## Contribute\n\nCerebral is organized as a monorepo to make contributions easier:\n\n1. Clone the repo: `git clone https://github.com/cerebral/cerebral.git`\n2. Install dependencies: `npm install` (from the root folder)\n\nYou don't need to run `npm install` in each package directory - the monorepo setup handles this for you.\n\n### Testing\n\nRun all tests from the root directory:\n\n```sh\nnpm test\n```\n\nOr run tests for a specific package:\n\n```sh\n# Navigate to the package\ncd packages/cerebral\n\n# Run tests for just this package\nnpm test\n```\n\n### Making Changes\n\n1. Create a branch for your changes\n2. Make your code changes and add tests\n3. Commit from the root using our guided format:\n\n   ```sh\n   npm run commit\n   ```\n\n4. Push your branch and create a pull request on GitHub\n\n### Using the monorepo for development\n\nIf you want to use your local Cerebral code in your own project, you can create symlinks to the packages:\n\n```sh\n# From your project root\nln -s ../../cerebral/packages/node_modules/cerebral/ node_modules/\nln -s ../../cerebral/packages/node_modules/@cerebral/ node_modules/\n```\n\nRemember to remove these links before installing from npm:\n\n```sh\nunlink node_modules/cerebral\nunlink node_modules/@cerebral\n```\n\n### Release process\n\n- Review and merge PRs into `next` branch. It is safe to use \"Update branch\",\n  the commit created by Github will not be part of `next` history\n- From command line:\n\n```bash\ngit switch next\ngit pull\nnpm install      # make sure any new dependencies are installed\nnpm run release -- --dry-run --print-release  # and check release notes\ngit switch master\ngit pull\ngit merge --ff-only next\ngit push\n```\n\n[npm-image]: https://img.shields.io/npm/v/cerebral.svg?style=flat\n[npm-url]: https://npmjs.org/package/cerebral\n[commitizen-image]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat\n[commitizen-url]: http://commitizen.github.io/cz-cli/\n[discord-image]: https://img.shields.io/badge/discord-join%20chat-blue.svg?style=flat\n[discord-url]: https://discord.gg/0kIweV4bd2bwwsvH\n","funding_links":[],"categories":["Code Design","JavaScript","react","firebase","List"],"sub_categories":["Data Store"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcerebral%2Fcerebral","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcerebral%2Fcerebral","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcerebral%2Fcerebral/lists"}