Repository Resource Flow Pattern

An envelope family for repository results — a remote wrapper, a local wrapper with a loading state, and a payload-free variant — plus the wrap-side and collect-side helpers that stop every view model from hand-writing the same branch, where the mapping from transport model to domain model belongs, and the one thing the envelope must never swallow. Use when designing repository return types, when error handling has drifted apart between screens, or when a cancelled screen reports a failure it never had.

maxrave-dev cb61d44 7.7 KB Updated

File contents

maxrave-dev/kotlin-footguns/tree/main/skills/repository-resource-flow-pattern commit cb61d44f32

Frequently asked questions

npx skillmds@latest add maxrave-dev/repository-resource-flow-pattern