frontend/src-tauri/CLEANUP_PLAN.md
After analyzing the src-tauri codebase, I've identified several areas requiring cleanup and optimization. The codebase shows signs of rapid development with some architectural debt that can be addressed systematically.
lib_old_complex.rs (2,437 lines) - Large legacy file that appears to contain old implementationaudio/ and audio_v2/ modules exist, indicating migration in progresspub use * wildcard imports creating unclear dependency boundariesPriority: High | Risk: Low | Estimated: 2-3 hours
Remove legacy file
lib_old_complex.rs after ensuring no active dependenciesConsolidate audio systems
Clean up TODO markers
Priority: Medium | Risk: Medium | Estimated: 4-5 hours
Simplify module structure
Standardize command patterns
Improve imports and exports
pub use * with explicit imports where possiblePriority: Medium | Risk: Low | Estimated: 2-3 hours
Dependency audit
Feature flag optimization
Configuration cleanup
Priority: Low | Risk: Low | Estimated: 3-4 hours
Error handling standardization
Performance optimizations
Documentation and testing
This plan will significantly improve code maintainability while preserving all existing functionality.