55### 1. Platform Abstraction Layer (` server/reflector/video_platforms/ ` )
66- ** base.py** : Abstract interface defining all platform operations
77- ** whereby.py** : Whereby implementation wrapping existing functionality
8- - ** dailyco .py** : Daily.co client implementation (ready for testing when credentials available)
8+ - ** daily .py** : Daily client implementation (ready for testing when credentials available)
99- ** mock.py** : Mock implementation for unit testing
1010- ** registry.py** : Platform registration and discovery
1111- ** factory.py** : Factory methods for creating platform clients
1818### 3. Configuration
1919- ** Settings** : Added Daily.co configuration variables
2020- ** Feature Flags** :
21- - ` DAILYCO_MIGRATION_ENABLED ` : Master switch for migration
22- - ` DAILYCO_MIGRATION_ROOM_IDS ` : List of specific rooms to migrate
21+ - ` DAILY_MIGRATION_ENABLED ` : Master switch for migration
22+ - ` DAILY_MIGRATION_ROOM_IDS ` : List of specific rooms to migrate
2323 - ` DEFAULT_VIDEO_PLATFORM ` : Default platform when migration enabled
2424
2525### 4. Backend API Updates
2626- ** Room Creation** : Now assigns platform based on feature flags
2727- ** Meeting Creation** : Uses platform abstraction instead of direct Whereby calls
2828- ** Response Models** : Include platform field
29- - ** Webhook Handler** : Added Daily.co webhook endpoint at ` /v1/dailyco_webhook `
29+ - ** Webhook Handler** : Added Daily webhook endpoint at ` /v1/daily/webhook `
3030
3131### 5. Frontend Components (` www/app/[roomName]/components/ ` )
3232- ** RoomContainer.tsx** : Platform-agnostic container that routes to appropriate component
3333- ** WherebyRoom.tsx** : Extracted existing Whereby functionality with consent management
34- - ** DailyCoRoom .tsx** : Daily.co implementation using DailyIframe
34+ - ** DailyRoom .tsx** : Daily implementation using DailyIframe
3535- ** Dependencies** : Added ` @daily-co/daily-js ` and ` @daily-co/daily-react `
3636
3737## How It Works
3838
39391 . ** Platform Selection** :
40- - If ` DAILYCO_MIGRATION_ENABLED =false` → Always use Whereby
41- - If enabled and room ID in ` DAILYCO_MIGRATION_ROOM_IDS ` → Use Daily.co
40+ - If ` DAILY_MIGRATION_ENABLED =false` → Always use Whereby
41+ - If enabled and room ID in ` DAILY_MIGRATION_ROOM_IDS ` → Use Daily
4242 - Otherwise → Use ` DEFAULT_VIDEO_PLATFORM `
4343
44442 . ** Meeting Creation Flow** :
5959
60601 . ** Set Environment Variables** :
6161 ``` bash
62- DAILYCO_API_KEY =your-key
63- DAILYCO_WEBHOOK_SECRET =your-secret
64- DAILYCO_SUBDOMAIN =your-subdomain
65- AWS_DAILYCO_S3_BUCKET =your-bucket
66- AWS_DAILYCO_ROLE_ARN =your-role
62+ DAILY_API_KEY =your-key
63+ DAILY_WEBHOOK_SECRET =your-secret
64+ DAILY_SUBDOMAIN =your-subdomain
65+ AWS_DAILY_S3_BUCKET =your-bucket
66+ AWS_DAILY_ROLE_ARN =your-role
6767 ```
6868
69692 . ** Run Database Migration** :
75753 . ** Test Platform Creation** :
7676 ``` python
7777 from reflector.video_platforms.factory import create_platform_client
78- client = create_platform_client(" dailyco " )
78+ client = create_platform_client(" daily " )
7979 # Test operations...
8080 ```
8181
8282### 6. Testing & Validation (` server/tests/ ` )
8383- ** test_video_platforms.py** : Comprehensive unit tests for all platform clients
84- - ** test_dailyco_webhook .py** : Integration tests for Daily.co webhook handling
84+ - ** test_daily_webhook .py** : Integration tests for Daily webhook handling
8585- ** utils/video_platform_test_utils.py** : Testing utilities and helpers
8686- ** Mock Testing** : Full test coverage using mock platform client
8787- ** Webhook Testing** : HMAC signature validation and event processing tests
@@ -106,10 +106,10 @@ Daily.co webhooks are configured via API (no dashboard interface). Use the Daily
106106``` bash
107107# Configure webhook endpoint
108108curl -X POST https://api.daily.co/v1/webhook-endpoints \
109- -H " Authorization: Bearer ${DAILYCO_API_KEY } " \
109+ -H " Authorization: Bearer ${DAILY_API_KEY } " \
110110 -H " Content-Type: application/json" \
111111 -d ' {
112- "url": "https://yourdomain.com/v1/dailyco_webhook ",
112+ "url": "https://yourdomain.com/v1/daily/webhook ",
113113 "events": [
114114 "participant.joined",
115115 "participant.left",
@@ -166,7 +166,7 @@ Daily.co uses HMAC-SHA256 for webhook verification:
166166import hmac
167167import hashlib
168168
169- def verify_dailyco_webhook (body : bytes , signature : str , secret : str ) -> bool :
169+ def verify_webhook_signature (body : bytes , signature : str ) -> bool :
170170 expected = hmac.new(secret.encode(), body, hashlib.sha256).hexdigest()
171171 return hmac.compare_digest(expected, signature)
172172```
@@ -200,10 +200,10 @@ async def process_recording_from_url(recording_url: str, meeting_id: str, record
200200uv run pytest tests/test_video_platforms.py -v
201201
202202# Run webhook integration tests
203- uv run pytest tests/test_dailyco_webhook .py -v
203+ uv run pytest tests/test_daily_webhook .py -v
204204
205205# Run with coverage
206- uv run pytest tests/test_video_platforms.py tests/test_dailyco_webhook .py --cov=reflector.video_platforms --cov=reflector.views.dailyco
206+ uv run pytest tests/test_video_platforms.py tests/test_daily_webhook .py --cov=reflector.video_platforms --cov=reflector.views.daily
207207```
208208
209209### Manual Testing with Mock Platform
@@ -231,7 +231,7 @@ print(f"Created meeting: {meeting.room_url}")
231231
232232``` python
233233# Test webhook payload processing
234- from reflector.views.dailyco import dailyco_webhook
234+ from reflector.views.daily import webhook
235235from reflector.worker.process import process_recording_from_url
236236
237237# Simulate webhook event
0 commit comments