10 - Storage, Updates, and Config
Production apps need reliable persistence and safe update flows.
Data storage options
| Option | Good for |
|---|---|
| JSON/TOML files | Simple settings |
| SQLite | Structured local data |
| Encrypted files | Sensitive secrets/data |
Config strategy
- Defaults in code
- User overrides in config file
- Versioned config schema for migrations
App updates
- Sign update artifacts
- Verify signatures client-side
- Roll out gradually
- Keep rollback strategy
Example migration flow
- Detect config version on startup
- Backup old config
- Transform to new schema
- Validate and persist