Repository navigation
Description
Outcome of spike should determine how many components need upgrading, which team members will be involved in the work, and for how long.
Phase 1: Migration to Nuxt
This phase focuses on restructuring and migrating the current Vue 3 codebase to Nuxt, retaining Vue’s core components, while improving the overall architecture and file structure.
Task Breakdown
Adopt Nuxt Folder Structure
Objective: Move existing files to align with Nuxt’s file structure, especially focusing on the pages, components, layouts, and store directories.
Steps:
- Identify core components and organize them under components/.
- Move individual view files under pages/, ensuring they maintain routing integrity.
- Transfer global state management files into Nuxt’s store structure if using Pinia.
- Considerations: Since routing in Nuxt is file-based, carefully map the routes to Nuxt’s structure to avoid broken paths.
- Remove Boilerplate Code and Module Import/Exports
Objective: Utilize Nuxt's built-in features (such as automatic import and file-based routing) to streamline the codebase.
Steps:
- Gradually remove any import/export statements for components, plugins, and pages that Nuxt can auto-import.
- Refactor module code to use Nuxt’s global access patterns to reduce redundancies.
- Considerations: Keep track of all manually imported modules to avoid accidental removal of necessary dependencies.
- Maintain Single Page Application and Current State Management
Objective: Use Nuxt as an SPA initially without shifting state management to the Nuxt store for simplicity and ease of testing.
Steps:
- Configure Nuxt as an SPA to avoid SSR complexities during the initial migration.
- Refactor only where necessary for compatibility, keeping the state management unchanged.
- Considerations: This keeps the migration focused on Nuxt structure changes without adding potential issues from SSR or state changes.
- Regression Testing in DEV & TEST Environments
Objective: Ensure all functionality works as expected in the new Nuxt structure.
Steps:
- Develop test cases covering all major features.
- Use Nuxt’s tools (like @nuxt/test-utils) to automate end-to-end testing where possible.
- Identify and log any new issues caused by the migration.
- Considerations: Plan for testing coverage early to prevent migration bugs from reaching production.
- Release to Production with Vuetify Components
Objective: Deploy the refactored codebase with minimal changes to the front-end appearance by keeping Vuetify as the UI library.
Steps:
- Conduct a pre-release regression test in a staging environment.
- Document any temporary limitations, such as partial Nuxt capabilities or pending refactoring in preparation for Phase 2.
- Considerations: Communicate any impact on users, like changes in performance or UI behaviour, in release notes.
General Strategy for the Migration
The phased approach provides a low-risk, step-by-step transition that keeps current functionality intact while making incremental improvements.
Keeping Vuetify for now reduces potential issues with UI compatibility and allows for a focused migration.
Suggested Timeline & Phase 1 Priority Outline
Sprints 1-2:
- Folder Structure Alignment and Boilerplate Removal
- Complete Refactoring for SPA and Dependency Adjustments
Sprints 1-2:
- Full Testing Cycle in DEV and TEST
- Week 7: Staging and Production Release
Next Steps for Phase 2 Planning
Sprints 1-2:
- After completing Phase 1, Phase 2 would involve component replacement and styling adjustments as you transition from Vuetify to Nuxt UI and Tailwind CSS.
- Following the Nuxt Architecture upgrade, more discovery must take place to finding a means to support both libraries in parallel.
Sprints???? (Many):
- Once we can do this reliably, we will be able then be able to estimate what it will take to rewrite components gradually and move away from Vuetify.
- Each and every component replacement would also require extensive regression testing as well as unit test refactors.
Activity