Phase 1: Angular to React Migration - Project Setup and Foundation #143
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
This PR implements Phase 1 of the Angular to React migration by setting up the React project foundation. The changes include:
create-react-appin theangular-hn-react/directoryreact-router-dom(replaces Angular Router)axios(for API calls)rxjs(for Observable patterns)workbox-precaching,workbox-routing,workbox-strategies(PWA functionality)styled-components(component styling)components/core/(Header, Footer, Settings)components/feeds/(Feed, Item)components/item-details/(ItemDetails, Comment)components/user/(User)services/(hackerNewsApi.ts, settings.ts placeholders)hooks/,types/,utils/The project builds successfully with
npm run build.Review & Testing Checklist for Human
angular-hn-react/src/matches the expected organization for subsequent migration phasespackage.jsonwith appropriate versionscd angular-hn-react && npm install && npm startto verify the development server starts correctly on localhost:3000Recommended test plan: Navigate to the
angular-hn-reactdirectory, runnpm installfollowed bynpm start, and confirm the default React app loads in the browser. This validates the foundation is ready for Phase 2 component migration.Notes
hackerNewsApi.ts,settings.ts) contain only empty exports as placeholders - actual implementation will be added in Phase 2package-lock.jsonis auto-generated and contains ~17k lines of dependency resolutionLink to Devin run: https://app.devin.ai/sessions/558fe46e7fc74210968bd863411e9d23
Requested by: Daniella Grimberg (daniella.grimberg@cognition.ai) / @danigrim