Prompt
How do I add voice and video to a marketplace app?
Latest observation
To add voice and video to a marketplace app, you usually embed a real-time communications (RTC) layer for calls between buyers and sellers, plus a few marketplace-specific features around trust, scheduling, and payments.
1) Decide the call use case
Common marketplace patterns:
- Buyer-to-seller calls for pre-sale questions
- Support calls with customer service
- In-app video consultations for services/appointments
- Voice-only fallback when video isn’t needed or bandwidth is low
This helps determine requirements like:
- 1:1 vs group calls
- Scheduled vs instant calls
- Recording
- Screen sharing
- Chat during calls
- Call duration limits
2) Choose a communications approach
You generally have 3 options:
A. Use a managed API/SDK
Best for most marketplace apps.
Examples:
- Twilio Voice/Video
- Agora
- Vonage
- Daily
- Zoom Video SDK
- WebRTC with a provider for signaling/STUN/TURN
Pros:
- Fast to build
- Good mobile/web SDKs
- Handles NAT traversal, scaling, and reliability
Cons:
- Ongoing usage cost
- Less control than building everything yourself
B. Build on raw WebRTC
Best if you need maximum control and have a strong engineering team.
You’ll need:
- Signaling server
- STUN/TURN servers
- Media routing/relay
- Call state management
- Push notifications for mobile
Pros:
- More control
- Potentially lower cost at scale
Cons:
- Much more complex
- Harder to maintain
- More edge cases
C. Hybrid
Use a vendor now, then gradually replace parts later if scale demands it.
3) Core architecture
A typical setup looks like this:
- Client app: web/iOS/Android
- Backend: auth, permissions, call creation, marketplace rules
- RTC provider: actual voice/video transport
- Database: call logs, participants, timestamps, outcomes
- Push notifications: invite/call alerts
- Optional recording service: if you need compliance or QA
Flow:
- User taps “Call seller”
- Backend checks permissions, availability, booking status, etc.
- Backend creates a call room/session and returns a token
- App connects to RTC service
- Participants join and exchange media
- Backend stores call metadata and events
4) Build marketplace-specific rules
A marketplace call feature should not be just “video chat.” Add rules such as:
- Only allow calls after a booking or inquiry
- Mask phone numbers if you offer voice calling
- Time-limited call access links
- Seller availability windows
- Dispute-friendly logs of call duration and participants
- Optional moderation/reporting
- Anti-spam protections
5) Authentication and permissions
You should never let clients create arbitrary call sessions without backend authorization.
Use:
- Short-lived tokens
- Role-based access
- Room access checks
- Identity verification if needed
Example checks:
- Is this buyer allowed to call this seller?
- Is the listing active?
- Has the buyer paid or booked?
- Is the seller online/available?
6) UX considerations
Good call UX matters a lot:
- Show availability status
- Clear “Call now” / “Schedule call” buttons
- Provide mic/camera permissions upfront
- Offer low-bandwidth mode
- Show reconnect handling
- Include call quality indicators
- Let users switch from video to audio
7) Notifications and scheduling
For scheduled calls:
- Store timezone-aware appointment data
- Send reminders by push/email/SMS
- Generate join links that expire
- Allow rescheduling/cancellation
For instant calls:
- Notify the recipient immediately
- Add timeout/retry behavior if they don’t answer
- Allow voicemail-like fallback or chat fallback
8) Recording, compliance, and safety
Depending on your marketplace and region, you may need:
- Consent prompts for recording
- Data retention policies
- GDPR/CCPA compliance
- Abuse reporting
- Moderation tools
- Optional transcription
If you record calls, make sure:
- Users are informed
- Storage is secure
- Access is restricted
- Retention rules are defined
9) Cost planning
Costs can include:
- Per-minute audio/video usage
- Recording storage
- TURN relay bandwidth
- Push/SMS notifications
- Transcription/AI features
If your app will have lots of short calls, pricing can add up quickly, so model:
- Average call length
- Concurrent calls
- Video vs audio mix
- Geographic distribution
10) Recommended implementation path
A practical sequence:
- Start with 1:1 voice calls
- Add 1:1 video calls
- Add call scheduling
- Add notifications and status
- Add recording/transcription if needed
- Add moderation, analytics, and fraud controls
11) Suggested tech stack example
For a modern marketplace app:
- Frontend: React / React Native / Swift / Kotlin
- Backend: Node.js, Python, Go, or Ruby
- RTC: Agora / Twilio / Daily / Vonage
- Auth: JWT + short-lived RTC tokens
- Notifications: Firebase Cloud Messaging, APNs, Twilio SMS
- DB: Postgres
- Storage: S3-compatible for recordings/logs
12) What I’d recommend
If you want the fastest path:
- Use a managed RTC provider
- Keep call authorization in your backend
- Start with audio + video 1:1
- Add marketplace rules, scheduling, and abuse prevention early
If you want, I can also help you with:
- a feature architecture diagram,
- a provider comparison (Twilio vs Agora vs Daily), or
- a sample implementation for web or mobile.