Project Structure
Overview of the EasyAppSwiftUI boilerplate file and folder organization
Project Overview
Since Apple has not officially provided a best practice for SwiftUI project structure so far, EasyApp has referenced numerous open-source projects and WWDC sample code, combined with our own experience, to provide a complete project structure that facilitates future iterability and maintainability of the entire project.
Root Directory Structure
Main application modules containing all business logic pages
Core functionality library containing app's core services
Reusable UI component library
SwiftUI view modifiers
Swift type extensions
Utility classes and helper functions
Common modules and shared state
Application constant definitions
Color theme definitions
Custom style definitions
Application resource files
Localization resources
Directory Descriptions
Core Directories
-
App/: Main functional modules of the application, divided into different subdirectories by functionality
AIExample/: AI functionality examples and related pagesInAppPurchases/: In-app purchase functionality implementationLoginAndSignUp/: User authentication flowMainView/: Application main interfaceOnboarding/: User onboarding flowSettings/: Application settings pages
-
Lib/: Core functionality library providing basic services for the application
Auth/: User authentication managementInAppPurchases/: In-app purchase management (supports RevenueCat and StoreKit2)Supabase/: Supabase backend service integration
UI Components and Styles
- Components/: Reusable UI component library
- ViewModifier/: SwiftUI view modifiers providing common view behaviors
- Styles/: Custom style definitions
- Colors/: Application color themes
Tools and Extensions
- Extension/: Extension functionality for Swift native types
- Utils/: Utility classes and helper functions
- Common/: Common modules and application state management
- Constants/: Application constants and configuration
Resource Files
- Assets.xcassets/: Application icons, images, and other resources
- Resource/: Localized string resources
Last updated on