advanced
Legacy Code Architectural Refactoring
Transform a monolithic code snippet into a modular, scalable architecture using modern design patterns.
📝 Prompt Inhoud
Analyze the provided legacy code snippet. Identify code smells, tight coupling, and violations of SOLID principles. Refactor the code into a modern, modular architecture suitable for a microservices or modular monolith environment. Provide the refactored code, explain the specific design patterns applied (e.g., Factory, Strategy, Observer), and generate unit tests to verify the new functionality maintains the original behavior while improving maintainability.