MCPcopy Index your code
hub / github.com/carlosbensant/payload-sync

github.com/carlosbensant/payload-sync @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
207 symbols 495 edges 73 files 45 documented · 22%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Payload Sync Plugin

A real-time sync plugin for PayloadCMS that provides reactive queries (like Convex) and optimistic mutations.

Features

  • :arrows_counterclockwise: Real-time sync - Automatic updates across all connected clients
  • :pushpin: Reactive Queries - Persist active query subscriptions after server restart
  • :zap: Optimistic updates - Instant UI updates with server reconciliation
  • :dart: Type-safe - Full TypeScript support with PayloadCMS types
  • :rocket: Zero config - Works out of the box with PayloadCMS
  • :wrench: Flexible - Supports any backend architecture
  • :brain: Smart Cross-Collection Updates
  • :sparkles: and many more features

Link: https://github.com/carlosbensant/payload-sync/

Inspired by https://github.com/payloadcms/payload/pull/11334

Extension points exported contracts — how you extend this code

AccessControlResult (Interface)
* Efficient access control evaluator that mimics Convex's approach. * Instead of re-running full queries, this evaluate
src/plugins/payload-sync/src/utilities/access-control-evaluator.ts
Config (Interface)
(no doc)
src/payload-types.ts
QueryResult (Interface)
(no doc)
src/plugins/payload-sync/src/client/view-wrapper.ts
UserAuthOperations (Interface)
(no doc)
src/payload-types.ts
QuerySnapshot (Interface)
(no doc)
src/plugins/payload-sync/src/client/view-wrapper.ts
User (Interface)
(no doc)
src/payload-types.ts
UsePayloadQueryOptions (Interface)
(no doc)
src/plugins/payload-sync/src/client/use-payload-sync.tsx
Media (Interface)
(no doc)
src/payload-types.ts

Core symbols most depended-on inside this repo

getSubscriptions
called by 15
src/plugins/payload-sync/src/utilities/endpoints.ts
documentMatchesQuery
called by 15
src/plugins/payload-sync/src/utilities/query-matcher.ts
createQueryHash
called by 12
src/plugins/payload-sync/src/utilities/query-hash.ts
extractQueryDependencies
called by 11
src/plugins/payload-sync/src/utilities/schema-dependency-extractor.ts
isSuperAdmin
called by 6
src/collections/workspaces/users/access/isSuperAdmin.ts
executeQuery
called by 6
src/plugins/payload-sync/src/client/payload-sync.ts
decodeQueryHash
called by 5
src/plugins/payload-sync/src/utilities/query-hash.ts
compareValues
called by 5
src/plugins/payload-sync/src/utilities/query-matcher.ts

Shape

Function 159
Interface 36
Method 8
Class 4

Languages

TypeScript100%

Modules by API surface

src/payload-types.ts22 symbols
src/plugins/payload-sync/src/client/payload-sync.ts17 symbols
src/app/(app)/page.tsx10 symbols
src/plugins/payload-sync/src/utilities/subscription-manager.ts9 symbols
src/plugins/payload-sync/src/utilities/dependency-tracker.ts9 symbols
src/plugins/payload-sync/src/client/view-wrapper.ts9 symbols
src/plugins/payload-sync/src/utilities/access-control-evaluator.ts8 symbols
src/plugins/payload-sync/src/utilities/__tests__/query-matcher.test.ts7 symbols
src/plugins/payload-sync/src/client/view-store.ts7 symbols
src/plugins/payload-sync/src/utilities/schema-dependency-extractor.ts6 symbols
src/plugins/payload-sync/src/utilities/__tests__/subscription-manager.test.ts6 symbols
src/plugins/payload-sync/src/client/mutation-helpers.ts6 symbols

For agents

$ claude mcp add payload-sync \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page