feature: React + TypeScript port of the Angular RealWorld app (react-app/)#41
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
feature: React + TypeScript port of the Angular RealWorld app (react-app/)#41devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
…react-app/ Co-Authored-By: Lukas Burger <lukaskburger@gmail.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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
Adds a full, visually- and functionally-equivalent React 18 + TypeScript (Vite) port of the Angular RealWorld "Conduit" app in a new top-level
react-app/folder. The Angular app is left completely untouched for side-by-side comparison.The port mirrors the Angular architecture 1:1 and talks to the same
https://api.realworld.show/apibackend with identical request/response shapes:Angular services → API modules (
src/api/*.ts):articles,comments,tags,profiles, plus aclient.tsthat reproduces the three Angular HTTP interceptors:apiInterceptor→ API root prefixtokenInterceptor→Authorization: Token <jwt>headererrorInterceptor→ global 401-logout (for non-/userendpoints) + error normalizationUserService(RxJS) →AuthContext(src/auth/AuthContext.tsx): reproduces the auth state machine (loading → authenticated | unauthenticated | unavailable), including the key 4XX-vs-5XX behavior onGET /user:It also re-exposes the
window.__conduit_debug__interface (getToken/getAuthState/getCurrentUser) used by the e2e debug helpers.Angular pipes → utils (
src/utils/format.ts):DefaultImagePipe,DatePipe('longDate'),MarkdownPipe.Angular guards → route wrappers (
RequireAuth/RedirectIfAuth).Routing: React Router mirrors the Angular routes exactly, with lazy-loaded pages and the same nested profile children:
/and/tag/:tag/login,/register/settings/editor,/editor/:slug/article/:slug/profile/:usernameindex= My Posts/profile/:username/favoritesStyling: reuses the shared RealWorld theme (
realworld/assets/theme/styles.css) verbatim. The theme scopes its sticky-footer flex rules to the Angularapp-roothost;src/app-shell.cssre-applies the identical rules to React's#rootso footer placement matches pixel-for-pixel.Component map (Angular → React)
HeaderComponent→Header,FooterComponent→Footer,ListErrorsComponent→ListErrors,ArticleListComponent→ArticleList,ArticlePreviewComponent→ArticlePreview,ArticleMetaComponent→ArticleMeta,FavoriteButtonComponent→FavoriteButton,FollowButtonComponent→FollowButton, comment card→ArticleComment, plus the page components above.Visual parity
Captured with Playwright/Chromium at a fixed
1280×900viewport against both running apps (Angular:4200, React:4300). Active-nav colors and the sticky-footer position were verified to match exactly via computed styles./)/article/:slug)/profile/:username)/login)/settings)/editor)How to run
Notes / known differences
react-app/src/styles.css(the Angular build pipeline consumes the submodule copy directly; Vite needs a local import). They are identical apart from the documented#rootshell rules.Link to Devin session: https://app.devin.ai/sessions/95c531d8544047ebab71cb87f3eea49a
Requested by: @lburgers
Devin Review