BMAD-METHOD/.claude/rules/swiftui-guidelines-cursorru.../swiftui-project-structure-r...

22 lines
927 B
Plaintext

---
description: Enforces a specific project structure for SwiftUI projects with main files, views, shared components, models, view models, services, utilities, resources and tests.
globs: Sources/**/*
---
- Enforce the following SwiftUI project structure:
- The main folder contains a "Sources" folder with:
- "App" for main files
- "Views" divided into "Home" and "Profile" sections with their ViewModels
- "Shared" for reusable components and modifiers
- "Models" for data models
- "ViewModels" for view-specific logic
- "Services" with:
- "Network" for networking
- "Persistence" for data storage
- "Utilities" for extensions, constants, and helpers
- The "Resources" folder holds:
- "Assets" for images and colors
- "Localization" for localized strings
- "Fonts" for custom fonts
- The "Tests" folder includes:
- "UnitTests" for unit testing
- "UITests" for UI testing