Documentation

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

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    First Success Validation
    Next Steps
    Features
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    SubscriptionConductor
    PaymentConductor
    Ring Oracle
    Payments Overview
    Public Pools & DAO Jars
    WayForPay Payment Integration
    Wallet & Credit System
    WalletConductor
    Affiliate & Referral Enablement
    Referral Codes (Refcodes)
    NFT Exhibition Marketplace
    Solana NFT Gates
    Token Staking System
    Owner Project Lab
    Entities
    Opportunities
    Real-Time Messaging
    Ring Tasks
    WebRTC Calls & STUNner TURN
    Peer Games
    News Module
    Member Blogs
    Public Profile Pages
    Profile Account Widgets
    Ring File Cabinet
    Username Reservation System
    Scientific Editor
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Email AI-CRM
    Ring Mailer & RingdomX Mail
    Tunnel Protocol
    VideoConductor
    MediaConductor
    Generative Gallery
    Authentication
    Security & Compliance
    Admin console
    Admin Wiki
    Manage via Telegram
    Locale System
    Mobile Experience
    Performance Optimization Patterns
    Examples
    Quick Start
    Basic Setup
    White Label
    Custom Branding
    Web3 Integration
    Real World
    Advanced Features
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Vertical Presets (SSOT)
    Ringization playbook
    Branding
    Themes
    Features
    Localization
    Token Economics Setup
    Payment Gateway Integration
    Reference Ring deployments
    Web3
    Token launch jurisdictions
    Wallet
    Wallet Security Tips
    Integrations
    Ethereum wallets (Wagmi v3)
    RingFileBase (object storage API)
    Ring CDN (RingFileBase edge)
    Deployment
    Self-hosted deployment
    Vercel Deployment
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Architecture
    Data Model
    Security
    Real Time
    Discovery Mutation Sync
    PaymentConductor architecture
    WalletConductor architecture
    Backend Services
    Firebase Integration
    Development
    Ring MCP Server

    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)

    Documentation

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

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    First Success Validation
    Next Steps
    Features
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    SubscriptionConductor
    PaymentConductor
    Ring Oracle
    Payments Overview
    Public Pools & DAO Jars
    WayForPay Payment Integration
    Wallet & Credit System
    WalletConductor
    Affiliate & Referral Enablement
    Referral Codes (Refcodes)
    NFT Exhibition Marketplace
    Solana NFT Gates
    Token Staking System
    Owner Project Lab
    Entities
    Opportunities
    Real-Time Messaging
    Ring Tasks
    WebRTC Calls & STUNner TURN
    Peer Games
    News Module
    Member Blogs
    Public Profile Pages
    Profile Account Widgets
    Ring File Cabinet
    Username Reservation System
    Scientific Editor
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Email AI-CRM
    Ring Mailer & RingdomX Mail
    Tunnel Protocol
    VideoConductor
    MediaConductor
    Generative Gallery
    Authentication
    Security & Compliance
    Admin console
    Admin Wiki
    Manage via Telegram
    Locale System
    Mobile Experience
    Performance Optimization Patterns
    Examples
    Quick Start
    Basic Setup
    White Label
    Custom Branding
    Web3 Integration
    Real World
    Advanced Features
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Vertical Presets (SSOT)
    Ringization playbook
    Branding
    Themes
    Features
    Localization
    Token Economics Setup
    Payment Gateway Integration
    Reference Ring deployments
    Web3
    Token launch jurisdictions
    Wallet
    Wallet Security Tips
    Integrations
    Ethereum wallets (Wagmi v3)
    RingFileBase (object storage API)
    Ring CDN (RingFileBase edge)
    Deployment
    Self-hosted deployment
    Vercel Deployment
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Architecture
    Data Model
    Security
    Real Time
    Discovery Mutation Sync
    PaymentConductor architecture
    WalletConductor architecture
    Backend Services
    Firebase Integration
    Development
    Ring MCP Server

    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)

    Documentation

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

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    First Success Validation
    Next Steps
    Features
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    SubscriptionConductor
    PaymentConductor
    Ring Oracle
    Payments Overview
    Public Pools & DAO Jars
    WayForPay Payment Integration
    Wallet & Credit System
    WalletConductor
    Affiliate & Referral Enablement
    Referral Codes (Refcodes)
    NFT Exhibition Marketplace
    Solana NFT Gates
    Token Staking System
    Owner Project Lab
    Entities
    Opportunities
    Real-Time Messaging
    Ring Tasks
    WebRTC Calls & STUNner TURN
    Peer Games
    News Module
    Member Blogs
    Public Profile Pages
    Profile Account Widgets
    Ring File Cabinet
    Username Reservation System
    Scientific Editor
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Email AI-CRM
    Ring Mailer & RingdomX Mail
    Tunnel Protocol
    VideoConductor
    MediaConductor
    Generative Gallery
    Authentication
    Security & Compliance
    Admin console
    Admin Wiki
    Manage via Telegram
    Locale System
    Mobile Experience
    Performance Optimization Patterns
    Examples
    Quick Start
    Basic Setup
    White Label
    Custom Branding
    Web3 Integration
    Real World
    Advanced Features
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Vertical Presets (SSOT)
    Ringization playbook
    Branding
    Themes
    Features
    Localization
    Token Economics Setup
    Payment Gateway Integration
    Reference Ring deployments
    Web3
    Token launch jurisdictions
    Wallet
    Wallet Security Tips
    Integrations
    Ethereum wallets (Wagmi v3)
    RingFileBase (object storage API)
    Ring CDN (RingFileBase edge)
    Deployment
    Self-hosted deployment
    Vercel Deployment
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Architecture
    Data Model
    Security
    Real Time
    Discovery Mutation Sync
    PaymentConductor architecture
    WalletConductor architecture
    Backend Services
    Firebase Integration
    Development
    Ring MCP Server

    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)
    Ring Platform Logo

    Loading documentation...

    Preparing Ring Platform content

    Ring Platform Logo

    Loading documentation...

    Preparing Ring Platform content

    Ring Platform Logo

    Loading documentation...

    Preparing Ring Platform content

    Realtime Transport

    One connection per session

    TunnelProvider (in app-client-shell.tsx) owns the shared WSS/SSE connection and channel-subscription-registry. Tunnel consumers — including CreditBalanceProvider and GlobalTunnelListeners — must mount inside TunnelProvider. Feature hooks such as useSync and useUnreadCount should run once inside NotificationProvider — nav widgets consume useNotificationContext(), not duplicate useUnreadCount() calls.

    Ring Platform delivers realtime updates through Tunnel Protocol:

    • TunnelHub (lib/tunnel/hub/) — server-side broker; SSE, native WSS, poll queues, channel subscriptions, offline per-user queue
    • Custom server (server.ts) — Next.js handler + attachTunnelWss when RING_DEPLOY_TARGET is k8s or self-hosted
    • TunnelTransport — client-side WSS → SSE → long-polling fallback chain
    • TunnelProvider — shared React connection with progressive connect after auth
    • Connect timing — lib/tunnel/tunnel-timing.ts priority/deferred routes (Tunnel protocol — timing)
    • Discovery mutations — lib/discovery/sync-discovery.ts publishes opportunity:* and entity:* on topic channels after CRUD (Discovery mutation sync)
    Offline user queue (2026-07-07)

    When publishToUserTunnel runs with no live socket, InMemoryTunnelHub queues the message (publisher logs at console.debug, not an error). On connect:

    • SSE — app/api/tunnel/sse/route.ts drains via hub.drainUserQueueForSse(userId)
    • Native WSS — lib/tunnel/native-ws/attach.ts drains via hub.drainUserQueue(userId) immediately after { op: 'auth_ok' } (parity with SSE)

    Boot-race messages (e.g. device telemetry during auth-grace) are delivered on the first transport handshake, not the next page load.

    Tunnel protocol

    Routes, auth frames, priority timing, HTTP dedup hooks, and alpha limitations.

    Notifications feature

    In-app alerts, preferences, and FCM push when the tab is closed.

    Hooks reference

    Provider matrix and subscription dedup backlog.

    Request flow

    Connection timing

    TunnelProvider defers connect briefly after auth so HTTP ingest (analytics device registration, initial REST) can complete first. Priority routes — including /admin and nested /admin/* — get faster auto-connect via matchesRoutePrefix() in lib/tunnel/tunnel-timing.ts (prefix match, not exact pathname string).

    Full route tables, env overrides, and boot-race SSOT: Tunnel protocol.

    Where realtime is used

    FeatureServer publishClient subscribe
    NotificationspublishToUserTunnel → notifications:unread / notifications:inboxNotificationProvider → useNotificationContext()
    Credit balancepublishToUserTunnel → credit:balance (via creditBalanceService.publishBalanceUpdate)CreditBalanceProvider → useCreditBalanceContext() (bootstrap REST dedup + tunnel push; 60s poll only if tunnel down)
    Wallet list / native balancespublishWalletListUpdate → wallet:listWalletListProvider (wallet-wrapper) → useTunnelChannel('wallet:list')
    Account statuspublishToUserTunnel → account:statusGlobalTunnelListeners → AccountStatusTunnelListener
    Vendor sidebar gate— (HTTP only)

    See Tunnel protocol for API routes, RING_DEPLOY_TARGET, channel patterns, and alpha limitations.

    1. /
    2. /Real Time

    Updated Jul 20, 20263 min listen

    Realtime Transport

    One connection per session

    TunnelProvider (in app-client-shell.tsx) owns the shared WSS/SSE connection and channel-subscription-registry. Tunnel consumers — including CreditBalanceProvider and GlobalTunnelListeners — must mount inside TunnelProvider. Feature hooks such as useSync and useUnreadCount should run once inside NotificationProvider — nav widgets consume useNotificationContext(), not duplicate useUnreadCount() calls.

    Ring Platform delivers realtime updates through Tunnel Protocol:

    • TunnelHub (lib/tunnel/hub/) — server-side broker; SSE, native WSS, poll queues, channel subscriptions, offline per-user queue
    • Custom server (server.ts) — Next.js handler + attachTunnelWss when RING_DEPLOY_TARGET is k8s or self-hosted
    • TunnelTransport — client-side WSS → SSE → long-polling fallback chain
    • TunnelProvider — shared React connection with progressive connect after auth
    • Connect timing — lib/tunnel/tunnel-timing.ts priority/deferred routes (Tunnel protocol — timing)
    • Discovery mutations — lib/discovery/sync-discovery.ts publishes opportunity:* and entity:* on topic channels after CRUD (Discovery mutation sync)
    Offline user queue (2026-07-07)

    When publishToUserTunnel runs with no live socket, InMemoryTunnelHub queues the message (publisher logs at console.debug, not an error). On connect:

    • SSE — app/api/tunnel/sse/route.ts drains via hub.drainUserQueueForSse(userId)
    • Native WSS — lib/tunnel/native-ws/attach.ts drains via hub.drainUserQueue(userId) immediately after { op: 'auth_ok' } (parity with SSE)

    Boot-race messages (e.g. device telemetry during auth-grace) are delivered on the first transport handshake, not the next page load.

    Tunnel protocol

    Routes, auth frames, priority timing, HTTP dedup hooks, and alpha limitations.

    Notifications feature

    In-app alerts, preferences, and FCM push when the tab is closed.

    Hooks reference

    Provider matrix and subscription dedup backlog.

    Request flow

    Connection timing

    TunnelProvider defers connect briefly after auth so HTTP ingest (analytics device registration, initial REST) can complete first. Priority routes — including /admin and nested /admin/* — get faster auto-connect via matchesRoutePrefix() in lib/tunnel/tunnel-timing.ts (prefix match, not exact pathname string).

    Full route tables, env overrides, and boot-race SSOT: Tunnel protocol.

    Where realtime is used

    FeatureServer publishClient subscribe
    NotificationspublishToUserTunnel → notifications:unread / notifications:inboxNotificationProvider → useNotificationContext()
    Credit balancepublishToUserTunnel → credit:balance (via creditBalanceService.publishBalanceUpdate)CreditBalanceProvider → useCreditBalanceContext() (bootstrap REST dedup + tunnel push; 60s poll only if tunnel down)
    Wallet list / native balancespublishWalletListUpdate → wallet:listWalletListProvider (wallet-wrapper) → useTunnelChannel('wallet:list')
    Account statuspublishToUserTunnel → account:statusGlobalTunnelListeners → AccountStatusTunnelListener
    Vendor sidebar gate— (HTTP only)

    See Tunnel protocol for API routes, RING_DEPLOY_TARGET, channel patterns, and alpha limitations.

    1. /
    2. /Real Time

    Updated Jul 20, 20263 min listen

    Realtime Transport

    One connection per session

    TunnelProvider (in app-client-shell.tsx) owns the shared WSS/SSE connection and channel-subscription-registry. Tunnel consumers — including CreditBalanceProvider and GlobalTunnelListeners — must mount inside TunnelProvider. Feature hooks such as useSync and useUnreadCount should run once inside NotificationProvider — nav widgets consume useNotificationContext(), not duplicate useUnreadCount() calls.

    Ring Platform delivers realtime updates through Tunnel Protocol:

    • TunnelHub (lib/tunnel/hub/) — server-side broker; SSE, native WSS, poll queues, channel subscriptions, offline per-user queue
    • Custom server (server.ts) — Next.js handler + attachTunnelWss when RING_DEPLOY_TARGET is k8s or self-hosted
    • TunnelTransport — client-side WSS → SSE → long-polling fallback chain
    • TunnelProvider — shared React connection with progressive connect after auth
    • Connect timing — lib/tunnel/tunnel-timing.ts priority/deferred routes (Tunnel protocol — timing)
    • Discovery mutations — lib/discovery/sync-discovery.ts publishes opportunity:* and entity:* on topic channels after CRUD (Discovery mutation sync)
    Offline user queue (2026-07-07)

    When publishToUserTunnel runs with no live socket, InMemoryTunnelHub queues the message (publisher logs at console.debug, not an error). On connect:

    • SSE — app/api/tunnel/sse/route.ts drains via hub.drainUserQueueForSse(userId)
    • Native WSS — lib/tunnel/native-ws/attach.ts drains via hub.drainUserQueue(userId) immediately after { op: 'auth_ok' } (parity with SSE)

    Boot-race messages (e.g. device telemetry during auth-grace) are delivered on the first transport handshake, not the next page load.

    Tunnel protocol

    Routes, auth frames, priority timing, HTTP dedup hooks, and alpha limitations.

    Notifications feature

    In-app alerts, preferences, and FCM push when the tab is closed.

    Hooks reference

    Provider matrix and subscription dedup backlog.

    Request flow

    Connection timing

    TunnelProvider defers connect briefly after auth so HTTP ingest (analytics device registration, initial REST) can complete first. Priority routes — including /admin and nested /admin/* — get faster auto-connect via matchesRoutePrefix() in lib/tunnel/tunnel-timing.ts (prefix match, not exact pathname string).

    Full route tables, env overrides, and boot-race SSOT: Tunnel protocol.

    Where realtime is used

    FeatureServer publishClient subscribe
    NotificationspublishToUserTunnel → notifications:unread / notifications:inboxNotificationProvider → useNotificationContext()
    Credit balancepublishToUserTunnel → credit:balance (via creditBalanceService.publishBalanceUpdate)CreditBalanceProvider → useCreditBalanceContext() (bootstrap REST dedup + tunnel push; 60s poll only if tunnel down)
    Wallet list / native balancespublishWalletListUpdate → wallet:listWalletListProvider (wallet-wrapper) → useTunnelChannel('wallet:list')
    Account statuspublishToUserTunnel → account:statusGlobalTunnelListeners → AccountStatusTunnelListener
    Vendor sidebar gate— (HTTP only)

    See Tunnel protocol for API routes, RING_DEPLOY_TARGET, channel patterns, and alpha limitations.

    1. /
    2. /Real Time

    Updated Jul 20, 20263 min listen

    useVendorStatus() → GET /api/vendor/status (30s TTL, single-flight)
    ChatpublishToChannel → conversation:${id}hooks/use-messaging.ts → useTunnelChannel
    DiscoverysyncDiscovery → opportunities / entitiesuse-realtime-opportunities.ts / use-realtime-entities.ts
    MatcherpublishToChannel → matcherAdmin/matcher UI
    Collaboration (flagged)collab:${id} binary CRDT framesuseCollaboration (requires WSS)
    Docs
    Architecture
    useVendorStatus() → GET /api/vendor/status (30s TTL, single-flight)
    ChatpublishToChannel → conversation:${id}hooks/use-messaging.ts → useTunnelChannel
    DiscoverysyncDiscovery → opportunities / entitiesuse-realtime-opportunities.ts / use-realtime-entities.ts
    MatcherpublishToChannel → matcherAdmin/matcher UI
    Collaboration (flagged)collab:${id} binary CRDT framesuseCollaboration (requires WSS)
    Docs
    Architecture
    useVendorStatus() → GET /api/vendor/status (30s TTL, single-flight)
    ChatpublishToChannel → conversation:${id}hooks/use-messaging.ts → useTunnelChannel
    DiscoverysyncDiscovery → opportunities / entitiesuse-realtime-opportunities.ts / use-realtime-entities.ts
    MatcherpublishToChannel → matcherAdmin/matcher UI
    Collaboration (flagged)collab:${id} binary CRDT framesuseCollaboration (requires WSS)
    Docs
    Architecture