feat: fix issue #4 - #137
Open
mahakagarwal7 wants to merge 1 commit into
Open
Conversation
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 resolves Issue #4 by delivering a cohesive, single-page application (SPA) experience across the proxy (Gateway) and the Auth server. It fixes the broken frontend integration and implements a polished, aesthetic Login Page GUI.
What was changed:
1)Auth Page GUI Redesign (login.html & LoginController.java)
Problem: The auth page used the default Spring Security UI, which did not align with the overall application aesthetics.
Solution: Added Thymeleaf to the Auth service and implemented a custom login.html. The new GUI matches the LeetCode-inspired dark mode palette (glassmorphism, #1a1a1a backgrounds, and #ffa116 accents) to provide a premium, unified user experience.
2)SPA Proxy Integration (FrontendProxyController.java & GatewayApplication.java)
Problem: The Gateway proxy was previously dropping requests to the frontend SPA's static assets (CSS/JS chunks), resulting in a blank white screen.
Solution: Configured the Gateway to properly proxy all necessary HTTP methods and asset paths (/_astro/**, /*.svg, etc.) to the Astro frontend. The SPA now loads flawlessly through the proxy.
3)Seamless Login Redirection (LoginRedirectController.java & SecurityConfig.java)
Problem: The Gateway was intercepting login requests and displaying an unnecessary intermediate "Login with OAuth 2.0" selection screen.
Solution: Updated the Gateway's SecurityConfig to skip the default OAuth2 selection page. The new LoginRedirectController intercepts /login and seamlessly forwards users directly to the newly designed Auth page GUI, creating a smooth, SPA-like transition.
Why this doesn't break the original codebase?
Zero impact on core backend services: The problems-service and batch-service logic remains completely unchanged.
Secure by design: All OAuth2 standards and security chains remain intact. We merely styled the authentication endpoints and bypassed a redundant selection screen.
Non-disruptive proxying: The Gateway continues to securely guard backend API endpoints (/problems/, /code/) while accurately serving the frontend SPA files.