A clean, scalable login form architecture in Swift using MVVM, Combine, and async/await.
This project demonstrates best practices for handling user authentication, form validation, and reactive UI logic in a testable and maintainable way.
- β MVVM architecture with protocol-oriented design
- β
Combine-based field validation (live feedback as user types) - β
async/await-based login flow with error handling - β Clean separation of concerns (validation, form state, business logic)
- β Easily extendable to Signup, Reset Password, etc.
- β Fully testable and dependency-injected services
LoginViewModel
βββ LoginFormComposition (Protocol)
β βββ LoginForm (Implements validation + fields)
β βββ AutoValidatingField (Reactive input with Combine)
βββ AuthenticationService (Protocol)
β βββ Mock or Real Login Service