You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
free4chat has gone through three complete rewrites, each on a different branch. This issue documents the tradeoffs of each stack for future reference — especially the SFU control question that determines whether features like a server-side AI voice participant are possible.
✅ Zero — fully serverless, Cloudflare Workers + DO
Infrastructure cost
✅ Free tier covers typical small-scale usage
Why chosen
Zero ops for a personal project
The Core Tradeoff
Go/Pion
Elixir/Membrane
Cloudflare/RTK
SFU ownership
Self
Self
Dyte/CF
Server-side audio
✅
✅
❌ (today)
Ops burden
High
High
Zero
Luna voice bot
Now
Now
Waiting
Scaling
Manual
Manual
Automatic
TURN server
Required
Required
Included
Cost at low scale
~–20/mo
~–20/mo
~/bin/zsh
Cost at high scale
Cheap
Cheap
RTK pricing applies
The fundamental tension: owning the SFU enables full customization (voice bots, custom media processing, anything) but requires running servers. Delegating to RTK eliminates ops but hands over SFU control.
What RTK Can and Cannot Do
Can do today:
Multi-party voice/video rooms
Screen sharing
File/image transfer via data channels
Chat messages
Participant management
Bot participants via text chat (current Luna implementation)
CF Containers gaining UDP support (for headless Chrome bot)
When to reconsider switching stacks
The current CF stack is the right choice as long as:
The product stays at personal/small-scale (zero ops matters)
Luna voice bot remains a nice-to-have, not a core differentiator
If either condition changes — i.e., Luna voice becomes a must-have, or the product needs deep media customization — the Go/Pion or Elixir/Membrane branches are both capable of delivering it, at the cost of re-introducing server management.
Overview
free4chat has gone through three complete rewrites, each on a different branch. This issue documents the tradeoffs of each stack for future reference — especially the SFU control question that determines whether features like a server-side AI voice participant are possible.
The Three Stacks
Branch:
golang— Pion WebRTC + GoSFU: Self-hosted (custom Go server using Pion)
Branch:
elixir— Membrane RTC Engine + PhoenixSFU: Self-hosted (membrane_rtc_engine)
Membrane.WebRTC.Sinkpublishes audio server-side; working OpenAI Realtime demo existsBranch:
cloudflare(current) — Cloudflare RealtimeKit (Dyte)SFU: Managed by Dyte/Cloudflare
The Core Tradeoff
The fundamental tension: owning the SFU enables full customization (voice bots, custom media processing, anything) but requires running servers. Delegating to RTK eliminates ops but hands over SFU control.
What RTK Can and Cannot Do
Can do today:
Cannot do today (blocked by Dyte's closed SFU):
Might be unblocked by CF:
agents.realtime.cloudflare.compipeline (PR feat: realtime agents cloudflare/agents#785 — closed, not merged)When to reconsider switching stacks
The current CF stack is the right choice as long as:
If either condition changes — i.e., Luna voice becomes a must-have, or the product needs deep media customization — the Go/Pion or Elixir/Membrane branches are both capable of delivering it, at the cost of re-introducing server management.
Related