feat: migrate from Express/AngularJS to Next.js/React#12
Open
blues-man wants to merge 1 commit into
Open
Conversation
Replace the Node.js Express server + AngularJS 1.x SPA with a Next.js 14 App Router application using React 18 and TypeScript. This modernizes the CoolStore web UI while preserving all existing functionality. Key changes: - Express server → Next.js built-in server with App Router - AngularJS controllers/directives → React function components with hooks - Gulp config generation → Next.js environment variables - AngularJS $http service → native fetch with async/await - HTML templates with ng-* → JSX/TSX components - kube-probe middleware → /api/health route handler - boom Express middleware → /api/boom route handler + Next.js middleware - Static assets moved from app/imgs/ to public/imgs/ - Dockerfile updated for multi-stage Next.js standalone build - PatternFly CSS styling preserved Closes #3, #4, #5, #6, #7, #8, #9, #10, #11 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
What changed
server.js+bin/www(Express)app/app.js(AngularJS module)src/app/layout.tsx(React)app/controllers/controllers.jssrc/app/page.tsx+src/components/*.tsxapp/services/catalog.js($http)src/lib/catalog.ts(fetch + async/await)app/directives/header.jssrc/components/Header.tsxviews/partials/*.html(ng-repeat, ng-if)gulpfile.js+ config generationnext.config.js+ env varsmiddleware/boom.js(Express)src/app/api/boom/route.ts+src/middleware.tskube-probesrc/app/api/health/route.tsDockerfile(node:14)Test plan
npm run buildpasses with zero type errorsnpm run devstarts on port 8080GET /renders PatternFly layout with header and product gridGET /api/healthreturns{"status":"UP"}GET /api/boomtoggles degraded statedocker build -t coolstore-web .Closes #3, #4, #5, #6, #7, #8, #9, #10, #11
🤖 Generated with Claude Code