How haiwen/seafile works
Project type and purpose
• This repository is the “sync client daemon” for Seafile, an open-source cloud-storage and file-sync system.
• Its job is to monitor local file changes, compute deltas, encrypt/ decrypt libraries, and sync with one or more Seafile servers over HTTP/RPC.
File structure
• Top-level binaries and entry points:
• app/seaf-cli — the command-line client wrapper
• daemon/seaf-daemon.c — the long-running sync daemon
• Core logic modules under common/ and lib/:
• common/ — low-level components: block-mgr, commit-mgr, branch-mgr, cdc (content-defined chunking), obj-store, fs-mgr, RPC service
• lib/ — higher-level interfaces: db (SQLite), net (HTTP/RPC), repo, task, utils, searpc marshalling
• Platform-specific watchers under daemon/wt-monitor-*.c
• Build and packaging:
• Autotools scripts (configure.ac, Makefile.am, m4/)
• Windows installer (msi/), macOS DMG layout (dmg/)
• Language bindings and tools:
• python/seafile/rpcclient.py — Python RPC client
• Tests and integration:
• integration-tests/ and tests/sync-auto-test/ harnesses
Readme insights
• Describes high-level features: selective sync, delta transfer, encryption, multi-server sync.
• Points out components interact with server core via HTTP/RPC.
• Emphasizes client-side chunking, encryption, and version control.