Skip to content

feat: React + TypeScript Vite project setup (Phase 1 migration infrastructure)#169

Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1771014528-react-migration-phase1
Open

feat: React + TypeScript Vite project setup (Phase 1 migration infrastructure)#169
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1771014528-react-migration-phase1

Conversation

@devin-ai-integration
Copy link

feat: React + TypeScript Vite project setup (Phase 1 migration infrastructure)

Summary

Creates a new react-app/ directory containing a Vite + React + TypeScript project as the foundation for migrating the Angular2-HN Hacker News PWA. This is Phase 1 (infrastructure only) of a multi-phase migration.

What's included:

  • Vite project with React 19 + TypeScript (strict mode)
  • React Router v6 and TanStack Query wired into main.tsx
  • VitePWA plugin configured with Workbox service worker and manifest (migrated from Angular's src/manifest.json)
  • SCSS preprocessing support
  • Project structure: components/, hooks/, context/, types/, pages/, utils/
  • TypeScript interfaces for HN data models (HNStory, HNComment, HNUser, Settings, FeedType)
  • Icon assets copied from the Angular app

Review & Testing Checklist for Human

  • Critical: Run rm -rf node_modules && npm install && npm run build in react-app/ — verify sass package is properly listed in devDependencies (the dependency shuffling during setup may have dropped it)
  • Verify vite-plugin-pwa v1.2.0 works correctly with Vite 7.3.1 (build passes but runtime service worker behavior is untested)
  • Check that TypeScript types in src/types/index.ts align with expectations from parallel migration tracks
  • Update index.html title from "react-app" to "React HN" and consider updating favicon

Test Plan

  1. cd react-app && npm install && npm run build — should complete without errors
  2. npm run dev — should start dev server on localhost:5173
  3. Open browser and verify placeholder page renders
  4. Check browser DevTools → Application → Manifest to verify PWA manifest loads

Notes

  • The tsconfig.node.json has allowJs: true added as a workaround for vite-plugin-pwa type compatibility with Vite 7
  • Empty scss: {} config block in vite.config.ts is intentional (the api: 'modern-compiler' option caused type errors)
  • Workbox packages (workbox-precaching, etc.) are not directly installed — vite-plugin-pwa bundles them internally

Link to Devin run: https://app.devin.ai/sessions/23b9a7750ae94da3ac6861f813f3ccd4
Requested by: @eashansinha

- Create react-app/ with Vite + React + TypeScript template
- Install React Router v6, TanStack Query, Workbox, SCSS (sass)
- Configure VitePWA plugin with Workbox service worker and manifest
- Set up project structure: components, hooks, context, types, pages, utils
- Migrate PWA manifest and icon assets from Angular app
- Configure SCSS preprocessing support in Vite

Co-Authored-By: Eashan Sinha <eashan.sinha@codeium.com>
@devin-ai-integration
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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.

0 participants