Flutter Domain Driven Design Principles the class dependency flow together with the file and folder structure were neatly outlined for you and it’s possible to use Clean Architecture with Firebase.

Flutter App Architecture: The Repository Pattern In this context, we can use the repository pattern to access data objects from various sources, such as a backend API, and make them available as type-safe entities to the domain layer of the app (which is where our business logic lives).

Firebase Tutorial: Real-Time Chat Learn to build a chat app with Firebase and MessageKit!