Skip to content

A clean, scalable login form architecture in Swift using MVVM, Combine and async/await

Notifications You must be signed in to change notification settings

harikrishnabista7/CleanAuthArchitecture

Repository files navigation

CleanAuthArchitecture

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.


πŸš€ Features

  • βœ… 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

🧱 Architecture Overview

LoginViewModel
β”œβ”€β”€ LoginFormComposition (Protocol)
β”‚   └── LoginForm (Implements validation + fields)
β”‚       └── AutoValidatingField (Reactive input with Combine)
β”œβ”€β”€ AuthenticationService (Protocol)
β”‚   └── Mock or Real Login Service

About

A clean, scalable login form architecture in Swift using MVVM, Combine and async/await

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages