Skip to content
On this page
HUSH
CIRCUITS

System Architecture

This architecture summary reflects the current migration branch implementation.

Major Runtime Components

  1. Frontend Client (React + Vite + Tailwind)
  • Dialer UI, settings flows, auth screens, admin screens.
  • Telegram WebApp compatibility via useTelegram hook.
  1. Supabase Layer
  • Auth/session management.
  • Postgres tables (profiles, call_logs, wallet_transactions, call_recordings, etc.).
  • Edge Functions (make-call, hangup-call, verify-pin, Telegram/session utilities, SIPUP sync endpoints).
  1. Control Layer (Python service)
  • Call-control and gateway status endpoints.
  • Integration surface with FreeSWITCH and operational APIs.
  1. FreeSWITCH / VoIP Runtime
  • SIP and bridge media handling.
  • Trunk/provider integration for outbound call legs.

High-Level Request Path

  1. User action in dialer triggers Supabase edge function request.
  2. Edge/backend routes call request into control + telephony layer.
  3. Call state updates are read back via call_logs polling.
  4. UI status strip and telemetry update in near real-time.

Data Domains

  • Identity/security: profiles, PIN verification endpoints.
  • Call telemetry: call_logs, call_flow_events.
  • Wallet/billing: wallet_transactions, voucher RPCs.
  • Media: call_recordings and storage URLs.
  • Admin analytics: SIPUP stats and operational tables.