'What are other use cases of the Repository class in MVVM?

I know its used for getting Data from the server and cache but what else is the repository class used for? I’m using the MVVM pattern and wonder where to put I/O operations like saving and writing a file. I also have a coin system in my app and I need to access that coin Int from every screen in my app (settings, profile, home etc), is the Repository a good place to put it?

P.s I'm using Dagger Hilt



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source