{"id":13495298,"url":"https://github.com/maxchehab/phelia","last_synced_at":"2025-05-15T08:07:52.477Z","repository":{"id":42896196,"uuid":"253400602","full_name":"maxchehab/phelia","owner":"maxchehab","description":"⚡ A reactive Slack application framework.","archived":false,"fork":false,"pushed_at":"2023-01-06T02:53:01.000Z","size":27159,"stargazers_count":1911,"open_issues_count":23,"forks_count":44,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-14T15:00:54.669Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://npmjs.com/phelia","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/maxchehab.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":"2020-04-06T05:09:59.000Z","updated_at":"2025-02-13T09:13:53.000Z","dependencies_parsed_at":"2023-02-05T04:01:24.992Z","dependency_job_id":null,"html_url":"https://github.com/maxchehab/phelia","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxchehab%2Fphelia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxchehab%2Fphelia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxchehab%2Fphelia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxchehab%2Fphelia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxchehab","download_url":"https://codeload.github.com/maxchehab/phelia/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254301263,"owners_count":22047888,"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":[],"created_at":"2024-07-31T19:01:33.276Z","updated_at":"2025-05-15T08:07:52.406Z","avatar_url":"https://github.com/maxchehab.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Chatbot","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/maxchehab/phelia/master/screenshots/hero.gif\"\u003e\n\u003c/p\u003e\n\n# ⚡ Phelia\n\n\u003e React for Slack Apps\n\nBuild interactive Slack apps without webhooks or JSON headache. If you know React, you know how to make a Slack app.\n\n# Quick start\n\n1. Create your message with React:\n\n   ```tsx\n   import randomImage from \"../utils\";\n\n   export function RandomImage({ useState }: PheliaMessageProps) {\n     const [imageUrl, setImageUrl] = useState(\"imageUrl\", randomImage());\n\n     return (\n       \u003cMessage text=\"Choose a dog\"\u003e\n         \u003cImageBlock\n           title=\"an adorable :dog:\"\n           alt=\"a very adorable doggy dog\"\n           imageUrl={imageUrl}\n           emoji\n         /\u003e\n         \u003cDivider /\u003e\n         \u003cActions\u003e\n           \u003cButton\n             style=\"primary\"\n             action=\"randomImage\"\n             onClick={() =\u003e setImageUrl(randomImage())}\n           \u003e\n             New doggy\n           \u003c/Button\u003e\n         \u003c/Actions\u003e\n       \u003c/Message\u003e\n     );\n   }\n   ```\n\n2. Register your component\n\n   ```ts\n   const client = new Phelia(process.env.SLACK_TOKEN);\n\n   app.post(\n     \"/interactions\",\n     client.messageHandler(process.env.SLACK_SIGNING_SECRET, [RandomImage])\n   );\n\n   client.postMessage(RandomImage, \"@max\");\n   ```\n\n3. Interact with your message:\n   \u003cp align=\"left\"\u003e\n     \u003cimg src=\"https://raw.githubusercontent.com/maxchehab/phelia/master/screenshots/doggies.gif\"\u003e\n   \u003c/p\u003e\n\nSee: [docs](https://github.com/maxchehab/phelia/blob/master/docs) for more info or join our [community Slack](https://join.slack.com/t/phelia/shared_invite/zt-dm4ln2w5-6aOXvv5ewiifDJGsplcVjA).\n\n# How this works\n\nPhelia transforms React components into Slack messages by use of a custom [React reconciler](https://github.com/maxchehab/phelia/blob/master/src/core/reconciler.ts). Components (with their internal state and props) are serialized into a [custom storage](https://github.com/maxchehab/phelia/wiki/Documentation#custom-storage). When a user interacts with a posted message Phelia retrieves the component, re-hydrates it's state and props, and performs any actions which may result in a new state.\n\n## Components\n\nEach component is a mapping of a specific object type for a slack block.\nThere are 3 categories of components, each with special rules for how that component can be used with other components.\n\n1. Surface Components (Message, Home, Modal) - Root components that contains Block Components\n2. Block Components (Actions, Context, Divider, Image, Input, Section) - Direct descendants of a Surface Component. Contains Block Components\n3. Block Element Components (Text, CheckBoxes, TextField, etc) - Direct descendants of a Block Components.\n\n# Feature Support\n\nTo request a feature [submit a new issue](https://github.com/maxchehab/phelia/issues/new).\n| Component | | Example |\n| ---------------------------------------------------------------------------------------------------------------------- | --- | ---------------------------------------------------------------------------------------------------------------------------------- |\n| [Actions](https://api.slack.com/reference/block-kit/blocks#actions) | ✅ | [Counter](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/counter.tsx) |\n| [Button](https://api.slack.com/reference/block-kit/block-elements#button) | ✅ | [Counter](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/counter.tsx) |\n| [Channel Select Menus](https://api.slack.com/reference/block-kit/block-elements#channels_select) | ✅ | [Channel Select Menu](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/channels-select-menu.tsx) |\n| [Checkboxes](https://api.slack.com/reference/block-kit/block-elements#checkboxes) | ✅ | [Modal Example](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/modal-example.tsx) |\n| [Confirmation dialog](https://api.slack.com/reference/block-kit/composition-objects#confirm) | ✅ | [Random Image](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/random-image.tsx) |\n| [Context](https://api.slack.com/reference/block-kit/blocks#context) | ✅ |\n| [Conversation Select Menus](https://api.slack.com/reference/block-kit/block-elements#conversations_select) | ✅ | [Conversation Select Menu](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/conversations-select-menu.tsx) |\n| [Date Picker](https://api.slack.com/reference/block-kit/block-elements#datepicker) | ✅ | [Birthday Picker](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/birthday-picker.tsx) |\n| [Divider](https://api.slack.com/reference/block-kit/blocks#divider) | ✅ | [Random Image](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/random-image.tsx) |\n| [External Select Menus](https://api.slack.com/reference/block-kit/block-elements#external_select) | ✅ | [External Select Menu](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/external-select-menu.tsx) |\n| [Home Tab](https://api.slack.com/surfaces/tabs) | ✅ | [Home App Example](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/home-app.tsx) |\n| [Image Block](https://api.slack.com/reference/block-kit/blocks#image) | ✅ | [Random Image](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/random-image.tsx) |\n| [Image](https://api.slack.com/reference/block-kit/block-elements#image) | ✅ | [Random Image](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/random-image.tsx) |\n| [Input](https://api.slack.com/reference/block-kit/blocks#input) | ✅ | [Modal Example](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/modal-example.tsx) |\n| [Messages](https://api.slack.com/surfaces/messages) | ✅ | [Server](https://github.com/maxchehab/phelia/blob/master/src/example/server.ts) |\n| [Modals](https://api.slack.com/surfaces/modals) | ✅ | [Modal Example](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/modal-example.tsx) |\n| [Multi channels select Menu](https://api.slack.com/reference/block-kit/block-elements#multi_channels_select) | ✅ | [Multi Channels Select Menu](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/multi-channels-select-menu.tsx) |\n| [Multi conversations select Menu](https://api.slack.com/reference/block-kit/block-elements#multi_conversations_select) | ✅ | [Multi Conversations Select Menu](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/multi-conversations-select-menu.tsx) |\n| [Multi external select Menu](https://api.slack.com/reference/block-kit/block-elements#multi_external_select) | ✅ | [Multi External Select Menu](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/multi-external-select-menu.tsx) |\n| [Multi static select Menu](https://api.slack.com/reference/block-kit/block-elements#multi_select) | ✅ | [Multi Static Select Menu](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/multi-static-select-menu.tsx) |\n| [Multi users select Menu](https://api.slack.com/reference/block-kit/block-elements#multi_users_select) | ✅ | [Multi Users Select Menu](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/multi-users-select-menu.tsx) |\n| [Option group](https://api.slack.com/reference/block-kit/composition-objects#option_group) | ✅ | [Static Select Menu](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/static-select-menu.tsx) |\n| [Option](https://api.slack.com/reference/block-kit/composition-objects#option) | ✅ |\n| [Overflow Menu](https://api.slack.com/reference/block-kit/block-elements#overflow) | ✅ | [Overflow Menu](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/overflow-menu.tsx) |\n| [Plain-text input](https://api.slack.com/reference/block-kit/block-elements#input) | ✅ | [Modal Example](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/modal-example.tsx) |\n| [Radio button group](https://api.slack.com/reference/block-kit/block-elements#radio) | ✅ | [Radio Buttons](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/radio-buttons.tsx) |\n| [Section](https://api.slack.com/reference/block-kit/blocks#section) | ✅ | [Counter](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/counter.tsx) |\n| [Static Select Menus](https://api.slack.com/reference/block-kit/block-elements#static_select) | ✅ | [Static Select Menu](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/static-select-menu.tsx) |\n| [Text](https://api.slack.com/reference/block-kit/composition-objects#text) | ✅ | [Counter](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/counter.tsx) |\n| [Text](https://api.slack.com/reference/block-kit/composition-objects#text) | ✅ | [Random Image](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/random-image.tsx) |\n| [User Select Menus](https://api.slack.com/reference/block-kit/block-elements#users_select) | ✅ | [User Select Menu](https://github.com/maxchehab/phelia/blob/master/src/example/example-messages/users-select-menu.tsx) |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxchehab%2Fphelia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxchehab%2Fphelia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxchehab%2Fphelia/lists"}