Skip to content

Replace sqflite with file-based JSON storage #1657

@Sembauke

Description

@Sembauke

We currently use the sqflite package to persist article data in the app. This is more complex than our needs require. The goal is to replace sqflite with a simpler file-based JSON storage system.

Requirements

  • Store all articles as a list in a single articles.json file inside the app’s documents directory.
  • Ensure the storage layer gracefully handles the case where articles.json does not yet exist.
  • Provide helper functions to:
  • Load all articles from the JSON file at app startup.
  • Save the current in-memory list of articles back to the JSON file.
  • Add, update, and delete articles in memory, then persist changes to disk.

Acceptance criteria

  • App can be installed fresh and run without sqflite.
  • A clean install correctly creates articles.json when the first article is saved.
  • After migration, existing user data is preserved and stored in the new JSON file format.
  • All bookmark tests pass with the new JSON storage implementation.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions