Architecture
n8n-sync is two hook bundles wired into n8n's external-hooks system. There is no server process of its own and no shared database; the publisher pushes events over HTTP and the subscriber applies them through n8n's own repositories.
Wired Hooks
n8n-sync only fires on a deliberately small set of n8n external hooks. Each maps to one SyncEvent on the wire.
Authentication
The publisher and subscriber must agree on the same auth mode. SYNCAUTHMODE (hmac or token) is read by both bundles from src/shared/config.ts, and the modes do not cross-accept: a token-mode subscriber rejects HMAC-signed requests and vice-versa.
Environment Variables
All process.env access in the package lives in src/shared/config.ts. Nowhere else in the bundles reads process.env — keep this invariant when extending the code.
Tag-based Filtering
Source-side opt-in: only the publisher inspects tags, the subscriber remains tag-agnostic.
Limitations
n8n-sync is intentionally narrow: it is a one-way, eventually-consistent mirror of workflow, credential, and (opt-in) execution state across n8n instances. These are the things it explicitly does not do, and the platform reasons why.