Skip to content

Web: Modernize Frontend and Authentication [v2-r4]#1119

Merged
kennethmyhra merged 7 commits intoFirelyTeam:v2-r4/masterfrom
kennethmyhra:backport-new-ui-to-v2-r4
Mar 7, 2026
Merged

Web: Modernize Frontend and Authentication [v2-r4]#1119
kennethmyhra merged 7 commits intoFirelyTeam:v2-r4/masterfrom
kennethmyhra:backport-new-ui-to-v2-r4

Conversation

@kennethmyhra
Copy link
Collaborator

Modernize Spark.Web Frontend and Authentication

This PR replaces the legacy ASP.NET MVC frontend and Identity authentication with a modern React SPA and GitHub OAuth.

Summary

  • New React frontend built with Vite, TypeScript, and Tailwind CSS v4
  • GitHub OAuth replaces ASP.NET Identity for simpler, passwordless admin access
  • Removes legacy code (old webpack frontend, EF Core migrations, Razor views)

Commits Walkthrough

1. 78d4b3e - Web: Add React frontend with Vite

Introduces the new frontend stack:

  • Vite + TypeScript for fast builds and HMR
  • Tailwind CSS v4 with custom Incendi blue flame theme
  • React Router for SPA navigation
  • SignalR hooks (useMaintenanceHub) for real-time admin operations (Clear Store, Rebuild Index, Load Examples)

Key files: src/Spark.Web/app/

2. 87367ac - Web: Replace ASP.NET Identity with GitHub OAuth

Implements GitHub OAuth authentication:

  • AuthController handles OAuth callback and cookie auth
  • AdminClaimsTransformation maps GitHub usernames to admin role
  • Configurable admin users in appsettings.json

Key files: Controllers/AuthController.cs, Services/AdminClaimsTransformation.cs

3. f7ae594 - Web: Remove legacy MVC, Identity, and EF Core infrastructure

Cleans up replaced components:

  • Removes ClientApp/ (old webpack-based frontend)
  • Removes Identity controllers, views, and EF Core migrations
  • Removes ApplicationDbContext and SQLite dependency

4. Adjustments to new front end, and test enhancements

8c8e66f Adjusts router and Dockerfile to new Frontend. Also updates integrationstests, as they seemed to pull images from Docker Hub.

  • Configure routing to support SPA client-side navigation
  • Update Dockerfile with npm build steps for React app
  • Fix environment variable precedence for Docker deployments
  • Improve cookie handling and redirect safety
  • Update integration tests to build from source

Configuration for testing

Add GitHub OAuth credentials to appsettings.json:

{
  "GitHub": {
    "ClientId": "your-client-id",
    "ClientSecret": "your-client-secret",
    "AdminUsers": ["github-username"]
  }
}

losolio added 4 commits March 7, 2026 15:29
Adds  a modern React frontend:
- Vite build tooling with TypeScript
- Tailwind CSS v4 with custom Incendi blue flame theme
- React Router for SPA navigation
- SignalR hooks for real-time admin operations
- Prepares for an optional GitHub OAuth authentication support
- Add AuthController for GitHub OAuth callback
- Add AdminClaimsTransformation for role mapping
- Configure GitHub OAuth in Startup.cs
- Add appsettings.json with GitHub OAuth config
- Update Spark.Web.csproj with Vite integration
- Simplify Program.cs configuration
Remove obsolete components replaced by React SPA and GitHub OAuth:
- ClientApp/ (old webpack-based frontend)
- Controllers: AdminController, HomeController, ResourcesController
- Data/: ApplicationDbContext, ApplicationDbInitializer
- Migrations/: EF Core Identity migrations
- Settings/: AppSettings.cs
- Views/: Admin, Home, Resources razor views
- wwwroot/.gitkeep
- Configure routing to support SPA client-side navigation
- Update Dockerfile with npm build steps for React app
- Fix environment variable precedence for Docker deployments
- Improve cookie handling and redirect safety
- Update integration tests to build from source

Revert changes in integrations tests

Removed unused curl package

Revert some of the program.cs changes

Revert integration-tests docker-compose

Web: Link user to json format of capability statement

Web: update HomePage links for capability statement and add API documentation

Web: Update url to show json from resources

One more...

Remove db auth..
@kennethmyhra kennethmyhra changed the title Web: Modernize Frontend and Authentication Web: Modernize Frontend and Authentication [v2-r4] Mar 7, 2026
In net10.0 IWebHostBuilder is marked as obsolete.

Also refactor the startup sequence, by building a default IConfiguration
from our new helper class AppSettings + moves the database seeding into
Startup.Configure().
@kennethmyhra kennethmyhra merged commit 89e17e6 into FirelyTeam:v2-r4/master Mar 7, 2026
5 checks passed
@kennethmyhra kennethmyhra deleted the backport-new-ui-to-v2-r4 branch March 7, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants