Migrate admin panel from Blazor WASM to React SPA#152
Merged
Conversation
Introduce minimal API endpoints under /api/admin for the React admin dashboard migration. Covers events CRUD (with publish/cancel/mark-passed), partners CRUD, external apps management, and auth/me endpoint. All endpoints require AdminOnly policy with antiforgery disabled for JSON-based SPA consumption. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Initialize src/admin/ with Vite React-TS template. Configure Tailwind CSS 4 with project theme tokens, set base path to /admin/, build output to wwwroot/admin/, and dev proxy to ASP.NET Core. Install TanStack Router and Query for routing and data fetching. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement all admin pages in React: events list with search/pagination, event create/edit form (activities, partners, image upload), external apps management with secret generation, and partners CRUD. Set up API client layer with TanStack Query hooks, TanStack Router with file-based routing, and admin layout with header/sidebar. Wire ASP.NET Core to serve the React SPA via MapFallbackToFile for client-side routing under /admin/. Add admin:dev and admin:build scripts to root package.json. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Delete src/app.client/ project entirely — all admin pages are now in the React SPA. Remove WASM render mode from Program.cs and Extensions.cs, remove WebAssembly.Server package and project reference from app.csproj, remove from solution file and Dockerfile. Move EventActivityCard component to server project for the public event details page. Clean up admin-only JS functions (toggleExpand, saveDraft, copySecretToClipboard, etc.) and delete unused JS API wrappers. Remove admin sidebar/activity-popup CSS from input.css. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
src/admin//api/admin/*) for events CRUD, partners CRUD, external apps, auth, and file uploads — all behindAdminOnlypolicyFileUploader,FileDownloader,FileManagerimplementations, aPOST /api/admin/files/uploadendpoint, and anImageUploadReact component/eventspage on the public site and add "All Events" link to the navbar.envvariables, standalonedocker-compose.infra.yml, Caddy reverse proxy configsrc/app.client/(Blazor WASM), remove WASM packages/references, remove admin-only JS/CSSTest plan
docker compose -f docker-compose.infra.yml up -dstarts SQL Server and MinIOdotnet build src/app/app.csprojsucceeds (implicitly builds the React SPA)/admin— dashboard loads with stats and charts/eventspage renders with upcoming and previous events/events/{id}detail page works/adminviaHttpContext.Response.Redirect🤖 Generated with Claude Code