How profullstack/smshub works
SMSHub is a multi-platform SMS service: users sign in, manage provider credentials and numbers, then exchange messages in a real-time inbox or through developer interfaces. Its domain also includes rented-number checkout and provisioning, inbound webhooks and delivery outcomes, alerts, teams/groups, and user-configured outbound webhooks. The graph emphasizes documented capabilities and source-visible calls; several web and platform subsystems are represented by their exact directories because their implementation was not sampled, so those links are omitted where evidence is unavailable.
Main entry points: supabase/server.ts Supabase data and realtime · mcp/server.ts MCP tools · inbox-client.tsx Unified inbox · service.ts Rental lifecycle
Components 26
User Clients
- Web app
src/app - Unified inbox
src/components/inbox-client.tsx - Mobile apps
mobile/app - Desktop app
electron/src - CLI and TUI
cli/smshub.mjs
Messaging
- Inbox data hook
src/hooks/use-inbox.ts - Message API
src/app/api/messages - Send service
src/lib/messages/send.ts - SMS providers
src/lib/providers/index.ts - Twilio and Telnyx
src/lib/providers - Inbound webhooks
src/app/api/webhooks - Delivery status
src/lib/message-status.ts
Numbers and Providers
- Rental lifecycle
src/lib/managed-numbers/service.ts - Payment checkout
src/lib/coinpay/checkout.ts - Telnyx account API
src/lib/providers/telnyx-api.ts - Number management API
src/app/api/phone-numbers/route.ts
Developer Platform
- MCP interface
src/app/api/mcp/route.ts - MCP tools
src/lib/mcp/server.ts - Developer APIs
src/app/api/v1 - Outbound webhooks
src/lib/webhooks/hub.ts
Account Services
- Supabase data and realtime
src/lib/supabase/server.ts - Authentication
src/lib/request-user.ts - Key vault
src/lib/vault/service.ts - Alerts
src/lib/alerts/service.ts - Groups and campaigns
src/lib/groups.ts
Other components
- SMSHub user
Connections 30
- SMSHub user → Web app: uses
README.md - SMSHub user → Mobile apps: uses
README.md - SMSHub user → Desktop app: uses
README.md - SMSHub user → CLI and TUI: uses
README.md - Web app → Unified inbox: renders
- Unified inbox → Inbox data hook: loads via
src/components/inbox-client.tsx - Unified inbox → Message API: sends through
- Inbox data hook → Supabase data and realtime: realtime data
- Mobile apps → Supabase data and realtime: syncs with
- Desktop app → Supabase data and realtime: realtime updates
- CLI and TUI → Developer APIs: calls
- Message API → Send service: delegates to
- Send service → SMS providers: sends via
- SMS providers → Twilio and Telnyx: dispatches to
src/lib/providers/index.ts - Inbound webhooks → SMS providers: parses and validates
- Inbound webhooks → Supabase data and realtime: records messages
- Delivery status → Unified inbox: formats failures
src/components/inbox-client.tsx - Authentication → Supabase data and realtime: resolves user
src/lib/request-user.ts - Number management API → Supabase data and realtime: reads and writes
src/app/api/phone-numbers/route.ts - Number management API → Key vault: opens credentials
src/app/api/phone-numbers/route.ts - Number management API → Telnyx account API: configures webhooks
src/app/api/phone-numbers/route.ts - Rental lifecycle → Payment checkout: creates checkout
src/lib/managed-numbers/service.ts - Rental lifecycle → Outbound webhooks: emits events
src/lib/managed-numbers/service.ts - MCP interface → Authentication: resolves caller
src/app/api/mcp/route.ts - MCP interface → MCP tools: dispatches RPC
src/app/api/mcp/route.ts - MCP tools → Alerts: lists alerts
src/lib/mcp/server.ts - MCP tools → Outbound webhooks: lists webhooks
src/lib/mcp/server.ts - MCP tools → Rental lifecycle: uses number API
src/lib/mcp/server.ts - Developer APIs → Rental lifecycle: number operations
- Groups and campaigns → Outbound webhooks: campaign events