This project provides a VIPER architecture-based, modular, testable, and scalable starter infrastructure for modern iOS applications.
It is designed for maintainability, readability, and easy management in large-scale projects.
Minimum Requirement:
This project is developed for iOS 15.0 and above.
It leverages modern Swift concurrency features (async/await
,@MainActor
,Task
, etc.) and is fully compatible with Swift 6+ and Xcode 16.4+.
- Built on a base VIPER architecture.
- Each module (e.g., Auth, Onboarding, Home) has its own independent VIPER layers:
View
,Interactor
,Presenter
,Entity
,Router
. - Comes with an embedded Auth module that includes essential flows:
- Login
- Signup
- Password Reset
- β
Firebase Ready:
- Firebase Authentication, Analytics, etc. can be integrated out-of-the-box.
- π οΈ Custom Backend:
- Easily integrate your own backend authentication logic.
- Thanks to protocol-oriented and modular VIPER structure, only the Interactor and Service layers need to be updated.
β οΈ IMPORTANT:
To switch the authentication provider (e.g., from Firebase to custom backend),
update the relevant configuration inAppDelegate.swift
.
(See the authentication setup section in the file.)
- Modularity: Each module can be developed, tested, and reused independently.
- Easy Customization: Themes, localization, analytics services, and helper components are easily pluggable.
-
Environment Configuration
- Supports multiple environments (
development
,staging
,production
) viaAppEnvironment
. - Automatically selects base URL and environment-specific settings.
- Supports multiple environments (
-
Secure Session & Token Management
- Managed via
SessionManager
, securely stores tokens in Keychain.
- Managed via
-
Centralized Validation
ValidationManager
protocol handles all form/auth validations.
-
Localization
- Multi-language support out-of-the-box.
- Easily add new languages by updating
.strings
files.
-
Custom UI Components
- Reusable & themeable:
CustomButton
,CustomTextField
, etc.
- Reusable & themeable:
-
Firebase App Check Support
- Integrated for added security in dev and prod.
-
Testability
- Protocol-based architecture supports easy unit/UI testing.
- Dependency Injection ready.
- Swift 6.x (Fully compatible with Swift 6.1)
- iOS 15.0+ (Minimum deployment target)
- VIPER Architecture
- UIKit
- Dependency Injection (DI)
async/await
,@MainActor
,Task
- Protocol-Oriented Programming
- Localization & Theming
- Firebase Analytics Integration
- Custom Base Classes
- Clean Code & Documentation
git clone https://github.com/Okariuss/VIPER-base.git
- Use Swift Package Manager. Open the project in Xcode and wait for it to resolve packages.
If you're using Firebase services (e.g., Auth, Analytics):
- Go to Firebase Console.
- Download:
GoogleService-Info.plist
for productionGoogleService-Debug-Info.plist
for development (optional)
- Place the files in the following directory:
iosBase/Resources/Google Firebase/
- β Ensure exact file names and paths. Incorrect naming or directory will break integration.
If you're using your own backend for auth:
- Open
AppDelegate.swift
- Follow the inline comments to switch between Firebase and custom logic
- Adjust DI containers and auth services accordingly
- Open the project in Xcode 16.4+
- Select a build scheme
- Press Run
- Create a folder under
Modules/
(e.g.,Profile/
) - Add the five VIPER components:
ProfileViewController
ProfilePresenter
ProfileInteractor
ProfileEntity
ProfileRouter
ProfileBuilder
- Register the module in the DI container if needed
- Use the builder to instantiate and present the module
Pull requests and issues are welcome!
Please follow the existing code style and architectural conventions when contributing.
MIT
- Minimum iOS 15.0 required (due to modern Swift concurrency)
- Fully compatible with Swift 6.1 and Xcode 16.4+
Feel free to reach out for questions, feedback, or collaboration!