There are a few modules in this project:
Pocket The Pocket app
pocket-ui Reusable Pocket UI/UX components and views.
utils and utils-android Utilities and classes that several modules share.
sync-parser Parses GraphQL schema and creates an in-memory model (called "figments") for sync-gen
.
sync-gen Generates sync engine code from schema.
sync and sync-android General sync engine.
sync-pocket and sync-pocket-android Parts of the sync engine specific to the Pocket app.
analytics Wraps Snowplow Android tracker and exposes internal API that allows to declaratively annotate the UI and code to enable automatically picking up and sending analytic events most of the time (and manually send whatever you need in edge cases).
project-tools Some utilities for doing tasks in this project like bulk importing vectors
See each module's README file for more details.
flowchart TD
Pocket ---> sync-pocket-android
subgraph sync-engine [Sync Engine]
sync-pocket-android --> sync-pocket & sync-android
sync-pocket -.-> sync-gen --> sync-parser
sync-pocket & sync-android --> sync
end
sync-android --> utils-android
sync & utils-android --> utils
Pocket --> pocket-ui
Pocket & pocket-ui --> analytics
analytics & pocket-ui ---> utils-android
project-tools
Use the checked in code style as the default, but in general, be reasonable and use the code base as a guide. For Kotlin we use the official Kotlin style.
We're using Renovate to automatically update dependencies declared in the version catalog.
We have a lot of documentation about the Sync Engine, but you kind of have to know where to look for it. Here's some examples to get you started:
- sync modules' READMEs: /sync-gen/README, /sync-parser/README,
- sync packages'
package-info.java
files: com.pocket.sync, com.pocket.sync.print.java (code generation), - sync class docs: Pocket, AppSource, V3Source, ClientApiSource (Pocket Graph source/client), MutableSpace (persistence/"database"), etc.
- API documentation on the generated classes or in the schema files (
v3.graphqls
,local.graphqls
, etc.) - Figment repo which is deprecated, but I left a note in the main README about pieces that might still be relevant to the Android Sync Engine