A child must never lose a drawing: not because of a crash, a dead battery, an accidental delete or a broken tablet. At the same time drawings must stay private and on the device. The number of drawings is small (tens to hundreds).
Drawings are stored as plain files in the app’s private storage, without a database:
<app documents>/
├── trash/ # deleted drawings, same layout, with deletion date
└── drawings/
└── <uuid>/
├── drawing.json # the document, with schemaVersion
├── history.json # undo/redo history
├── thumbnail.png # gallery thumbnail
└── fills/ # bucket fill masks (after v1)
schemaVersion.trash/. It can be restored for
30 days and is purged automatically on app start afterwards. Emptying the
trash manually requires the parental gate.dataExtractionRules), so
drawings follow the child to a new tablet without going through the cloud..zip
file and “Import” to restore them, using the same documented layout.
Done in version 1.1, see ADR 0020.