Vue 3 Migration Plan - Side-by-Side Approach
Overview
Migrate DigiScript's frontend from Vue 2.7.14 to Vue 3 using a side-by-side approach where we build a new client-vue3/ directory alongside the existing Vue 2 client.
Migration Strategy
Side-by-Side Benefits
- Zero downtime: Existing Vue 2 application continues running
- Gradual migration: Features can be migrated incrementally
- Easy rollback: Can switch back to Vue 2 if issues arise
- A/B testing: Users can test new UI alongside old
- Reduced risk: No single massive migration event
Architecture
DigiScript/
├── client/ # Vue 2 (existing)
├── client-vue3/ # Vue 3 (new)
└── server/ # Backend (unchanged)
Current Vue 2 Analysis
Dependencies to Migrate
| Current (Vue 2) |
Vue 3 Target |
Migration Complexity |
| Vue 2.7.14 |
Vue 3.4+ |
✅ Straightforward |
| Vue Router 3.6.5 |
Vue Router 4+ |
⚠️ Breaking changes |
| Vuex 3.6.2 |
Pinia (recommended) |
🔄 API changes |
| BootstrapVue 2.23.1 |
PrimeVue/Quasar |
⚠️ Component rewrite needed |
| Vuelidate 0.7.7 |
@vuelidate/core 2+ |
⚠️ API changes |
| vue-native-websocket |
Custom composable |
🔄 Custom implementation |
Critical WebSocket Integration
Current implementation in main.js:30-61:
- Custom message handler with OP/ACTION routing
- Vuex store integration
- Automatic reconnection
- UUID-based client tracking
Migration Priority: WebSocket functionality is critical for live shows and must be migrated carefully.
Vuex Store Structure
Current modules requiring migration:
websocket - WebSocket state management (CRITICAL)
user - Authentication and RBAC (HIGH)
system - Configuration and settings (MEDIUM)
show - Core business logic (HIGH)
script - Script management (HIGH)
scriptConfig - Script configuration (MEDIUM)
Component Structure
- 18 Views: Mix of simple and complex components
- 22 Components: Reusable components with varying complexity
- Complex Components: Script editor, live script viewer, RBAC management
Implementation Phases
Phase 1: Foundation (Week 1-2)
Phase 2: State Management (Week 3-4)
Phase 3: Core Components (Week 5-8)
Phase 4: Show Management (Week 9-12)
Phase 5: Advanced Features (Week 13-16)
Phase 6: Testing & Deployment (Week 17-20)
Technical Considerations
WebSocket Migration
Current pattern requires careful migration:
// Vue 2 (current)
Vue.use(VueNativeSock, websocketURL, {
store,
passToStoreHandler(eventName, event, next) {
// Custom OP/ACTION message routing
}
});
// Vue 3 (target)
const useWebSocket = () => {
// Custom composable with Pinia integration
// Maintain OP/ACTION routing compatibility
};
RBAC Complexity
Complex bitwise permission checking in store getters:
- IS_ADMIN_USER, IS_SHOW_EDITOR, IS_SHOW_READER
- IS_SHOW_EXECUTOR, IS_SCRIPT_EDITOR, IS_CUE_EDITOR
- Nested permission logic with show-specific access
Router Guards
Complex authentication logic in router/index.js:125-235:
- Multi-level permission checking
- RBAC integration
- Show access validation
- WebSocket health verification
Risk Mitigation
Critical Risks
- WebSocket Integration: Core to live show functionality
- Mitigation: Prioritize WebSocket migration, extensive testing
- RBAC Permissions: Complex business logic
- Mitigation: Comprehensive permission testing, user acceptance testing
- Real-time Features: Script synchronization across clients
- Mitigation: Multi-client testing scenarios
Deployment Strategy
- Serve both versions from server
- URL routing:
/ (Vue 2), /v3/ (Vue 3)
- Feature flags for gradual rollout
- Rollback capability maintained
Success Criteria
Next Steps
- Get stakeholder approval for side-by-side approach
- Set up development environment with
client-vue3/
- Begin Phase 1: Foundation setup
- Establish testing strategy for critical WebSocket features
Vue 3 Migration Plan - Side-by-Side Approach
Overview
Migrate DigiScript's frontend from Vue 2.7.14 to Vue 3 using a side-by-side approach where we build a new
client-vue3/directory alongside the existing Vue 2 client.Migration Strategy
Side-by-Side Benefits
Architecture
Current Vue 2 Analysis
Dependencies to Migrate
Critical WebSocket Integration
Current implementation in
main.js:30-61:Migration Priority: WebSocket functionality is critical for live shows and must be migrated carefully.
Vuex Store Structure
Current modules requiring migration:
websocket- WebSocket state management (CRITICAL)user- Authentication and RBAC (HIGH)system- Configuration and settings (MEDIUM)show- Core business logic (HIGH)script- Script management (HIGH)scriptConfig- Script configuration (MEDIUM)Component Structure
Implementation Phases
Phase 1: Foundation (Week 1-2)
client-vue3/directory structurePhase 2: State Management (Week 3-4)
Phase 3: Core Components (Week 5-8)
Phase 4: Show Management (Week 9-12)
Phase 5: Advanced Features (Week 13-16)
Phase 6: Testing & Deployment (Week 17-20)
Technical Considerations
WebSocket Migration
Current pattern requires careful migration:
RBAC Complexity
Complex bitwise permission checking in store getters:
Router Guards
Complex authentication logic in
router/index.js:125-235:Risk Mitigation
Critical Risks
Deployment Strategy
/(Vue 2),/v3/(Vue 3)Success Criteria
Next Steps
client-vue3/