Feature/rewrite astrocast#3
Open
engbergandreas wants to merge 20 commits into
Open
Conversation
Updating to latest vite, typescript, react, using react-compiler
Adds Mantine hooks, react-redux, react-router
There was a problem hiding this comment.
Pull request overview
This PR completes the frontend half of the Astrocast rewrite by removing the previously co-located Node/Express backend code and rebuilding the UI on a modern Vite + React + Mantine stack, with Redux Toolkit + RTK Query for state and data access. It aligns the frontend to talk to the separate Wormhole backend PR referenced in the description.
Changes:
- Replaces the previous combined frontend+backend repo structure with a frontend-only Vite app (new Vite config, new TS project refs, updated README).
- Introduces Mantine-based UI components/pages for sessions, admin views, and OpenSpace connection management.
- Adds Redux Toolkit store, slices, listener middleware, and RTK Query APIs for Firebase realtime DB + Wormhole HTTP endpoints.
Reviewed changes
Copilot reviewed 102 out of 111 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| vite.config.ts | New Vite config with React plugin, env loading, aliases, and dev proxy. |
| vite.config.mts | Removes legacy Vite config (root/envDir/pages/eslint plugins, old build output). |
| tsconfig.node.json | Adds node-side TS config for Vite config typing/build info. |
| tsconfig.json | Switches to project references + bundler module resolution and stricter linting flags. |
| tsconfig.app.json | Adds app TS config (composite, DOM libs, react-jsx, vite/client types). |
| src/utils/format.ts | Adds shared duration formatting helper. |
| src/typings/vite-env.d.ts | Removes legacy env typings (now moved/reshaped). |
| src/typings/types.d.ts | Removes legacy global type declarations (now moved to src/types). |
| src/typings/openspace-api-js.d.ts | Removes local openspace-api-js module typings (now using package types). |
| src/types/vite-env.d.ts | Adds new ImportMetaEnv variable typings used by the frontend. |
| src/types/types.ts | Adds centralized TS interfaces/types for sessions, stats, auth user, etc. |
| src/types/enums.ts | Adds shared enums for auth/connection state. |
| src/styles/global.css | Removes legacy global CSS (bootstrap-era). |
| src/shared/api.ts | Removes legacy fetch helpers (replaced by RTK Query). |
| src/server/express/utils.ts | Removes embedded backend server utilities (repo now frontend-only). |
| src/server/express/serverinstance.ts | Removes embedded backend TCP server instance logic. |
| src/server/express/server.ts | Removes embedded backend TCP server implementation. |
| src/server/express/index.ts | Removes embedded backend HTTP/manager entrypoint. |
| src/server/express/adminFirebaseConfig.ts | Removes embedded backend Firebase admin initialization. |
| src/server/express/adminApi.ts | Removes embedded backend Firebase admin API logic. |
| src/redux/store.ts | Adds Redux store wiring (slices + RTK Query middleware). |
| src/redux/local/localSlice.ts | Adds local UI state for “connected session id” with notifications. |
| src/redux/listenerMiddleware.ts | Adds listener middleware bootstrap for auth and OpenSpace connection flows. |
| src/redux/hooks.ts | Adds typed Redux hooks. |
| src/redux/connection/connectionSlice.ts | Adds OpenSpace connection state slice (address/port/status). |
| src/redux/connection/connectionMiddleware.ts | Adds thunks/listeners to connect/reconnect and notify on changes. |
| src/redux/auth/authSlice.ts | Adds auth slice (user/status/pending email link). |
| src/redux/auth/authMiddleware.ts | Adds Firebase auth listeners + provider sign-in/linking flows. |
| src/redux/api/wormholeApiSlice.ts | Adds RTK Query API for Wormhole HTTP endpoints (session/admin/host ops). |
| src/redux/api/databaseApiSlice.ts | Adds RTK Query “streaming” endpoints for Firebase realtime DB (sessions/history/stats). |
| src/pages/ServerLinkPage.tsx | New Mantine-based join-via-link page with auto-join and disconnect handling. |
| src/pages/ServerLink.tsx | Removes legacy join-via-link page (bootstrap-era). |
| src/pages/HomePage.tsx | New Mantine-based home page showing sessions and session creation CTA. |
| src/pages/Home.tsx | Removes legacy home page (bootstrap-era). |
| src/pages/AdminPage.tsx | New Mantine-based admin page (access gate + forms + status/history lists). |
| src/pages/Admin.tsx | Removes legacy admin page (bootstrap-era). |
| src/mantineTheme.ts.ts | Adds Mantine theme configuration (custom heading sizes/cursor). |
| src/main.tsx | Adds new Vite entrypoint rendering App. |
| src/index.tsx | Removes legacy entrypoint (CRA-style). |
| src/index.html | Removes legacy HTML entry under src/ (moved to root index.html). |
| src/index.css | Present in PR context (no diff shown). |
| src/icons/icons.tsx | Adds centralized icon exports for UI use. |
| src/hooks/util.ts | Adds helper hook for checking connection status. |
| src/hooks/useSessions.ts | Adds hook for filtering sessions based on auth/admin/private rules. |
| src/hooks/useSessionOwnerName.ts | Adds hook to resolve session owner display name via Wormhole API. |
| src/hooks/useServerStatisticsData.ts | Removes legacy stats hook (replaced by RTK Query Firebase streaming). |
| src/hooks/useServerInstanceWithID.ts | Removes legacy per-instance hook (replaced by RTK Query Firebase streaming). |
| src/hooks/useServerInstanceHistory.ts | Removes legacy history hook (replaced by RTK Query Firebase streaming). |
| src/hooks/useServerInstanceData.ts | Removes legacy sessions hook (replaced by RTK Query Firebase streaming). |
| src/hooks/useJoinSession.ts | Adds join-session hook integrating OpenSpace Lua API + local state. |
| src/hooks/useIsUserAdmin.ts | Removes legacy “admin check” hook (replaced by token claims in Redux auth). |
| src/hooks/useInstanceOwnerName.ts | Removes legacy owner-name fetch hook (replaced by RTK Query). |
| src/hooks/useGetHostPassword.ts | Adds hook to conditionally fetch host password for session owners. |
| src/firebaseconfig.ts | Removes legacy Firebase setup module (split into src/firebase/*). |
| src/firebase/utils.tsx | Adds provider utilities (icons + provider mapping). |
| src/firebase/types.ts | Adds provider key type. |
| src/firebase/config.ts | Adds new Firebase app/auth/db initialization using validated env config. |
| src/config/env.ts | Adds zod-based runtime env validation wrapper. |
| src/components/UserProfile.tsx | Removes legacy profile/modal UI (bootstrap-era). |
| src/components/UsageChart.tsx | Adds Mantine charts-based usage visualization + CSV download. |
| src/components/StatisticsChart.tsx | Removes legacy recharts+react-csv component (bootstrap-era). |
| src/components/ShareServerLink.tsx | Removes legacy copy-link UI (replaced by Mantine CopyButton usage). |
| src/components/SessionStatusList.tsx | Adds admin session status list (accordion) composition. |
| src/components/SessionStatusEntry.tsx | Adds admin session status entry details + remove button + usage chart. |
| src/components/Sessions.tsx | Adds home sessions list (accordion) composition. |
| src/components/SessionHistoryList.tsx | Adds admin history list (accordion) with sorting and stats lookup. |
| src/components/SessionHistoryEntry.tsx | Adds admin history entry details + usage chart. |
| src/components/SessionEntry.tsx | Adds session entry UI for joining/leaving/claiming host/copy link. |
| src/components/RequestNewSessionForm.tsx | Adds Mantine form for creating new sessions via Wormhole API. |
| src/components/RequestNewRoomForm.tsx | Removes legacy “create room” form (bootstrap-era). |
| src/components/RequestAdminRightsForm.tsx | Rewrites admin-rights form to Mantine + RTK Query. |
| src/components/RemoveSessionButton.tsx | Adds session removal UI with confirm modal + notifications. |
| src/components/Profile.tsx | Adds lightweight profile/sign-out component. |
| src/components/PageNavigationHeader.tsx | Removes legacy page navigation header (bootstrap-era). |
| src/components/OpenSpaceProivder.tsx | Removes legacy OpenSpace provider implementation (replaced by LuaApiProvider + Redux). |
| src/components/OpenSpaceConnection.tsx | Adds Mantine UI for connect/disconnect + connection settings modal. |
| src/components/NavigationHeader.tsx | Removes legacy top navigation header (bootstrap-era). |
| src/components/LoginButton.tsx | Rewrites login modal/button to Mantine + Redux auth flow. |
| src/components/JoinSessionModal.tsx | Adds Mantine modal for join parameters (host pw/username/hostship). |
| src/components/JoinRoomForm.tsx | Removes legacy join form (bootstrap-era). |
| src/components/InstanceStatus.tsx | Removes legacy instance status component (bootstrap-era). |
| src/components/InstanceMapper.tsx | Removes legacy layout helpers for instance UI (bootstrap-era). |
| src/components/InstanceHistory.tsx | Removes legacy instance history component (bootstrap-era). |
| src/components/DropDownWrapper.tsx | Removes legacy accordion/dropdown wrapper (bootstrap-era). |
| src/components/DetailsList.tsx | Adds Mantine DataList-based details rendering helper. |
| src/components/CustomToast.tsx | Removes legacy bootstrap toast component (replaced by Mantine notifications). |
| src/components/CloseServerButton.tsx | Removes legacy “close server” UI (replaced by new remove flow). |
| src/components/ClaimHostModal.tsx | Adds Mantine modal to claim host (Wormhole + OpenSpace hostship request). |
| src/components/AuthProvider.tsx | Removes legacy auth context provider (replaced by Redux auth listener). |
| src/components/AuthListener.tsx | Adds component to start/stop Redux auth listening lifecycle. |
| src/components/AppLayout.tsx | Adds Mantine AppShell layout with nav + profile. |
| src/components/AccordionHeaderRow.tsx | Adds reusable accordion header grid row component. |
| src/App.tsx | Rewrites app root composition (Redux, Mantine providers, router, Lua API provider). |
| src/App.css | Removes legacy background styling. |
| src/api/LuaApiProvider.tsx | Adds provider that drives connection + fetches OpenSpace Lua API into context. |
| src/api/LuaApiContext.tsx | Adds context for OpenSpace Lua API. |
| src/api/hooks.ts | Adds useOpenSpaceApi hook. |
| src/api/api.ts | Adds OpenSpace API instance init/reset utilities. |
| README.md | Updates docs to reflect Astrocast frontend-only repo + new scripts/env vars. |
| package.json | Updates dependencies/scripts for Mantine/RTK/Vite/TS refs and new linting. |
| LICENSE | Updates copyright year. |
| index.html | Adds root Vite HTML entrypoint. |
| eslint.config.js | Adds flat ESLint config with TS/React hooks/import sort/prettier integration. |
| .prettierrc.json | Removes old Prettier config file. |
| .prettierrc | Adds new Prettier config. |
| .markdownlint.json | Adds markdownlint rules. |
| .gitignore | Updates ignored build outputs for the new structure. |
| .eslintrc.json | Removes legacy ESLint config (migrated to flat config). |
| .env-sample | Updates sample env vars (removes OpenSpace address/port + admin SDK paths). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR rewrites the Astrocast into two separate projects, one for the backend and one for the frontend. See OpenSpace/Wormhole#1 for the backend PR.
The updated project uses Mantine as well as redux toolkit and rtk query
The hostship request will not work until: OpenSpace/OpenSpace#4184 is merged