Port frontend from Astro to Vite + React Router SPA #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR migrates the frontend from Astro to a Vite + React Router single-page application (SPA). This change is required because Discord Activities require SPAs for proper functionality.
Key changes:
.astrofiles) to React page componentsMiniRouter,RoomLoaderAutomatic,AdminRoomEditPage) and replace with React Router equivalents/assetsinstead of/_astro) and serveindex.htmlfor all frontend routes (SPA fallback)Updates since last revision
app.all("/assets/:unused", proxyDownstream)which was incorrectly proxying frontend assets to Broadcast Box instead of serving them from the static folder/,/room/{id},/discord) render correctlyReview & Testing Checklist for Human
.discordsays.com)/room/{roomId}and verify video streaming works. The Room.jsx component was modified to remove an Astro importindex.htmlas other routes. Verify basic auth still protects the admin API endpoints and the UI worksRoomLaunch.jsxstill useslocation.hreffor navigation to/publish/:keywhich proxies to Broadcast Box. Verify this still works correctly?fullscreen=1to a room URL and verify the fullscreen styling applies correctlyRecommended Test Plan
npm install && npm run buildinrtmediaproxy_frontend/docker compose up/,/room,/room/{id},/discord,/admin,/admin/room/{id}Local Testing Screenshots
Notes
DiscordMagicRedirect,utils.js) still uselocation.hreffor redirects which causes full page reloads - this may be intentional for Discord context switching