{"id":21286678,"url":"https://github.com/leesiongchan/botstream","last_synced_at":"2025-03-15T15:21:09.854Z","repository":{"id":81847933,"uuid":"208929591","full_name":"leesiongchan/botstream","owner":"leesiongchan","description":"fb messenger + rxjs + xstate = botstream","archived":false,"fork":false,"pushed_at":"2020-07-18T09:45:06.000Z","size":114,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-15T08:12:16.699Z","etag":null,"topics":["chatbot","facebook-messenger-bot","observable","rxjs"],"latest_commit_sha":null,"homepage":null,"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/leesiongchan.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":"2019-09-17T01:14:17.000Z","updated_at":"2020-07-18T09:52:44.000Z","dependencies_parsed_at":"2023-03-12T14:14:35.339Z","dependency_job_id":null,"html_url":"https://github.com/leesiongchan/botstream","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":0.09090909090909094,"last_synced_commit":"63f9827f14ac391d5ce279d7f1493cb9b10bb64b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leesiongchan%2Fbotstream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leesiongchan%2Fbotstream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leesiongchan%2Fbotstream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leesiongchan%2Fbotstream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leesiongchan","download_url":"https://codeload.github.com/leesiongchan/botstream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243701469,"owners_count":20333631,"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":["chatbot","facebook-messenger-bot","observable","rxjs"],"created_at":"2024-11-21T11:31:03.815Z","updated_at":"2025-03-15T15:21:09.833Z","avatar_url":"https://github.com/leesiongchan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# botstream\n\nFacebook Messenger + RxJS + xstate = botstream (POC)\n\n## Motivation\n\nWIP\n\n## Usage\n\n```javascript\nimport botstream, { messageEvent$ } from '@leesiongchan/botstream';\n\nconst bot = botstream({\n    facebookAccessToken: '1234',\n    facebookApiVersion: 'v4', // Optional, default = 'v4'\n    facebookVerifyToken: '2345',\n    port: 3000,\n});\n\nconst echoConvo$ = messageEvent$.pipe(say(ev =\u003e `Echo: ${ev.message.text}`));\nconst helloConvo$ = event$.pipe(\n    hears(['hello'], 'message'),\n    say('Ok, hello! How can I help you?'),\n);\n\nbot.loadSkills(echoConvo$, helloConvo$);\n```\n\n## APIs\n\n### botstream\n\n-   `botstream(config: BotstreamConfig)`\n-   `loadSkills(skills: Observable[]): void`\n-   `server`\n    A Fastify server.\n\n### Observables\n\n-   `event$`\n-   `eventReplay$`\n-   `messageEvent$`\n-   `postbackEvent$`\n\n### Operators\n\n-   `ask`\n-   `hears`\n-   `say`\n-   `sendButtonTemplate`\n-   `sendGenericTemplate`\n-   `sendQuickReplies`\n-   `showSenderAction`\n\n## TODO\n\n-   [ ] xstate Integration\n-   [ ] Support multiple channels?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleesiongchan%2Fbotstream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleesiongchan%2Fbotstream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleesiongchan%2Fbotstream/lists"}