2.8 KiB
2.8 KiB
Task List: Angular to React Migration
This document tracks the tasks for migrating the Angular Clarity application to React with Bootstrap.
Phase 1: Project Setup & Core Infrastructure
- Task 1: Initialize React Project
- Use
create-react-appor Vite to set up the project structure. - Create initial
package.json. - Create placeholder
index.htmlandApp.js.
- Use
- Task 2: Install Dependencies
npm install bootstrap react-bootstrapnpm install react-router-domnpm install axios
- Task 3: Setup Project Folder Structure
- Create directories for
components,pages,hooks,services,contexts,utils.
- Create directories for
- Task 4: Implement Routing
- Set up
BrowserRouterinindex.js. - Create a main routing component (
AppRoutes.js) to define public and private routes.
- Set up
- Task 5: Authentication & State Management
- Create
AuthContextto manage user session and info, replacingUserInfoService. - Implement
useAuthhook.
- Create
- Task 6: API Service Layer
- Create a generic
useApihook or an API client singleton (e.g.,api.jsusingaxios) to handle requests, replacingApiRequestService.
- Create a generic
Phase 2: Feature Migration (Module by Module)
Admin Module
- Task 7: User Registration (
user-registration.component.ts)- Create
UserRegistration.jspage/component. - Build the form using
react-bootstrapcomponents. - Implement form state and validation (e.g., with
useStateorreact-hook-form). - Connect to the backend API using the API service layer.
- Create
- Task 8: Password Reset (
password-reset.component.ts)- Create
PasswordReset.jspage/component. - ... (similar sub-tasks as above)
- Create
- Task 9: Menu Group (
edit-menu-group.component.ts)- Create
EditMenuGroupPage.jscomponent. - Translate Angular template to React with react-bootstrap.
- Replicate component state and handlers.
- Create corresponding CSS and import it.
- Handle inconsistency in source HTML by matching table to headers.
- Create
- ... More admin components to be listed here ...
Builder Module
- Task 10: Dashboard (
dashboardnew.component.ts)- Create
Dashboard.jspage. - Migrate
line-chart.componentto a React chart component (using a library likeChart.jsorRecharts).
- Create
- ... More builder components to be listed here ...
FND Module
- ... FND module components to be listed here ...
Phase 3: Finalization
- Task 99: Final Review & Cleanup
- Code review all migrated components.
- Remove dead code.
- Task 100: Documentation
- Create
analysis_report.md. - Create
task_list.md. - Write final
instruction.mdwith setup and usage instructions.
- Create