17 Commits

Author SHA1 Message Date
a814dd3387 Add media processing, mine feed filter, and preserve ended streams as videos
- Add ffmpeg-based media asset generation (poster, thumbnail, clip) for previews and videos
- Add GET /media/thumbnails/:filename serving route
- Add filter=mine to feed endpoint for user's own published streams
- Feed response now includes posterUrl, thumbnailUrl, clipUrl
- Deleting an ENDED plan with preview preserves it as a Video record
- Add sourcePlanId to Video schema
2026-03-04 21:07:18 +01:00
36dce50b64 Add Device/Video models, signaling WebSocket, device and content routes
- Prisma: Device model (Quest/Phone, online status, battery, storage,
  game/streaming/cortex state), Video model with likes, VideoLike
- Signaling WebSocket for SDP/ICE relay and device presence
- Device routes: list, status, delete
- Content routes: video CRUD with range-support streaming
- SignalingManager service for device socket registry and heartbeat
2026-03-04 14:41:15 +01:00
7e99a053da Extract autoDetectEndedPlans to shared service, add to feed endpoint 2026-03-04 10:52:01 +01:00
b4ab9c6cf9 Auto-detect ended Twitch streams via Helix API polling 2026-03-04 09:51:04 +01:00
bc6c01940a Per-stream visibility: isPublic on StreamPlan, PATCH endpoint, feed + profile updates 2026-03-03 21:37:00 +01:00
ed83c651d8 Pairing code auth, replace Facebook OAuth, public feed
- Add PairingCode model, POST /generate + /redeem + GET /status endpoints
- Remove facebookId from User, make metaId non-nullable
- Delete meta-web routes, link routes, meta-web-auth service
- Remove metaWeb config block and hasFacebookLink from responses
- Add optionalAuth middleware, make feed publicly accessible
- Resolve Twitch channel names for embed broadcastIds
2026-03-02 23:07:24 +01:00
7ce1c2a8bc Portal backend: Facebook OAuth, social features, portal comments
- Facebook Login OAuth (meta-web auth service + routes)
- Account linking (merge Quest metaId + Facebook facebookId)
- User profile updates (bio, isPublic, displayName)
- Social endpoints: follow/unfollow, feed (trending/following/recent), likes
- Portal comments via WebSocket (subscribe_portal, send_portal_comment)
- Prisma migration: Follow, Like models, facebookId/bio/isPublic on User
- Provider OAuth source=web redirect support for portal callbacks
- Docker compose portal service, CORS multi-origin support
2026-03-02 12:32:39 +01:00
6931670a1f Resilient prepare, Twitch chat echo, parallel chat startup
- Prepare endpoint wraps each destination in try/catch; partial success
  if at least one destination is ready (e.g., Twitch works when YouTube
  is rate-limited)
- Echo sent Twitch messages back to app WebSocket (IRC doesn't echo
  your own PRIVMSGs)
- Start YouTube and Twitch chat clients in parallel via Promise.allSettled
- Fix Twitch auth failure detection (Login unsuccessful + Login
  authentication failed)
- Add Twitch IRC debug logging
2026-03-02 09:40:15 +01:00
cc8ab2320b YouTube/Twitch live chat backend WebSocket proxy
- YouTube chat polling via liveBroadcasts + liveChat/messages APIs
- Twitch IRC WebSocket client with IRCv3 tag parsing
- ChatManager orchestrator with token refresh, retry logic
- WebSocket endpoint at /chat/ws with JWT auth
- Added chat:read, chat:edit to Twitch OAuth scopes
2026-03-01 22:19:19 +01:00
08cca68086 Custom RTMP saved accounts, CUSTOM destination prepare, debug logging
- Add POST /providers/accounts/custom-rtmp endpoint for saved RTMP servers
- Encrypt rtmpUrl/streamKey in accessTokenEnc/refreshTokenEnc fields
- Decrypt and return rtmpUrl/streamKey in GET /providers/accounts for CUSTOM_RTMP
- Skip token revocation on DELETE for CUSTOM_RTMP accounts
- Decrypt CUSTOM_RTMP credentials into CUSTOM destinations on plan create/update
- Handle CUSTOM destinations in prepare lifecycle (already READY, skip provider auth)
- Add debug logging for plan operations and user upsert
2026-03-01 10:50:28 +01:00
02755bd1f0 Add plan execution mode, game ID, and version to health endpoint
- Add executionMode and gameId columns to StreamPlan schema
- Add migration for new columns
- Support executionMode/gameId in plan create and update endpoints
- Add version field to health check response from package.json
2026-02-28 22:38:56 +01:00
e16eb85071 Add getYouTubeBroadcastStatus helper
Query YouTube liveBroadcasts API to get lifecycle status (created,
ready, testing, live, complete, revoked) for a given broadcast ID.
2026-02-27 13:21:00 +01:00
cff7cdc58a Multi-account support and streaming fixes
- Change LinkedAccount unique constraint to (userId, serviceId, accountId)
- Add linkedAccountId to StreamDestination for per-account targeting
- OAuth callbacks upsert by accountId so different accounts create new rows
- Delete endpoint changed to /providers/accounts/:id
- getDecryptedToken resolves tokens by linkedAccountId instead of serviceId
- /start transition wrapped in try-catch (enableAutoStart compatibility)
- /end always attempts YouTube complete transition regardless of plan status
- autoDetectEndedPlans loads tokens per-destination
2026-02-26 19:06:05 +01:00
7351003c6b Support Quest Platform SDK auth with oculusId fallback
When the Data Use Checkup hasn't granted numeric ID access, the SDK
returns oculusId (string username) instead. This makes nonce optional,
skips nonce verification for non-numeric userIds, and uses oculusId as
the metaId when numeric ID is unavailable.
2026-02-24 12:41:54 +01:00
0eab05f15b Phase 6: Rate limiting on auth endpoints 2026-02-23 15:45:31 +01:00
538c24c58f Phases 2-4: Auth, providers, stream management 2026-02-23 15:32:24 +01:00
8ea3279c3b Phase 1: Backend scaffold with Fastify, Prisma, Docker 2026-02-23 15:26:50 +01:00