Keynote:
I've implemented a basic use case: upload (mail) note directly to Synctarget.
I think the core of this API is to be able to CRUD directly to SyncTarget, so I came up with some methods that the library may expose. Sync API Docs
Progress
- Introductory meeting with my mentors Roman & Laurent.
- Introductory meeting with all mentors and contributors.
- Researching other softwares Sync API, most implement token-based for tracking local changes: Todoist, Contentful, Kotent. Except Zotero use a time-based.
- Setting up separate repository for Standalone Sync API: GitHub - khuongduy354/joplin-sync-lib
- Setup FilesystemSynctarget for quick view of sync target + MemorySynctarget for unit tests.
- Setup lock handling: acquire lock before upload and release on finish, still need more tests on this.
- Implement basic uploadItems() method, return list of newly created item ids. Which can be pulled with Joplin Desktop (manually tested).
- Currently Resources & Encryption aren't implemented, and @joplin/lib is used temporarily for some helper functions.
- Driver code for email to note use case.
Driver code
After run Synchronize in Desktop client (I set todo to true, so it appear as a todo)
Logs
- First API draft: Sync API Docs
Plan
- Implement pulling items methods (get all items and get 1 item)
- Implement logics to detect local changes & getSyncItems method (pull items that is newer on remote)
- Implement resource upload along with notes.
- Look into encryption, users may use secret key in order to read encrypted items.
- Setup basic unit tests
Problems / Questions
- Server-side OCR case:
To implement this, we host a separate OCR server. With the Sync API, the OCR server can poll data from Synctarget, process OCR, and update back to Synctarget. So OCR server is user-hosted and not provided by Joplin?
I'm thinking of a Webhook feature, but it should be implemented on Sync Target (Joplin server for e.g) and not in Sync Library, so Webhook is out of scope.
For now, what the Sync library can best offer is pull and push data.