Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: PowerSync encryption with SQLCipher #194

Merged
merged 41 commits into from
Nov 12, 2024
Merged

Conversation

mugikhan
Copy link
Contributor

@mugikhan mugikhan commented Oct 17, 2024

Description

This enables the use of database encryption with SQLCipher. It also includes a refactor into two new packages, powersync_core (Dart only) and powersync_sqlcipher in order to achieve this.
powersync_core includes all of the original powersync setup and functionality and exports it for the other packages to use.

  • powersync_core is now used by powersync which is a thin package that depends on sqlite3_flutter_libs for Flutter projects
  • powersync_core is also used by powersync_sqlcipher which is a thin package that depends on sqlcipher_flutter_libs.
  • powersync_attachments_helper also depends on powersync_core for its basic functionality.

The reason for this refactor is so that we can make PowerSync compatible with both Dart and Flutter apps. It also allows us to enable encryption for users who can now install and import powersync_sqlcipher. Finally, it maintains the original PowerSync API for users using powersync.

TODO

  • Update READMEs

@mugikhan mugikhan requested a review from rkistner October 17, 2024 08:47
melos.yaml Outdated Show resolved Hide resolved
packages/powersync_core/README.md Outdated Show resolved Hide resolved
packages/powersync_core/NOTICE Outdated Show resolved Hide resolved
packages/powersync_sqlcipher/NOTICE Outdated Show resolved Hide resolved
packages/powersync_sqlcipher/lib/src/sqlcipher.dart Outdated Show resolved Hide resolved
@mugikhan mugikhan marked this pull request as ready for review October 22, 2024 08:44
stevensJourney
stevensJourney previously approved these changes Oct 23, 2024
@mugikhan mugikhan requested a review from rkistner November 11, 2024 10:01
Copy link
Contributor

@rkistner rkistner left a comment

Choose a reason for hiding this comment

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

The melos.yml version -> preCommit command needs to be updated - the version.dart file has moved.

packages/powersync/README.md Outdated Show resolved Hide resolved
packages/powersync_core/pubspec.yaml Outdated Show resolved Hide resolved
packages/powersync_sqlcipher/pubspec.yaml Outdated Show resolved Hide resolved
rkistner
rkistner previously approved these changes Nov 12, 2024
 - powersync@1.10.0
 - powersync_core@1.0.0
 - powersync_sqlcipher@0.1.0
 - powersync_attachments_helper@0.6.16
@mugikhan mugikhan merged commit ea6186d into main Nov 12, 2024
7 of 9 checks passed
@mugikhan mugikhan deleted the feat/powersync-sqlcipher branch November 12, 2024 15:05
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