Documentation

    Documentation

    Documentation

    Ring Platform Logo

    Завантаження документації...

    Підготовка контенту платформи Ring

    Ring Platform Logo

    Завантаження документації...

    Підготовка контенту платформи Ring

    Ring Platform Logo

    Завантаження документації...

    Підготовка контенту платформи Ring

    1. /
    2. /Discovery Mutation Sync

    Updated Jun 22, 20263 min listen

    1. /
    2. /Discovery Mutation Sync

    Updated Jun 22, 20263 min listen

    1. /
    2. /Discovery Mutation Sync

    Updated Jun 22, 20263 min listen

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    Database migrations
    First Success Validation
    Troubleshooting
    Next Steps
    Architecture
    Backend modes and databases
    Data Model
    Authentication Architecture
    Email AI-CRM architecture
    PaymentConductor architecture
    Refcodes architecture
    News Kingdom architecture
    Proxy and internationalization
    Real Time
    Discovery Mutation Sync
    Security
    Features
    Doc System
    Authentication
    Email AI-CRM
    Entities
    Opportunities
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Tunnel Protocol
    Web3 Wallet
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    Referral Codes (Refcodes)
    Affiliate & Referral Enablement
    Payment Integration
    PaymentConductor
    VideoConductor
    WayForPay Payment Integration
    News Module - Digital Newspaper Experience
    Member Blogs
    Scientific Editor
    Locale System
    Security & Compliance
    NFT Marketplace
    Token Staking System
    Performance Optimization Patterns
    Mobile Experience
    Wallet
    Wallet Security Tips
    API
    Authentication
    Email AI-CRM API
    Entities
    Opportunities
    Messaging API
    Notifications API
    Wallet API
    Store API
    Admin API
    CLI
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Database Backend Selection
    Token Economics Setup
    Payment Gateway Integration
    AI Agent Customization
    Reference Ring deployments
    Branding
    Features
    Localization
    Themes
    Components
    Web3
    Token launch jurisdictions
    Deployment
    Self-hosted deployment
    Vercel
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Development
    Local Setup
    Code Structure
    Documentation components
    Community tooling
    Ring MCP Server
    Generative Images (ImageConductor)
    Autonomous Newsroom (Grok)
    OSS vs enterprise
    Whitelabel Navigation
    Best Practices
    Workflow
    Code Style
    Performance
    Testing
    Deployment
    Debugging
    Contributing
    MCP
    ring-image-create
    ring-video-create
    Roadmap
    Examples
    Quick Start
    Authentication
    Email AI-CRM developer guide
    API Integration Examples
    Web3 Integration
    White Label
    Real World
    API Examples (cURL)
    Integrations
    Ethereum wallets (Wagmi v3)

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    Database migrations
    First Success Validation
    Troubleshooting
    Next Steps
    Architecture
    Backend modes and databases
    Data Model
    Authentication Architecture
    Email AI-CRM architecture
    PaymentConductor architecture
    Refcodes architecture
    News Kingdom architecture
    Proxy and internationalization
    Real Time
    Discovery Mutation Sync
    Security
    Features
    Doc System
    Authentication
    Email AI-CRM
    Entities
    Opportunities
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Tunnel Protocol
    Web3 Wallet
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    Referral Codes (Refcodes)
    Affiliate & Referral Enablement
    Payment Integration
    PaymentConductor
    VideoConductor
    WayForPay Payment Integration
    News Module - Digital Newspaper Experience
    Member Blogs
    Scientific Editor
    Locale System
    Security & Compliance
    NFT Marketplace
    Token Staking System
    Performance Optimization Patterns
    Mobile Experience
    Wallet
    Wallet Security Tips
    API
    Authentication
    Email AI-CRM API
    Entities
    Opportunities
    Messaging API
    Notifications API
    Wallet API
    Store API
    Admin API
    CLI
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Database Backend Selection
    Token Economics Setup
    Payment Gateway Integration
    AI Agent Customization
    Reference Ring deployments
    Branding
    Features
    Localization
    Themes
    Components
    Web3
    Token launch jurisdictions
    Deployment
    Self-hosted deployment
    Vercel
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Development
    Local Setup
    Code Structure
    Documentation components
    Community tooling
    Ring MCP Server
    Generative Images (ImageConductor)
    Autonomous Newsroom (Grok)
    OSS vs enterprise
    Whitelabel Navigation
    Best Practices
    Workflow
    Code Style
    Performance
    Testing
    Deployment
    Debugging
    Contributing
    MCP
    ring-image-create
    ring-video-create
    Roadmap
    Examples
    Quick Start
    Authentication
    Email AI-CRM developer guide
    API Integration Examples
    Web3 Integration
    White Label
    Real World
    API Examples (cURL)
    Integrations
    Ethereum wallets (Wagmi v3)

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    Database migrations
    First Success Validation
    Troubleshooting
    Next Steps
    Architecture
    Backend modes and databases
    Data Model
    Authentication Architecture
    Email AI-CRM architecture
    PaymentConductor architecture
    Refcodes architecture
    News Kingdom architecture
    Proxy and internationalization
    Real Time
    Discovery Mutation Sync
    Security
    Features
    Doc System
    Authentication
    Email AI-CRM
    Entities
    Opportunities
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Tunnel Protocol
    Web3 Wallet
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    Referral Codes (Refcodes)
    Affiliate & Referral Enablement
    Payment Integration
    PaymentConductor
    VideoConductor
    WayForPay Payment Integration
    News Module - Digital Newspaper Experience
    Member Blogs
    Scientific Editor
    Locale System
    Security & Compliance
    NFT Marketplace
    Token Staking System
    Performance Optimization Patterns
    Mobile Experience
    Wallet
    Wallet Security Tips
    API
    Authentication
    Email AI-CRM API
    Entities
    Opportunities
    Messaging API
    Notifications API
    Wallet API
    Store API
    Admin API
    CLI
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Database Backend Selection
    Token Economics Setup
    Payment Gateway Integration
    AI Agent Customization
    Reference Ring deployments
    Branding
    Features
    Localization
    Themes
    Components
    Web3
    Token launch jurisdictions
    Deployment
    Self-hosted deployment
    Vercel
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Development
    Local Setup
    Code Structure
    Documentation components
    Community tooling
    Ring MCP Server
    Generative Images (ImageConductor)
    Autonomous Newsroom (Grok)
    OSS vs enterprise
    Whitelabel Navigation
    Best Practices
    Workflow
    Code Style
    Performance
    Testing
    Deployment
    Debugging
    Contributing
    MCP
    ring-image-create
    ring-video-create
    Roadmap
    Examples
    Quick Start
    Authentication
    Email AI-CRM developer guide
    API Integration Examples
    Web3 Integration
    White Label
    Real World
    API Examples (cURL)
    Integrations
    Ethereum wallets (Wagmi v3)

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)
    Docs
    Architecture
    Docs
    Architecture
    Docs
    Architecture

    Discovery Mutation Sync

    Filter this page with Founder / Developer in the docs sidebar. Founders learn why listings stay fresh; developers get modules, events, and extension points.

    When someone creates, edits, or removes an opportunity or entity on a PostgreSQL-primary Ring clone, users expect the marketplace and directory to update immediately — without a nightly reindex job. Ring coordinates three lightweight steps on every mutation.

    The three-step freshness model

    StepWhat users perceiveWhat happens under the hood
    1. Cache bustList pages stop showing stale cardsrevalidateTag clears role-scoped list caches
    2. Page refreshDetail and hub URLs show new data on next navigationrevalidatePath invalidates App Router SSR
    3. Realtime pingOpen tabs update without manual reloadTunnel publishes opportunity:* / entity:* events

    On Postgres-primary clones, the database row is the search index. There is no separate Elasticsearch table to rebuild — discovery queries read JSONB directly (Data model).

    Why founders should care

    Your clone's directory (entities) and marketplace of needs (opportunities) are the core loop most rings monetize around. Stale listings erode trust faster than a missing feature.

    Typical scenarios

    Job board

    A member posts a contract — approved listings appear on /opportunities and subscribers get Tunnel notifications.

    Vendor directory

    A verified entity updates its showcase — profile pages and public directory refresh without ops intervention.

    AI matcher follow-up

    Architecture

    Post-mutation sync pipeline

    Shared Tunnel helper

    lib/discovery/sync-discovery.ts — realtime fan-out only (cache + paths live in domain wrappers):

    ChannelTunnel events
    opportunitiesopportunity:created, opportunity:updated, opportunity:deleted
    entitiesentity:created, entity:updated, entity:deleted

    Domain wrappers

    ResourceModuleInvoked from
    Opportunitiesfeatures/opportunities/lib/opportunity-mutation-sync.tscreate-opportunity, update-opportunity, delete-opportunity, auto-approval-service

    Related documentation

    Data model

    JSONB collections synced by this pipeline.

    Backend modes

    Postgres-primary vs firebase-full behavior.

    Realtime transport

    TunnelHub transports (native WSS, SSE, Supabase).

    Opportunities API

    Discovery Mutation Sync

    Filter this page with Founder / Developer in the docs sidebar. Founders learn why listings stay fresh; developers get modules, events, and extension points.

    When someone creates, edits, or removes an opportunity or entity on a PostgreSQL-primary Ring clone, users expect the marketplace and directory to update immediately — without a nightly reindex job. Ring coordinates three lightweight steps on every mutation.

    The three-step freshness model

    StepWhat users perceiveWhat happens under the hood
    1. Cache bustList pages stop showing stale cardsrevalidateTag clears role-scoped list caches
    2. Page refreshDetail and hub URLs show new data on next navigationrevalidatePath invalidates App Router SSR
    3. Realtime pingOpen tabs update without manual reloadTunnel publishes opportunity:* / entity:* events

    On Postgres-primary clones, the database row is the search index. There is no separate Elasticsearch table to rebuild — discovery queries read JSONB directly (Data model).

    Why founders should care

    Your clone's directory (entities) and marketplace of needs (opportunities) are the core loop most rings monetize around. Stale listings erode trust faster than a missing feature.

    Typical scenarios

    Job board

    A member posts a contract — approved listings appear on /opportunities and subscribers get Tunnel notifications.

    Vendor directory

    A verified entity updates its showcase — profile pages and public directory refresh without ops intervention.

    AI matcher follow-up

    Architecture

    Post-mutation sync pipeline

    Shared Tunnel helper

    lib/discovery/sync-discovery.ts — realtime fan-out only (cache + paths live in domain wrappers):

    ChannelTunnel events
    opportunitiesopportunity:created, opportunity:updated, opportunity:deleted
    entitiesentity:created, entity:updated, entity:deleted

    Domain wrappers

    ResourceModuleInvoked from
    Opportunitiesfeatures/opportunities/lib/opportunity-mutation-sync.tscreate-opportunity, update-opportunity, delete-opportunity, auto-approval-service

    Related documentation

    Data model

    JSONB collections synced by this pipeline.

    Backend modes

    Postgres-primary vs firebase-full behavior.

    Realtime transport

    TunnelHub transports (native WSS, SSE, Supabase).

    Opportunities API

    Discovery Mutation Sync

    Filter this page with Founder / Developer in the docs sidebar. Founders learn why listings stay fresh; developers get modules, events, and extension points.

    When someone creates, edits, or removes an opportunity or entity on a PostgreSQL-primary Ring clone, users expect the marketplace and directory to update immediately — without a nightly reindex job. Ring coordinates three lightweight steps on every mutation.

    The three-step freshness model

    StepWhat users perceiveWhat happens under the hood
    1. Cache bustList pages stop showing stale cardsrevalidateTag clears role-scoped list caches
    2. Page refreshDetail and hub URLs show new data on next navigationrevalidatePath invalidates App Router SSR
    3. Realtime pingOpen tabs update without manual reloadTunnel publishes opportunity:* / entity:* events

    On Postgres-primary clones, the database row is the search index. There is no separate Elasticsearch table to rebuild — discovery queries read JSONB directly (Data model).

    Why founders should care

    Your clone's directory (entities) and marketplace of needs (opportunities) are the core loop most rings monetize around. Stale listings erode trust faster than a missing feature.

    Typical scenarios

    Job board

    A member posts a contract — approved listings appear on /opportunities and subscribers get Tunnel notifications.

    Vendor directory

    A verified entity updates its showcase — profile pages and public directory refresh without ops intervention.

    AI matcher follow-up

    Architecture

    Post-mutation sync pipeline

    Shared Tunnel helper

    lib/discovery/sync-discovery.ts — realtime fan-out only (cache + paths live in domain wrappers):

    ChannelTunnel events
    opportunitiesopportunity:created, opportunity:updated, opportunity:deleted
    entitiesentity:created, entity:updated, entity:deleted

    Domain wrappers

    ResourceModuleInvoked from
    Opportunitiesfeatures/opportunities/lib/opportunity-mutation-sync.tscreate-opportunity, update-opportunity, delete-opportunity, auto-approval-service

    Related documentation

    Data model

    JSONB collections synced by this pipeline.

    Backend modes

    Postgres-primary vs firebase-full behavior.

    Realtime transport

    TunnelHub transports (native WSS, SSE, Supabase).

    Opportunities API

    New opportunities trigger matcher pipelines; fresh cache tags ensure match cards reference current budget and deadline fields.

    Moderation workflow

    Admin approve/reject flows call the same sync — status changes behave like updates for subscribers watching the channel.

    Operator expectations

    • No manual reindex CLI for standard CRUD — if lists look stale, check Tunnel transport and DB_BACKEND_MODE first.
    • Confidential tiers share list cache tags; path revalidation is minimized for narrow audiences (see developer table below).
    • Maps / graph views (Ringdom Maps) are a separate store today — entity CRUD does not auto-update map nodes.
    Entities
    features/entities/lib/entity-mutation-sync.ts
    create-entity, update-entity, delete-entity, moderation + KYC hooks
    1. 1

      After any opportunity mutation

    2. 2

      After any entity mutation

    3. 3

      Subscribe on the client

      Listen on Tunnel topic channels — see Realtime transport and Tunnel protocol.

    Revalidated paths

    Opportunities

    • /[locale]/opportunities
    • /[locale]/opportunities/[id]
    • /[locale]/opportunities/my
    • /opportunities (on create / status change)

    Entities

    • /[locale]/entities
    • /[locale]/entities/[id]
    • /[locale]/entities/my
    • /entities (on create / status change)

    Paths intentionally omitted

    PathReason
    /[locale]/entities/addOne-shot form; redirect after create
    /[locale]/entities/status/...Payment callbacks — unrelated to CRUD discovery
    /[locale]/confidential/entitiesTag invalidation sufficient; avoids extra path churn
    Ringdom Maps nodesSeparate graph store — not wired to entity list caches

    Row mapping

    Reads map DatabaseService rows through:

    • features/opportunities/lib/opportunity-db-mapper.ts
    • features/entities/lib/entity-db-mapper.ts

    Legacy Firestore converters under lib/converters/*-converter.ts apply only when DB_BACKEND_MODE=firebase-full.

    REST surface + post-mutation hooks.

    Entities API

    REST surface + post-mutation hooks.

    New opportunities trigger matcher pipelines; fresh cache tags ensure match cards reference current budget and deadline fields.

    Moderation workflow

    Admin approve/reject flows call the same sync — status changes behave like updates for subscribers watching the channel.

    Operator expectations

    • No manual reindex CLI for standard CRUD — if lists look stale, check Tunnel transport and DB_BACKEND_MODE first.
    • Confidential tiers share list cache tags; path revalidation is minimized for narrow audiences (see developer table below).
    • Maps / graph views (Ringdom Maps) are a separate store today — entity CRUD does not auto-update map nodes.
    Entities
    features/entities/lib/entity-mutation-sync.ts
    create-entity, update-entity, delete-entity, moderation + KYC hooks
    1. 1

      After any opportunity mutation

    2. 2

      After any entity mutation

    3. 3

      Subscribe on the client

      Listen on Tunnel topic channels — see Realtime transport and Tunnel protocol.

    Revalidated paths

    Opportunities

    • /[locale]/opportunities
    • /[locale]/opportunities/[id]
    • /[locale]/opportunities/my
    • /opportunities (on create / status change)

    Entities

    • /[locale]/entities
    • /[locale]/entities/[id]
    • /[locale]/entities/my
    • /entities (on create / status change)

    Paths intentionally omitted

    PathReason
    /[locale]/entities/addOne-shot form; redirect after create
    /[locale]/entities/status/...Payment callbacks — unrelated to CRUD discovery
    /[locale]/confidential/entitiesTag invalidation sufficient; avoids extra path churn
    Ringdom Maps nodesSeparate graph store — not wired to entity list caches

    Row mapping

    Reads map DatabaseService rows through:

    • features/opportunities/lib/opportunity-db-mapper.ts
    • features/entities/lib/entity-db-mapper.ts

    Legacy Firestore converters under lib/converters/*-converter.ts apply only when DB_BACKEND_MODE=firebase-full.

    REST surface + post-mutation hooks.

    Entities API

    REST surface + post-mutation hooks.

    New opportunities trigger matcher pipelines; fresh cache tags ensure match cards reference current budget and deadline fields.

    Moderation workflow

    Admin approve/reject flows call the same sync — status changes behave like updates for subscribers watching the channel.

    Operator expectations

    • No manual reindex CLI for standard CRUD — if lists look stale, check Tunnel transport and DB_BACKEND_MODE first.
    • Confidential tiers share list cache tags; path revalidation is minimized for narrow audiences (see developer table below).
    • Maps / graph views (Ringdom Maps) are a separate store today — entity CRUD does not auto-update map nodes.
    Entities
    features/entities/lib/entity-mutation-sync.ts
    create-entity, update-entity, delete-entity, moderation + KYC hooks
    1. 1

      After any opportunity mutation

    2. 2

      After any entity mutation

    3. 3

      Subscribe on the client

      Listen on Tunnel topic channels — see Realtime transport and Tunnel protocol.

    Revalidated paths

    Opportunities

    • /[locale]/opportunities
    • /[locale]/opportunities/[id]
    • /[locale]/opportunities/my
    • /opportunities (on create / status change)

    Entities

    • /[locale]/entities
    • /[locale]/entities/[id]
    • /[locale]/entities/my
    • /entities (on create / status change)

    Paths intentionally omitted

    PathReason
    /[locale]/entities/addOne-shot form; redirect after create
    /[locale]/entities/status/...Payment callbacks — unrelated to CRUD discovery
    /[locale]/confidential/entitiesTag invalidation sufficient; avoids extra path churn
    Ringdom Maps nodesSeparate graph store — not wired to entity list caches

    Row mapping

    Reads map DatabaseService rows through:

    • features/opportunities/lib/opportunity-db-mapper.ts
    • features/entities/lib/entity-db-mapper.ts

    Legacy Firestore converters under lib/converters/*-converter.ts apply only when DB_BACKEND_MODE=firebase-full.

    REST surface + post-mutation hooks.

    Entities API

    REST surface + post-mutation hooks.