SynaDrive cross-platform desktop sync engine, selective sync, conflict resolver, and terminal tray.
Project description
SynaDrive Desktop — Enterprise Sync Client
Cross-platform Python sync engine for SynaDrive. Runs on macOS, Linux, and Windows from a single source tree — no native toolchains required.
Capability matrix
| Capability | Status |
|---|---|
| Bidirectional sync (cursor-paged delta) | ✅ |
| Selective sync per folder id | ✅ |
| Conflict resolver (keep_local / remote / both) | ✅ |
| Local SQLite manifest (idempotent restart) | ✅ |
| Watchdog + polling-fallback file watcher | ✅ |
Terminal "tray" via rich.live |
✅ |
| Native desktop GUI (Tkinter, sidebar + 8 panels) | ✅ |
| Local web dashboard (browser, security headers, CSRF, token-gated, rate-limited) | ✅ |
System tray icon (pystray + Pillow, optional) |
✅ |
| Profile separation (multi-account) | ✅ |
| OS keychain token vault (+encrypted file fallback) | ✅ |
MDM-style enterprise policy (/etc/synadrive/policy.json) |
✅ |
| Single-instance lock per profile | ✅ |
| DLP: extension / filename / content scans before upload | ✅ |
| Bandwidth throttle (token bucket, both directions) | ✅ |
| Schedule (business-hours / Wi-Fi-only / metered awareness) | ✅ |
| Zero-knowledge client-side vault (per-folder, scrypt-derived AES-GCM) | ✅ |
| Audit log (rotating JSONL, optional server shipping) | ✅ |
Pre/post hooks (pre_sync, post_upload, …) |
✅ |
| Desktop notifications | ✅ |
doctor preflight diagnostics |
✅ |
| Backup-only mode (never deletes locally) | ✅ |
| Cross-platform service installers (launchd / systemd / Scheduled Task) | ✅ |
| Proxy support (env / config) | ✅ |
| Filesystem-mode 0600/0700 on all secrets | ✅ |
AES-GCM via cryptography (HMAC fallback when absent) |
✅ |
Install
pip install -e SynaDrive/desktop # core
pip install -e 'SynaDrive/desktop[gui]' # core + system-tray icon
Core deps: httpx, watchdog, rich, platformdirs, keyring, cryptography.
The [gui] extra additionally pulls pystray + Pillow for the optional
system-tray icon. The Tkinter GUI itself ships with the Python stdlib on
all three OSes.
Run as a regular desktop app
synadrive gui # opens the native window (Tkinter, sidebar + 8 panels)
synadrive webui # alternative: browser-based dashboard on 127.0.0.1
See packaging/README.md for the per-platform installers that register
the sync daemon as a user-level service (macOS launchd, Linux systemd,
Windows Scheduled Task) and add a launcher shortcut.
Quickstart (CLI, headless / power users)
synadrive init --root ~/SynaDrive --base-url https://drive.synavuetechnologies.com
echo "$SYNADRIVE_TOKEN" | synadrive token set # stored in OS keychain
synadrive doctor # preflight checks
synadrive start --foreground
# ...elsewhere:
synadrive status
synadrive-tray
synadrive selective add fld_abc123
synadrive conflicts list
synadrive audit tail --limit 20
synadrive stop
Enterprise deployment
-
Deploy a policy file at
/etc/synadrive/policy.json(POSIX) or%ProgramData%\synadrive\policy.json(Windows):{ "enforced": { "base_url": "https://drive.acme-internal.com", "conflict_policy": "keep_both", "require_token_in_keyring": true, "audit_shipping": true, "dlp_blocked_extensions": [".pem", ".key", ".pfx"], "schedule_business_hours_only": true, "schedule_wifi_only": true, "max_file_size_mb": 5000 }, "defaults": { "bandwidth_limit_kb": 2048 } }
Enforced keys are applied on every start and the user cannot change them (
synadrive selective addwill refuse ifselective_syncis locked, etc.). -
Provision per-user: distribute
synadrive init --base-url ...via your MDM, then have each user runsynadrive token setonce. -
Multi-profile: a single workstation can host several accounts:
SYNADRIVE_PROFILE=work synadrive start --foregroundkeeps a separate config dir, state DB, audit log, and lock file fromdefault.
Zero-knowledge vault
synadrive vault enable --folder Secret
export SYNADRIVE_VAULT_PASSPHRASE="correct horse battery staple"
synadrive start --foreground
Files under Secret/ are AES-GCM-encrypted with a passphrase-derived key
(scrypt, salted per-file) before any byte leaves the host. The server
never sees plaintext.
Layout
synadrive_desktop/config.py— XDG-aware profile config; never stores tokens.synadrive_desktop/security.py— TokenVault, encrypt_blob, SingleInstanceLock, machine fingerprint.synadrive_desktop/policy.py— MDM-style enforced/defaults policy.synadrive_desktop/state.py— SQLite manifest (items, meta, conflicts).synadrive_desktop/watcher.py— watchdog + polling fallback.synadrive_desktop/dlp.py— pre-upload DLP scanner.synadrive_desktop/bandwidth.py— TokenBucket + Schedule (business hours / wifi / metered).synadrive_desktop/vault.py— scrypt + AES-GCM client-side vault.synadrive_desktop/audit.py— rotating JSONL + optional server shipping.synadrive_desktop/notify.py— desktop notifications + shell hooks.synadrive_desktop/conflict.py— three-way resolver.synadrive_desktop/engine.py— pull/push loop with policy/DLP/vault/audit/hooks wired in.synadrive_desktop/doctor.py— preflight diagnostics.synadrive_desktop/tray.py—rich.liveterminal tray.synadrive_desktop/cli.py—synadriveCLI entrypoint.
Backend contract
The client speaks the routes added in synavue_data_service/SynaDrive/routes/sync.py:
| Method | Path | Purpose |
|---|---|---|
| GET | /sync/delta?cursor=&limit= |
Cursor-paged changes feed. |
| POST | /sync/register-device |
Register / refresh device. |
| GET | /sync/devices |
List user devices. |
| DELETE | /sync/devices/{id} |
Revoke a device. |
| POST | /sync/conflict |
Report a conflict + resolution. |
All routes are proxied through the API gateway catch-all at
/api/v1/drive/sync/* and require an Authorization: Bearer <token> header
plus an X-Device-ID header (the client sends both automatically).
Tests
pytest SynaDrive/tests/test_desktop_sync.py SynaDrive/tests/test_desktop_enterprise.py SynaDrive/tests/test_desktop_ui.py -v
# 40 passed
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file synadrive_desktop-0.1.0.tar.gz.
File metadata
- Download URL: synadrive_desktop-0.1.0.tar.gz
- Upload date:
- Size: 54.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
525c1ffd992a213e3492ec06ce454c8bdbfc8a9c586cc40806ea121d3ca981c9
|
|
| MD5 |
33ce452d56cac361e38e9e510b0bf4a7
|
|
| BLAKE2b-256 |
69991a1f1aa4dfd935fd42dabf8e1f945bdd4648f2f40503c9476d87b7cc759c
|
File details
Details for the file synadrive_desktop-0.1.0-py3-none-any.whl.
File metadata
- Download URL: synadrive_desktop-0.1.0-py3-none-any.whl
- Upload date:
- Size: 59.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d6942d619f9ed04e5426092f46daf22e17d1740a9c2c69903055ef2b7062986
|
|
| MD5 |
111efd266fb635f5e0562a98003a178b
|
|
| BLAKE2b-256 |
e7e3bd379bb0a8352532a848aaaa1bf57b37371e1160b543dc3be94b5c3b1b59
|