{"id":21822683,"url":"https://github.com/unirakun/k-ramel","last_synced_at":"2025-04-14T03:52:52.671Z","repository":{"id":28250535,"uuid":"117885088","full_name":"unirakun/k-ramel","owner":"unirakun","description":"State manager for your components apps, the safe and easy way","archived":false,"fork":false,"pushed_at":"2022-10-05T23:05:50.000Z","size":5773,"stargazers_count":21,"open_issues_count":44,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T17:51:56.025Z","etag":null,"topics":["async","drivers","hot","listeners","nantes","reactions","redux","side-effects","state","state-management","thunk"],"latest_commit_sha":null,"homepage":"","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/unirakun.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}},"created_at":"2018-01-17T19:50:21.000Z","updated_at":"2022-06-09T15:23:38.000Z","dependencies_parsed_at":"2022-07-27T13:17:58.889Z","dependency_job_id":null,"html_url":"https://github.com/unirakun/k-ramel","commit_stats":null,"previous_names":["alakarteio/k-ramel"],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unirakun%2Fk-ramel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unirakun%2Fk-ramel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unirakun%2Fk-ramel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unirakun%2Fk-ramel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unirakun","download_url":"https://codeload.github.com/unirakun/k-ramel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248819359,"owners_count":21166474,"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":["async","drivers","hot","listeners","nantes","reactions","redux","side-effects","state","state-management","thunk"],"created_at":"2024-11-27T17:16:51.356Z","updated_at":"2025-04-14T03:52:52.646Z","avatar_url":"https://github.com/unirakun.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# k-ramel\n\nState manager for your app components, the safe and easy way.\n\n[![CircleCI](https://circleci.com/gh/unirakun/k-ramel.svg?style=shield)](https://circleci.com/gh/unirakun/k-ramel) [![Coverage Status](https://coveralls.io/repos/github/unirakun/k-ramel/badge.svg?branch=master)](https://coveralls.io/github/unirakun/k-ramel?branch=master) [![NPM Version](https://badge.fury.io/js/k-ramel.svg)](https://www.npmjs.com/package/k-ramel) [![Greenkeeper badge](https://badges.greenkeeper.io/unirakun/k-ramel.svg)](https://greenkeeper.io/)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"packages/k-ramel/doc/logo.png\" width=\"400\" /\u003e\n\u003c/p\u003e\n\n## Why should you give it a try? 🤔\nBecause `k-ramel`:\n - ⚡️ is fast\n - 📸 is immutable\n - 📦 is [modular](#modules)\n - 💎 encourages to decouple UI and state management\n - 💥 encourages to not have side effect into your business logic\n - 👌 has a [light bundle size](https://bundlephobia.com/result?p=k-ramel) footprint\n - 🐛 works with redux-dev-tools\n\n## Table of content\n- [🚚 Migrating](https://github.com/unirakun/k-ramel#migrating)\n- [📦 Modules and libs](https://github.com/unirakun/k-ramel#modules-and-libs)\n- [🎉 Getting started](https://github.com/unirakun/k-ramel#getting-started)\n- [📝 Ecosystem and documentation](https://github.com/unirakun/k-ramel#ecosystem)\n- [📚 Examples](https://github.com/unirakun/k-ramel#examples)\n- [💜 Contributors](https://github.com/unirakun/k-ramel#contributors)\n- [💪 Known users](https://github.com/unirakun/k-ramel#known-users)\n\n\n## Migrating\nHey! If you come from an early version of k-ramel and want to upgrade, you can read this [migration guide](./MIGRATION.md) 💎\n\n## Modules and libs\n| packages | description | documentation | gziped size |\n| -- | -- | -- | -- |\n| [`k-ramel`](./packages/k-ramel) | core package | [documentation](./packages/k-ramel) | [![Size](https://img.badgesize.io/unirakun/k-ramel/master/packages/k-ramel/dist/index.es.js.svg?compression=gzip)]() |\n| [`@k-ramel/react`](./packages/connectors/react) | ReactJS connector | [documentation](./packages/connectors/react) | [![Size](https://img.badgesize.io/unirakun/k-ramel/master/packages/connectors/react/dist/index.es.js.svg?compression=gzip)]() |\n| [`@k-ramel/driver-http`](./packages/drivers/http) | fetch wrapper | [documentation](./packages/drivers/http) | [![Size](https://img.badgesize.io/unirakun/k-ramel/master/packages/drivers/http/dist/index.es.js.svg?compression=gzip)]() |\n| [`@k-ramel/driver-form`](./packages/drivers/form) | minimalist form handler | [documentation](./packages/drivers/form) | [![Size](https://img.badgesize.io/unirakun/k-ramel/master/packages/drivers/form/dist/index.es.js.svg?compression=gzip)]() |\n| [`@k-ramel/driver-redux-form`](./packages/drivers/redux-form) | redux-form  wrapper | [documentation](./packages/drivers/redux-form) | [![Size](https://img.badgesize.io/unirakun/k-ramel/master/packages/drivers/redux-form/dist/index.es.js.svg?compression=gzip)]() |\n| [`k-redux-router`](https://github.com/unirakun/k-redux-router) | Redux router (one route === one code) | [documentation](https://github.com/unirakun/k-redux-router) | | |\n\n⚠️Note that some packages have dependencies:\n - @k-ramel/driver-http: `regeneratorRuntime`\n - @k-ramel/driver-redux-form: `regeneratorRuntime`\n\n## [Getting started](https://github.com/unirakun/k-ramel/tree/master/GETTING_STARTED.md)\n[This getting started](https://github.com/unirakun/k-ramel/tree/master/GETTING_STARTED.md) helps you to understand how to do things like that!\n```js\nconst listeners = [\n  // when the user clicked on \"add a todo\" button\n  // we ask the API to add a new todo (the title is hardcoded for simplicity here)\n  when('@@ui/ADD_TODO\u003eCLICKED')((action, store, drivers) =\u003e {\n    drivers.http('TODO').post(\n      'https://todo-backend-modern-js.herokuapp.com/todos',\n      {\n        title: 'Yo! I am a new todo!',\n      },\n    )\n  }),\n  // when the API responds (not in error),\n  // we add the new todo returned by the API in the store\n  when('@@http/TODO\u003ePOST\u003eENDED')((action, store) =\u003e {\n    store.todos.add(action.payload)\n  }),\n  // when a new todo is added to the store\n  // we log a message :)\n  when('@@krf/ADD\u003eTODOS')(() =\u003e {\n    console.log('A todo is added!')\n  }),\n]\n```\n\n## Ecosystem\nYou can pick some modules based on your usage, or even write your own.\n\\\nThe modules that are supported by k-ramel are [listed here](#modules-and-libs).\n\\\nWe add modules when we need them but feel free to open PR if you want to add your own.\n\nModules can be :\n - **connectors**, used to connect your business logic (and your data) to your UI. We only have a ReactJS connector at the moment.\n - **drivers**, used to do some side effects (http, window, history, etc) or share some logic, besides your business logic.\n\n## How to use k-ramel\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"packages/k-ramel/doc/graph.png\" width=\"800\" /\u003e\n\u003c/p\u003e\n\n`k-ramel` is a data store that allows you to `listen` to `event` and then `react` to it.\nIn a `reaction` you can access:\n - the outside world via `drivers`, this is where you put your side effects, like HTTP calls\n - your data, via `store`\n\nThen if you connect an UI to k-ramel, via connectors, it can be refreshed each time the `store` is updated.\n\nYou can find documentation about each part of `k-ramel` there:\n - [store](./packages/k-ramel/doc/STORE.md)\n - [listeners](./packages/k-ramel/doc/LISTENERS.md)\n - [reactions](./packages/k-ramel/doc/REACTIONS.md)\n - [drivers](./packages/k-ramel/doc/DRIVERS.md)\n\n## Examples\n - Our own [todo-mvc](./examples/todomvc)\n - [conference-hall](https://github.com/bpetetot/conference-hall) from **[@bpetetot](https://github.com/bpetetot)**\n - [k-mille](https://github.com/unirakun/k-mille/), our personal assistant **[@unirakun](https://github.com/unirakun)**\n\n# Contributors\n - Fabien JUIF [[@fabienjuif](https://github.com/fabienjuif)]\n - Guillaume CRESPEL [[@guillaumecrespel](https://github.com/guillaumecrespel)]\n - Benjamin PETETOT [[@bpetetot](https://github.com/bpetetot)]\n - Valentin COCAUD [[@EmrysMyrddin](https://github.com/EmrysMyrddin)]\n - Yvonnick FRIN [[@frinyvonnick](https://github.com/frinyvonnick)]\n - Delphine MILLET [[@delphinemillet](https://github.com/delphinemillet)]\n - Benjamin PLOUZENNEC [[@Okazari](https://github.com/Okazari)]\n - Benjamin PLOUZENNEC [[@Okazari](https://github.com/Okazari)]\n - Corinne KRYCH [@corinnekrych](https://github.com/corinnekrych)\n - Arthur FAUGERAS [@AFaugeras](https://github.com/AFaugeras)\n\n# Known users\n - [sparklane](https://www.sparklane-group.com) - B2B Predictive lead scoring _[closed source]_\n - [metroscope](http://metroscope.tech/) - AI diagnosis for targeted maintenance _[closed source]_\n - [conference-hall](https://github.com/bpetetot/conference-hall) - A call for paper project _[open source]_\n - [k-mille](https://github.com/unirakun/k-mille/) - uni rakun assistant _[open source]_\n\n# Deprecated modules\n| packages | description | documentation | last version | why |\n| -- | -- | -- | -- | -- |\n| [`@k-ramel/driver-redux-little-router`](https://github.com/unirakun/k-ramel/tree/v1.3.1/packages/drivers/redux-little-router) | redux-little-router wrapper | [documentation](https://github.com/unirakun/k-ramel/tree/v1.3.1/packages/drivers/redux-little-router) | 1.2.0 | [redux-little-router is deprecated](https://github.com/FormidableLabs/redux-little-router) |\n\n# About [uni rakun](https://unirakun.fr)\n**uni rakun** is created by two passionate french developers.\n\nDo you want to contact them? Go to their [website](https://unirakun.fr)\n\n\u003ctable border=\"0\"\u003e\n \u003ctr\u003e\n  \u003ctd align=\"center\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/26094222?s=460\u0026v=4\" width=\"100\" /\u003e\u003c/td\u003e\n  \u003ctd align=\"center\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/17828231?s=460\u0026v=4\" width=\"100\" /\u003e\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n  \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/guillaumecrespel\"\u003eGuillaume CRESPEL\u003c/a\u003e\u003c/td\u003e\n  \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/fabienjuif\"\u003eFabien JUIF\u003c/a\u003e\u003c/td\u003e\n\u003c/table\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funirakun%2Fk-ramel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funirakun%2Fk-ramel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funirakun%2Fk-ramel/lists"}