chore(angular-react): Migrate Conduit to React + TypeScript + Vite (parallel rewrite)#40
Open
devin-ai-integration[bot] wants to merge 4 commits into
Open
chore(angular-react): Migrate Conduit to React + TypeScript + Vite (parallel rewrite)#40devin-ai-integration[bot] wants to merge 4 commits into
devin-ai-integration[bot] wants to merge 4 commits into
Conversation
Co-Authored-By: Lukas Burger <lukaskburger@gmail.com>
Co-Authored-By: Lukas Burger <lukaskburger@gmail.com>
Co-Authored-By: Lukas Burger <lukaskburger@gmail.com>
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
Parallel React + TypeScript + Vite rewrite of the Angular Conduit app, living entirely in a new
react-app/subdirectory. The Angular source undersrc/is untouched — this adds a second, independent frontend that talks to the same RealWorld API (https://api.realworld.show/api) with identical data contracts, routes/URLs, and styling.Why: groundwork to evaluate/move off Angular without disrupting the existing app or its e2e/CI.
What was ported (1:1, no behavior changes)
UserServicecollapse into a small fetch wrapper + anAuthProvidercontext:apiClientprepends the API root, injectsAuthorization: Token <jwt>(token inlocalStorage['jwtToken']), and globally purges auth on a401for any endpoint except/user(the olderrorInterceptor).AuthContextreproduces the auth state machineloading → authenticated | unauthenticated | unavailable, including the startupgetCurrentUser()initializer, 4XX→logout vs 5XX→retry distinction, and exponential backoff (2,4,8,16,16s).window.__conduit_debug__is re-exposed for the e2e debug helpers.articles,comments,tags,profile,userand all interfaces (User,Profile,Article,Comment,ArticleListConfig, ...)./,/tag/:tag,/login,/register,/settings,/profile/:username(+/favoritesnested),/editor,/editor/:slug,/article/:slug), with?feed=following/?page=Nquery params and route guards.MarkdownPipe→marked+DOMPurify;DefaultImagePipe→defaultImage(); Angular date pipes →Intl.DateTimeFormat.styles.css,conduit-logo.svg,default-avatar.svgintoreact-app/. (Original app is not a PWA — nothing to port there.)Lifecycle mapping, e.g. the
ArticleListquery:Repo-level change
.prettierignore(react-app/dist,react-app/package-lock.json,node_modules) so the existingformat:checkCI job ignores generated React output. All committedreact-appsources are Prettier-clean.Verification
cd react-app && npm run build→ 0 TypeScript errors;npm run lint→ 0 errors (1 non-blockingreact-refreshwarning); repobun run format:checkpasses.localhost:4200: register/login/logout, create article (markdown + tags), comment, favorite (count updates), follow, tag filter, profile tabs, settings prefill + update + error display.Link to Devin session: https://app.devin.ai/sessions/eb3cec2ca42643a9a3a780ab08132089
Requested by: @lburgers
Devin Review