dbjpanda/kwery ? reverse-engineered prompt
Reverse engineered prompt
Build me an Android library for managing server data in apps.
I want it to sit on top of my existing network layer, like Retrofit or Ktor, and handle the messy parts for me. It should decide when to actually call the network, keep one request shared if two screens ask for the same data, show loading and refreshing states correctly, and keep the last good data on screen if a refresh fails. It should also support offline use, so writes can be queued and replayed later when the connection comes back.
Please make it work nicely with Kotlin coroutines and Flow, and add a simple Compose friendly way to read query state from screens. If it makes sense, include a way to persist cache across process death, ideally with Room support. A small sample app and tests for the important behavior would be great too. Look up current docs online if you need to.
Are you gonna build this?
make sure you review the code using coderabbit