官方套件 · 自動化與基礎架構

即時頁面、上線狀態與審批的 Bubble 外掛

在 Bubble 頁面放一個 Hibira Channel 元素,工作流程一發布事件,頁面就立即更新:不用重新整理、不用輪詢,也不用設定 API Connector。presence 頻道顯示誰在線上,審批則讓人在工作流程繼續之前做決定。

  • 訂單與工單即時追蹤:工作流程發布 order-updated,所有開著的狀態頁面同時更新。
  • 聊天與協作:presence 頻道列出線上的人,用戶端事件顯示誰正在輸入。
  • 審批:超過額度的退款會等待,直到主管在連結上點「核准」或「拒絕」。
  • 私人與 presence 頻道在一般工作流程裡用 Current User 授權,所以所有 Bubble 方案都能用。

登入後,範例程式碼會自動帶入您的叢集主機。 登入

  1. 安裝

    Plugins tab → Add plugins → search "Hibira Realtime" → Install
      App key:     YOUR_APP_KEY
      App ID:      YOUR_APP_ID
      App secret:  YOUR_APP_SECRET
      Host:        wss://ws.hibira.io
  2. 接收事件

    Hibira Channel element
      Channel:    "order-" & Current page's order's unique id
      Value key:  status
    
    When Hibira Channel A an event is received
      → Display data: Hibira Channel A's Last value
  3. 傳送事件

    When Button Mark shipped is clicked
      → Hibira - Publish event
          Channels:  "order-" & Current page's order's unique id
          Event:     order-updated
          Data:      {"status": "shipped"}
  4. 私人與 presence 頻道

    Channel: presence-room-42
    
    When Hibira Channel A authorization is needed
      1. Hibira - Authorize channel
           Socket ID:  Hibira Channel A's Auth socket ID
           Channel:    Hibira Channel A's Auth channel
           User ID:    Current User's unique id
           User name:  Current User's name
      2. Hibira Channel A Complete authorization
           Auth:          Result of step 1's Auth
           Channel data:  Result of step 1's Channel data
    
    Hibira Channel A's Member names → a list of who is online

開始之前

  • 把你的 Bubble 網域(例如 https://yourapp.bubbleapps.io 和自訂網域)加到應用程式的允許來源。
  • 應用程式密鑰存放在 Bubble 的私人外掛設定裡,只由伺服器端動作使用,絕不會傳到瀏覽器。
  • 頁面上所有 Hibira Channel 元素共用一條連線,所以一位訪客在方案連線數中只算一條。

請使用儀表板中的應用程式 Key;Secret 只放在你的伺服器上。頻道、事件與授權端點的用法和 Pusher 完全相同。 免費建立帳號 →