Folo icon indicating copy to clipboard operation
Folo copied to clipboard

Use the same store and db module for desktop and mobile

Open DIYgod opened this issue 10 months ago • 1 comments

Clear and concise description of the problem

Currently, desktop and mobile platforms use separate logic for data fetching and storage. We need to merge these processes in the future to reduce maintenance costs.

database

https://github.com/RSSNext/Follow/tree/dev/apps/mobile/src/database https://github.com/RSSNext/Follow/tree/dev/apps/renderer/src/database

store

https://github.com/RSSNext/Follow/tree/dev/apps/mobile/src/store https://github.com/RSSNext/Follow/tree/dev/apps/renderer/src/store

Suggested solution

  1. Move Expo SQLite and Drizzle to the new database package #3809
  2. Move the database service to the database package and avoid direct database calls #3817
  3. Create a new store package to share data fetching and state management logic #3819
    • remove global apiClient authClient
  4. Migrate the store logic for the desktop module by module

Alternative

No response

Additional context

No response

Validations

  • [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • [x] This issue is valid

DIYgod avatar Feb 27 '25 10:02 DIYgod