Skip to content

Add mobile storage standards documentation#21

Merged
shubham1g5 merged 4 commits intomasterfrom
shubham1g5-patch-1
Apr 28, 2026
Merged

Add mobile storage standards documentation#21
shubham1g5 merged 4 commits intomasterfrom
shubham1g5-patch-1

Conversation

@shubham1g5
Copy link
Copy Markdown
Contributor

Document guidelines for using SQLite DB versus Shared Preferences in mobile storage.

Changeset Category

This PR is streamlined for review in the following category

  • Modernization
  • Bug Fix
  • Process
  • Refactor
  • Performance
  • Documentation

Document guidelines for using SQLite DB versus Shared Preferences in mobile storage.
Copy link
Copy Markdown

@OrangeAndGreen OrangeAndGreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks good to me. I'm a bit curious about whether this means variables like the upcoming emailOfferCount and lastEmailOfferDate would make more sense as SharedPrefs, but since the other email-related fields are stored with the user's DB object it feels like they make sense living together?

Maybe worth a little additional guidance on things like tracking "offers", other examples in the past have been things like:

  • Prompt user to verify secondary phone number (after 5 days)
  • Re-show received payment card some time after the user chooses to hide it

A separate thought: Is it reasonable to say that pretty much any data the server stores in its DB and sends to mobile should also live in mobile's DB?

Comment thread docs/mobile_storage_standards.md Outdated
Comment on lines +67 to +68
**If data is state → Shared Preferences**
**If data is records → SQLite**
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nit: in the rich diff this all shows on a single line. Can we either add a line break here or turn this into a bulleted list

Clarified definitions and best practices for mobile storage standards, including specific examples of user state and data types.
@shubham1g5
Copy link
Copy Markdown
Contributor Author

Maybe worth a little additional guidance on things like tracking "offers", other examples in the past have been things like:

yeah, that's what I was trying to refer to with "UI State", added a generalised example in this commit, does that make it more clear ?

@shubham1g5 shubham1g5 merged commit 543a525 into master Apr 28, 2026
@shubham1g5 shubham1g5 deleted the shubham1g5-patch-1 branch April 28, 2026 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants