{"repo":"radioactive-labs/flow_chat","free":true,"listed":false,"github":"https://github.com/radioactive-labs/flow_chat","clone":"git clone https://github.com/radioactive-labs/flow_chat.git","description":"Rails Framework for building conversational interfaces on USSD and WhatsApp with interactive flows","language":"Ruby","stars":24,"topics":["chatbot","rails","ussd","ussd-menu-builder","telegram-bot","whatsapp"],"license":"MIT","category":"chat-messaging","readme_excerpt":"FlowChat Write a conversation as an ordinary Ruby method. FlowChat runs it across stateless webhooks, on every messaging channel. A USSD or chat webhook is stateless: each message arrives as an isolated POST with no memory of the ones before it. The usual answer is a hand-rolled state machine: persist the current step, switch on it when the next message comes in, run the transition, persist the next step, repeat. FlowChat replaces that machine with a session and a replay engine, so you write the flow as a synchronous script that reads top to bottom. Each screen returns its stored answer when one exists and re-prompts when it does not. The method runs top to bottom on every turn and blocks on the first screen that has no answer yet. The same flow runs unchanged on USSD, WhatsApp, Messenger, Instagram, Telegram, and HTTP, with per-platform rendering. How the replay engine works There is no saved program counter. On each webhook FlowChat rebuilds the app from the request and re-runs your flow method from the first line. app.screen(key) is the fast-forward mechanism. When the session already holds a value for key , screen returns session.get(key) immediately and never yields. When it does not, screen yields a FlowChat::Prompt . If that prompt calls ask (or select , yes? ) and no input is available yet, it raises FlowChat::Interrupt::Prompt . The interrupt unwinds the flow back to the Executor, which turns it into a rendered prompt and returns the response to the gateway. The next","default_branch":null,"files":null,"tree":[],"storefront":"/r/radioactive-labs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/radioactive-labs/flow_chat/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}