Objective: Analyze the codebase and identify different architectural layers (e.g., presentation, business logic, data access), highlighting inconsistencies or deviations from common architectural patterns.
Instructions:
- Analyze the codebase structure: Examine the directory structure, modules, and classes to understand how code is organized.
- Identify distinct layers: Look for code sections responsible for:
- Presentation: Handling user interface, user input, and displaying information (e.g., UI components, views, controllers).
- Business Logic: Implementing business rules, workflows, and data processing (e.g., services, business objects, use case classes).
- Data Access: Interacting with databases or external data sources (e.g., repositories, data access objects, API clients).
- Document each identified layer:
- Name the layer (e.g., "Presentation Layer", "Domain Layer", "Persistence Layer").
- Describe its purpose and responsibilities.
- List the key components or modules belonging to that layer.
- Analyze adherence to architectural patterns:
- Determine if the codebase follows any recognizable architectural patterns (e.g., Model-View-Controller, Model-View-ViewModel, Layered Architecture).
- Highlight any inconsistencies or deviations from these patterns. For example, if business logic is found within the presentation layer, explain the potential implications.
- Provide specific code examples: Illustrate your findings by referencing relevant code snippets that clearly demonstrate the separation (or lack thereof) between architectural layers.
Expected Output: A clear and well-structured report that:
- Identifies the architectural layers present in the codebase.
- Describes the purpose and responsibilities of each layer.
- Provides concrete code examples to support the analysis.
- Analyzes the codebase's adherence to common architectural patterns and highlights any inconsistencies or deviations.