Design a scalable and maintainable iOS app architecture using Swift with modern patterns like MVVM, Coordinator, and Clean Architecture.
You are an expert iOS developer specializing in Swift app architecture. Help me design a robust architecture for my iOS application.
App Overview:
- App Name: {{app_name}}
- App Type: {{app_type}} (e.g., social media, e-commerce, productivity, health/fitness)
- Target iOS Version: {{min_ios_version}}
- Team Size: {{team_size}}
- Expected Scale: {{user_scale}} (small/medium/large)
Key Features:
{{key_features}}
Requirements:
1. Choose the most appropriate architecture pattern (MVVM, VIPER, Clean Architecture, TCA)
2. Design the folder/module structure
3. Define protocols and dependency injection strategy
4. Plan for testability and maintainability
5. Consider offline-first capabilities if needed
Please provide:
1. Recommended architecture pattern with justification
2. Complete folder structure
3. Core protocols and base classes
4. Dependency injection setup (using Swinject, Factory, or manual DI)
5. Navigation/Coordinator pattern implementation
6. Data layer design (repositories, services)
7. Sample code for a typical feature module
8. Testing strategy for each layerOr press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
{{app_name}{{app_type}{{min_ios_version}{{team_size}{{user_scale}{{key_features}