OpportunitiesEntities
Docs
    Ring Platform

    Decentralized Self-building Future

    Sign In
    Entities
    Opportunities
    Store
    Docs
    Platform Concepts
    RING EconomySonoratek LLCGlobal ImpactAI Meets Web3
    Get Started
    Quick StartCalculatorRoadmap
    Privacy|Contact
    v1.106.26|Sonoratek LLC

    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
    Membership & Credits
    SubscriptionConductor
    PaymentConductor
    Ring Oracle
    Payments Overview
    Public Pools & DAO Jars
    WayForPay Payment Integration
    Wallet & Credit System
    WalletConductor
    Credit Rewards
    Affiliate & Referral Enablement
    Referral Codes (Refcodes)
    Page Curtain
    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
    Project configuration
    Public environment variables
    Order Lab secrets
    WalletConnect Project ID (Reown Cloud)
    Supported services
    NODUS wiki (project knowledge)
    Configuration playbook
    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
    News Kingdom architecture
    Backend Services
    Firebase Integration
    Development
    Ring MCP Server
    OSS vs enterprise

    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
    Membership & Credits
    SubscriptionConductor
    PaymentConductor
    Ring Oracle
    Payments Overview
    Public Pools & DAO Jars
    WayForPay Payment Integration
    Wallet & Credit System
    WalletConductor
    Credit Rewards
    Affiliate & Referral Enablement
    Referral Codes (Refcodes)
    Page Curtain
    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
    Project configuration
    Public environment variables
    Order Lab secrets
    WalletConnect Project ID (Reown Cloud)
    Supported services
    NODUS wiki (project knowledge)
    Configuration playbook
    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
    News Kingdom architecture
    Backend Services
    Firebase Integration
    Development
    Ring MCP Server
    OSS vs enterprise

    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
    Membership & Credits
    SubscriptionConductor
    PaymentConductor
    Ring Oracle
    Payments Overview
    Public Pools & DAO Jars
    WayForPay Payment Integration
    Wallet & Credit System
    WalletConductor
    Credit Rewards
    Affiliate & Referral Enablement
    Referral Codes (Refcodes)
    Page Curtain
    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
    Project configuration
    Public environment variables
    Order Lab secrets
    WalletConnect Project ID (Reown Cloud)
    Supported services
    NODUS wiki (project knowledge)
    Configuration playbook
    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
    News Kingdom architecture
    Backend Services
    Firebase Integration
    Development
    Ring MCP Server
    OSS vs enterprise

    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 Logo

    Loading documentation...

    Preparing Ring content

    Ring Logo

    Loading documentation...

    Preparing Ring content

    Ring Logo

    Loading documentation...

    Preparing Ring content

    Multi-Vendor Store

    Ring Platform ships a multi-vendor marketplace: any verified Entity can onboard as a vendor, list products, and earn after paid orders settle. Buyers browse a cached catalog, hold a cart, then check out through authenticated order + PaymentConductor rails. Vendors enrich catalog copy with Agent Knowledge Research (WebConductor → fields, markdown, Admin Wiki NODUS, File Cabinet alt images) and opt media into the gallery explicitly.

    Use the Founder / Developer tabs in the docs sidebar to filter this page. Cart and checkout below match features/store + app/api/store/* in Layer1 — do not invent extra cart REST beyond the verified session mirror.

    Capability map

    ConcernWhere it livesNotes
    Catalog SSOTgetCachedProductCatalog() → GET /api/store/products'use cache' + cacheTag('store:products'); invalidate with updateTag after create
    Guest cartlocalStorage key ring_cart{ id, qty }[] in features/store/context.tsx
    Auth cart mirrorGET/POST /api/store/cartSession-bound; ignores client userId. Guests do not call POST /api/store/cart/hold
    Checkout quoteGET /api/store/settings + quoteStoreOrderShipping prices, promo codes, and product offers. The server recomputes total
    CheckoutPOST /api/store/checkout and placeAndPayStoreOrderAuth required → StoreOrdersService + inventory reserve + vendorSettlements
    PayPOST /api/store/payments/*PaymentConductor purpose store_order
    Vendor desk/vendor/start, /vendor/productsServer actions — not /api/store/vendors
    Commissionssettlement.ts + /admin/store/commissionsPlatform tier % from TIER_BENEFITS (StoreTier)

    Why the multi-vendor store matters for your clone

    Every Entity in your Ring deployment can become a selling vendor — no external marketplace needed. Platform revenue comes from tier-based commission rates on settled sales. Vendors catalogue themselves; operators approve products and settle commissions from the admin cockpit.

    Key operator capabilities

    Vendor lifecycle

    Onboard entities at /vendor/start. Trust scoring, tier progression, and suspension live in vendor-lifecycle.

    Agent Knowledge Research

    On create/edit product forms: Research → fields + markdown + wiki NODUS + cabinet alt images. Use in gallery is explicit — nothing silently replaces the primary photo.

    Commission settlements

    Tier-based platform commission per sale. Admin dashboard at /admin/store/commissions — dry-run and process due payouts.

    Implementation

    Multi-vendor architecture

    Cart and checkout (verified — no invented routes)

    PiecePathRole
    Client contextfeatures/store/context.tsxGlobal StoreProvider; defers catalog fetch until pathname includes /store or ring_cart has items; single-flight GET /api/store/products
    Guest linesuseLocalStorage('ring_cart'){ id, qty }[]
    Server cart

    Frequently asked questions

    Impact

    Will guests keep a cart without signing in?

    Yes — lines live in ring_cart on the device. Signing in hydrates from GET /api/store/cart (server wins) and subsequent edits POST back to the session mirror.

    Do commissions run when someone adds to cart?

    No. Platform commission and referral splits are calculated on vendor order settlement after a payable order exists — not on cart mutations.

    Does visiting a product page create a chat?

    No. A product thread appears in Messages only after the shopper writes to the product agent.

    Can member-only products appear on the public storefront?

    Not for non-members. getStoreProducts filters productAudience: 'member' unless the viewer is admin or has member privileges.

    Migration

    We used a client-only cart and no server mirror — what changes?

    Keep ring_cart for guests. For authenticated buyers, treat /api/store/cart as the SSOT on hydrate and after edits; soft-holds may return 409 on insufficient stock. Checkout still requires a session.

    Is POST /api/store/orders still valid?

    Checkout and orders share the same payable orders pipeline via StoreOrdersService. Prefer the documented checkout entry used by HttpStoreAdapter (/api/store/checkout). Avoid any legacy path that wrote only store_orders — payment webhooks do not settle those.

    Ops

    Where do operators set shipping prices and promo codes?

    /admin/store/settings for Nova Poshta and store pickup. /admin/store/promotions for codes and free shipping. A vendor can open both pages; their save does not replace platform-wide codes.

    Does the checkout total trust the browser?

    No. quoteStoreOrder recomputes product offers, the promo code, and shipping, then writes that total on the order.

    Where do operators settle vendor payouts?

    /admin/store/commissions — dry-run due payouts, process due, and hold. Deep dive: Commissions & Settlements.

    Catalog looks stale after a product create — what to invalidate?

    Call updateTag('store:products') (already wired on product create in app/api/store/products/route.ts). Consumers must go through getCachedProductCatalog().

    How do payments attach to store checkout?

    After order create, UI posts to /api/store/payments/{wayforpay|stripe|credit|token|paypal|card} → PaymentConductor purpose store_order. See PaymentConductor and Store API.

    Related documentation

    Related documentation

    Page Curtain

    See-also: advertise products in the page curtain and pay authors a commission.

    PaymentConductor

    Depends-on: store_order checkouts settle through PaymentConductor and the payment_transactions ledger.

    Payments Overview

    Same-workflow: clone payment rails and env gates that store checkout methods respect.

    Ring ERP

    Next-step: ERP hub for stock invariant, commitSale, and settlements cockpit.

    1. Docs
    2. /Features
    3. /Multi-Vendor Store

    Updated Oct 31, 202611 min listen

    Multi-Vendor Store

    Ring Platform ships a multi-vendor marketplace: any verified Entity can onboard as a vendor, list products, and earn after paid orders settle. Buyers browse a cached catalog, hold a cart, then check out through authenticated order + PaymentConductor rails. Vendors enrich catalog copy with Agent Knowledge Research (WebConductor → fields, markdown, Admin Wiki NODUS, File Cabinet alt images) and opt media into the gallery explicitly.

    Use the Founder / Developer tabs in the docs sidebar to filter this page. Cart and checkout below match features/store + app/api/store/* in Layer1 — do not invent extra cart REST beyond the verified session mirror.

    Capability map

    ConcernWhere it livesNotes
    Catalog SSOTgetCachedProductCatalog() → GET /api/store/products'use cache' + cacheTag('store:products'); invalidate with updateTag after create
    Guest cartlocalStorage key ring_cart{ id, qty }[] in features/store/context.tsx
    Auth cart mirrorGET/POST /api/store/cartSession-bound; ignores client userId. Guests do not call POST /api/store/cart/hold
    Checkout quoteGET /api/store/settings + quoteStoreOrderShipping prices, promo codes, and product offers. The server recomputes total
    CheckoutPOST /api/store/checkout and placeAndPayStoreOrderAuth required → StoreOrdersService + inventory reserve + vendorSettlements
    PayPOST /api/store/payments/*PaymentConductor purpose store_order
    Vendor desk/vendor/start, /vendor/productsServer actions — not /api/store/vendors
    Commissionssettlement.ts + /admin/store/commissionsPlatform tier % from TIER_BENEFITS (StoreTier)

    Why the multi-vendor store matters for your clone

    Every Entity in your Ring deployment can become a selling vendor — no external marketplace needed. Platform revenue comes from tier-based commission rates on settled sales. Vendors catalogue themselves; operators approve products and settle commissions from the admin cockpit.

    Key operator capabilities

    Vendor lifecycle

    Onboard entities at /vendor/start. Trust scoring, tier progression, and suspension live in vendor-lifecycle.

    Agent Knowledge Research

    On create/edit product forms: Research → fields + markdown + wiki NODUS + cabinet alt images. Use in gallery is explicit — nothing silently replaces the primary photo.

    Commission settlements

    Tier-based platform commission per sale. Admin dashboard at /admin/store/commissions — dry-run and process due payouts.

    Implementation

    Multi-vendor architecture

    Cart and checkout (verified — no invented routes)

    PiecePathRole
    Client contextfeatures/store/context.tsxGlobal StoreProvider; defers catalog fetch until pathname includes /store or ring_cart has items; single-flight GET /api/store/products
    Guest linesuseLocalStorage('ring_cart'){ id, qty }[]
    Server cart

    Frequently asked questions

    Impact

    Will guests keep a cart without signing in?

    Yes — lines live in ring_cart on the device. Signing in hydrates from GET /api/store/cart (server wins) and subsequent edits POST back to the session mirror.

    Do commissions run when someone adds to cart?

    No. Platform commission and referral splits are calculated on vendor order settlement after a payable order exists — not on cart mutations.

    Does visiting a product page create a chat?

    No. A product thread appears in Messages only after the shopper writes to the product agent.

    Can member-only products appear on the public storefront?

    Not for non-members. getStoreProducts filters productAudience: 'member' unless the viewer is admin or has member privileges.

    Migration

    We used a client-only cart and no server mirror — what changes?

    Keep ring_cart for guests. For authenticated buyers, treat /api/store/cart as the SSOT on hydrate and after edits; soft-holds may return 409 on insufficient stock. Checkout still requires a session.

    Is POST /api/store/orders still valid?

    Checkout and orders share the same payable orders pipeline via StoreOrdersService. Prefer the documented checkout entry used by HttpStoreAdapter (/api/store/checkout). Avoid any legacy path that wrote only store_orders — payment webhooks do not settle those.

    Ops

    Where do operators set shipping prices and promo codes?

    /admin/store/settings for Nova Poshta and store pickup. /admin/store/promotions for codes and free shipping. A vendor can open both pages; their save does not replace platform-wide codes.

    Does the checkout total trust the browser?

    No. quoteStoreOrder recomputes product offers, the promo code, and shipping, then writes that total on the order.

    Where do operators settle vendor payouts?

    /admin/store/commissions — dry-run due payouts, process due, and hold. Deep dive: Commissions & Settlements.

    Catalog looks stale after a product create — what to invalidate?

    Call updateTag('store:products') (already wired on product create in app/api/store/products/route.ts). Consumers must go through getCachedProductCatalog().

    How do payments attach to store checkout?

    After order create, UI posts to /api/store/payments/{wayforpay|stripe|credit|token|paypal|card} → PaymentConductor purpose store_order. See PaymentConductor and Store API.

    Related documentation

    Related documentation

    Page Curtain

    See-also: advertise products in the page curtain and pay authors a commission.

    PaymentConductor

    Depends-on: store_order checkouts settle through PaymentConductor and the payment_transactions ledger.

    Payments Overview

    Same-workflow: clone payment rails and env gates that store checkout methods respect.

    Ring ERP

    Next-step: ERP hub for stock invariant, commitSale, and settlements cockpit.

    1. Docs
    2. /Features
    3. /Multi-Vendor Store

    Updated Oct 31, 202611 min listen

    Multi-Vendor Store

    Ring Platform ships a multi-vendor marketplace: any verified Entity can onboard as a vendor, list products, and earn after paid orders settle. Buyers browse a cached catalog, hold a cart, then check out through authenticated order + PaymentConductor rails. Vendors enrich catalog copy with Agent Knowledge Research (WebConductor → fields, markdown, Admin Wiki NODUS, File Cabinet alt images) and opt media into the gallery explicitly.

    Use the Founder / Developer tabs in the docs sidebar to filter this page. Cart and checkout below match features/store + app/api/store/* in Layer1 — do not invent extra cart REST beyond the verified session mirror.

    Capability map

    ConcernWhere it livesNotes
    Catalog SSOTgetCachedProductCatalog() → GET /api/store/products'use cache' + cacheTag('store:products'); invalidate with updateTag after create
    Guest cartlocalStorage key ring_cart{ id, qty }[] in features/store/context.tsx
    Auth cart mirrorGET/POST /api/store/cartSession-bound; ignores client userId. Guests do not call POST /api/store/cart/hold
    Checkout quoteGET /api/store/settings + quoteStoreOrderShipping prices, promo codes, and product offers. The server recomputes total
    CheckoutPOST /api/store/checkout and placeAndPayStoreOrderAuth required → StoreOrdersService + inventory reserve + vendorSettlements
    PayPOST /api/store/payments/*PaymentConductor purpose store_order
    Vendor desk/vendor/start, /vendor/productsServer actions — not /api/store/vendors
    Commissionssettlement.ts + /admin/store/commissionsPlatform tier % from TIER_BENEFITS (StoreTier)

    Why the multi-vendor store matters for your clone

    Every Entity in your Ring deployment can become a selling vendor — no external marketplace needed. Platform revenue comes from tier-based commission rates on settled sales. Vendors catalogue themselves; operators approve products and settle commissions from the admin cockpit.

    Key operator capabilities

    Vendor lifecycle

    Onboard entities at /vendor/start. Trust scoring, tier progression, and suspension live in vendor-lifecycle.

    Agent Knowledge Research

    On create/edit product forms: Research → fields + markdown + wiki NODUS + cabinet alt images. Use in gallery is explicit — nothing silently replaces the primary photo.

    Commission settlements

    Tier-based platform commission per sale. Admin dashboard at /admin/store/commissions — dry-run and process due payouts.

    Implementation

    Multi-vendor architecture

    Cart and checkout (verified — no invented routes)

    PiecePathRole
    Client contextfeatures/store/context.tsxGlobal StoreProvider; defers catalog fetch until pathname includes /store or ring_cart has items; single-flight GET /api/store/products
    Guest linesuseLocalStorage('ring_cart'){ id, qty }[]
    Server cart

    Frequently asked questions

    Impact

    Will guests keep a cart without signing in?

    Yes — lines live in ring_cart on the device. Signing in hydrates from GET /api/store/cart (server wins) and subsequent edits POST back to the session mirror.

    Do commissions run when someone adds to cart?

    No. Platform commission and referral splits are calculated on vendor order settlement after a payable order exists — not on cart mutations.

    Does visiting a product page create a chat?

    No. A product thread appears in Messages only after the shopper writes to the product agent.

    Can member-only products appear on the public storefront?

    Not for non-members. getStoreProducts filters productAudience: 'member' unless the viewer is admin or has member privileges.

    Migration

    We used a client-only cart and no server mirror — what changes?

    Keep ring_cart for guests. For authenticated buyers, treat /api/store/cart as the SSOT on hydrate and after edits; soft-holds may return 409 on insufficient stock. Checkout still requires a session.

    Is POST /api/store/orders still valid?

    Checkout and orders share the same payable orders pipeline via StoreOrdersService. Prefer the documented checkout entry used by HttpStoreAdapter (/api/store/checkout). Avoid any legacy path that wrote only store_orders — payment webhooks do not settle those.

    Ops

    Where do operators set shipping prices and promo codes?

    /admin/store/settings for Nova Poshta and store pickup. /admin/store/promotions for codes and free shipping. A vendor can open both pages; their save does not replace platform-wide codes.

    Does the checkout total trust the browser?

    No. quoteStoreOrder recomputes product offers, the promo code, and shipping, then writes that total on the order.

    Where do operators settle vendor payouts?

    /admin/store/commissions — dry-run due payouts, process due, and hold. Deep dive: Commissions & Settlements.

    Catalog looks stale after a product create — what to invalidate?

    Call updateTag('store:products') (already wired on product create in app/api/store/products/route.ts). Consumers must go through getCachedProductCatalog().

    How do payments attach to store checkout?

    After order create, UI posts to /api/store/payments/{wayforpay|stripe|credit|token|paypal|card} → PaymentConductor purpose store_order. See PaymentConductor and Store API.

    Related documentation

    Related documentation

    Page Curtain

    See-also: advertise products in the page curtain and pay authors a commission.

    PaymentConductor

    Depends-on: store_order checkouts settle through PaymentConductor and the payment_transactions ledger.

    Payments Overview

    Same-workflow: clone payment rails and env gates that store checkout methods respect.

    Ring ERP

    Next-step: ERP hub for stock invariant, commitSale, and settlements cockpit.

    1. Docs
    2. /Features
    3. /Multi-Vendor Store

    Updated Oct 31, 202611 min listen

    Product audience gating

    Mark products member-only. Non-members see public products only (hasMemberPrivileges()).

    Payments for store orders

    After checkout, buyers pay via PaymentConductor (store_order) — WayForPay, Stripe, credit, token, or PayPal when enabled.

    ERP stock

    Checkout reserves stock; paid webhooks drive commitSale — keep inventory and settlements aligned.

    Typical scenarios

    • Local business network — every shop lists inventory; settlements run from the commissions cockpit.
    • DAO / member catalog — member-gated SKUs; public products as lead magnets (productAudience: 'member').
    • Catalog enrichment — vendor pastes a manufacturer URL, runs Research, reviews suggested fields, saves Agent Knowledge, then clicks Use in gallery only for photos they want on the storefront.
    • DAGI assist — vendor ERP chat tool dagi_research_product returns the same suggested fields / research media / cabinet path for the bound vendor.

    Storefront product agent chats use Conversation.type: 'product' and stay visible in Messages. Generative Gallery tool chats set metadata kind: 'generative_gallery' (inbox filtering in conversation-service). See Messaging and Generative Gallery.

    Commission tiers (operator view)

    Settlement platform commission uses StoreTier benefits (constants/store.ts → TIER_BENEFITS):

    Store tierPlatform commission %Typical settlement cadence
    starter20%Weekly
    growth17%Daily
    professional15%Daily
    enterprise12%Instant

    Default fallback when tier benefits are missing: DEFAULT_COMMISSION_PCT = 15. Vendor trust levels (new → premium) track reputation separately from store tier. Referral commission is a dual rail — see Commissions and refcodes.

    features/store/services/server-cart.ts
    Collection store_user_carts; doc id cart_{userId}
    Cart HTTPapp/api/store/cart/route.tsAuth required; binds session.user.id only
    Soft-holdapp/api/store/cart/hold/route.tsInventory soft-hold while cart has lines
    Adapter checkoutfeatures/store/adapters/http-adapter.tsfetch('/api/store/checkout', { items, info })
    Checkout HTTPapp/api/store/checkout/route.tsAuth → StoreOrdersService + reserveInventoryForOrder; legacy adapter store_orders path is not the payable pipeline

    There is no public unauthenticated cart REST CRUD and no /api/store/vendors apply endpoint. Vendor onboarding is UI + server actions.

    Checkout delivery with Nova Poshta and store pickup

    features/store/components/checkout/prebilling-page.tsx asks GET /api/shipping/novapost/status whether Nova Poshta is configured (NOVAPOST_API_KEY, read in lib/shipping/nova-post.ts). Branch lookup uses /api/shipping/novapost/cities and /api/shipping/novapost/warehouses.

    Prices, ETAs, pickup address, and pickup hours come from platform_settings document store (features/store/services/store-settings-service.ts). Operators edit them at /admin/store/settings. A vendor who opens that page saves a shipping override on vendor_profiles (vendor_<entityId>). A cart that contains only that vendor’s products uses the override. A mixed-vendor cart sums each vendor’s shipping fee (respecting each vendor’s free-shipping threshold against that vendor’s subtotal, falling back to platform rates when a vendor has no override) and records shippingFee on each VendorSettlement.

    Express and Standard are not checkout options. A saved preference of express or standard falls back to Nova Poshta or pickup.

    Shipping methodWhat the form needsBilling address
    nova-postA selected branch. No street address is requiredForced to the shipping address
    pickupName and email. A home address is not requiredPickup address from store settings
    Other methods when Nova Poshta is offA saved address, or street and city for a guestAs chosen

    The selected branch card prints the settlement and region as plain text.

    Promo codes and product offers

    KindWhere it is storedWhere it applies
    Product offerstore_products.promotionsBOGO, percent off, or amount off on that line
    Platform promo codeplatform_settings / storeWhole cart. Default code WELCOME10 until an admin replaces it
    Vendor promo codeSame document, with vendorEntityIdOnly that vendor’s lines

    Buyers apply a code on the cart. It is kept in localStorage key ring_store_promo. quoteFromSettings in features/store/types/store-settings.ts is the client math. quoteStoreOrder in features/store/services/store-quote.ts is the charge. placeAndPayStoreOrder, POST /api/store/orders, and POST /api/store/checkout ignore the client total.

    Codes can have a start date, an end date, maxRedemptions (global cap), and maxUsesPerUser (per-buyer cap verified against paid orders by userId and buyer email). A date-only end date lasts through that UTC day. Online payment rails increment redemptionCount inside fulfillStoreOrderPaid (promoRedemptionCounted: true) so abandoned checkouts do not consume maxRedemptions.

    /admin/store/promotions edits codes, free shipping, and the checkout special-offer flag. Platform admins edit platform codes. Vendors edit their own codes and free-shipping policy. Product offers stay on the product form.

    Product agent chat and the inbox

    Opening a product page no longer creates a Messages thread. GET /api/store/products/<id>/agent-chat only looks up an existing conversation (findExistingConversation). The thread is created when the shopper sends a first message. metadata.buyerEngaged is set after that message is saved, and conversation:new is published then. ConversationService.getConversations hides product threads that are not engaged and have no message from the shopper. A later reply on an old thread backfills the flag.

    Curtain advertising and image hosts

    • Vendors can opt a product into the page curtain with an author commission of 1% to 10% (default 5%).
    • domains.imageHosts in ring-config.json lists extra hostnames next/image may load from, for example a partner inventory feed. next.config.mjs reads it at build time, so a running image cannot add hosts.

    Agent Knowledge Research (shipped)

    PiecePathRole
    Conductorlib/web/conductor/web-conductor.tsTextConductor webSearch: true → structured fields + productAgentMarkdown + NODUS JSON + citation-host image candidates
    Orchestratorfeatures/store/lib/product-agent-research.tsBuilds request + runProductAgentResearch
    Cabinet writerfeatures/store/lib/product-cabinet-media.tsDirs store/[storename]/[product-slug]/alt (fits MAX_FOLDER_DEPTH 3; conceptual files/ prefix), SSRF-safe image fetch → RingBase → cabinet nodes
    Actionsapp/_actions/product-agent-research.tsresearchProductAgentAction, researchProductDraftAction, saveProductAgentKnowledgeAction
    UIfeatures/store/components/product-agent-knowledge-section.tsxCreate + edit; Use in gallery explicit
    Wiki helperfeatures/store/lib/product-nodus-wiki.tscreateProductNodusWikiFromDraft → tenant Admin Wiki
    DAGIfeatures/store/services/dagi-erp-tools.tsdagi_research_product → suggestedFields / researchMedia / cabinetPath / skippedImages
    Schema notesAI-LEGIOX/legiox-truth-lens/AGENT-PRODUCT-SCHEMA.mdPhoto / research generator steps

    Auth: vendor entity owner or platform admin (resolveResearchVendor + ownership check). Draft research (no product id yet) uses researchProductDraftAction and still writes cabinet artifacts under the vendor owner.

    Gallery rule: research media is never auto-merged as primary. Operators must click Use in gallery.

    Product catalog SSOT

    getCachedProductCatalog() in features/store/config.ts ('use cache' + cacheTag('store:products')). Consumers: app/api/store/products/route.ts, getStoreProducts in app/_actions/store-products.ts, MCP app/api/mcp/v1/store/products/route.ts. Invalidate with updateTag('store:products') after create.

    Verified app routes

    RoutePurposeAuth
    /vendor/startVendor onboardingSubscriber+
    /vendor/productsVendor product CRUD + Agent KnowledgeVendor entity owner
    /admin/store/productsProduct approval queue (same form)Platform admin
    /admin/store/settingsNova Poshta and pickup prices, ETA, address, hoursPlatform admin, or a vendor (saves that vendor’s override)
    /admin/store/promotionsPromo codes, free shipping, checkout special offerPlatform admin, or a vendor (own codes only)
    /admin/store/commissionsCommission settlementsPlatform admin
    /admin/store/ordersOrder deskPlatform admin
    /admin/store/stockStock deskPlatform admin
    /storePublic storefront + audience filterPublic
    /store/settingsSaved addresses and checkout preferencesSigned-in buyer

    Product custom fields

    1. 1

      Vendor selects a category on the product form.

    2. 2

      Adds name+value parameters (“Add product parameter”).

    3. 3

      Persists via createProductCustomField() in app/_actions/vendor-actions.ts (ownership-guarded).

    Product audience filtering

    Products with productAudience: 'member' (or legacy audience) are hidden unless isAdmin || hasMemberPrivileges(currentRole) in app/_actions/store-products.ts.

    Settlement commission SSOT

    features/store/services/settlement.ts reads TIER_BENEFITS[vendor.storeTier || 'starter'].commissionRate (fallback DEFAULT_COMMISSION_PCT). Weighted referral commission uses features/store/lib/referral-commission.ts. Do not document WayForPay’s local getCommissionRateForTier(NEW…PREMIUM) map as the settlement SSOT — that helper is payment-path specific.

    Module summary

    ModulePurpose
    features/store/config.tsAdapter + cached catalog SSOT
    features/store/context.tsxDeferred client catalog + cart + checkout call
    features/store/services/server-cart.tsAuthenticated cart mirror
    features/store/services/vendor-lifecycle.tsVendor profile + trust levels
    features/store/services/settlement.tsCommission calculation
    features/store/services/orders-service.tsPayable orders pipeline
    features/store/services/inventory-sync.tsreserve / commitSale / cancel restore
    lib/web/conductor/web-conductor.tsWeb product research
    features/store/lib/product-cabinet-media.tsResearch → File Cabinet alt
    app/_actions/product-agent-research.tsResearch / draft / save knowledge
    app/_actions/vendor-actions.tsVendor product CRUD + research form fields
    app/_actions/admin-store-erp.tsAdmin product path + Agent Knowledge hidden fields
    features/auth/user-role.tshasMemberPrivileges()
    constants/store.tsStoreTier, VendorTrustLevel, TIER_BENEFITS

    Inventory & Stock

    Deep-dive: reserve on checkout → commitSaleForOrder on paid → cancel/refund restore.

    Commissions & Settlements

    Next-step: vendor commission ledger, dry-run payouts, and referral dual-rail.

    Store API

    Deep-dive: verified /api/store HTTP surface for products, cart mirror, checkout, and payments.

    Ring File Cabinet

    Same-workflow: research images land under store/product/alt; Image/Video chat enhances siblings.

    Generative Gallery

    Next-step: Generative Gallery Upload | Generate on product forms and cabinet scope.

    Admin Wiki

    Depends-on: Research writes product NODUS pages into the tenant wiki vault.

    Ring Oracle

    Depends-on: SSR FX hydrate and presentment convertPrice / displayMode for checkout.

    Product audience gating

    Mark products member-only. Non-members see public products only (hasMemberPrivileges()).

    Payments for store orders

    After checkout, buyers pay via PaymentConductor (store_order) — WayForPay, Stripe, credit, token, or PayPal when enabled.

    ERP stock

    Checkout reserves stock; paid webhooks drive commitSale — keep inventory and settlements aligned.

    Typical scenarios

    • Local business network — every shop lists inventory; settlements run from the commissions cockpit.
    • DAO / member catalog — member-gated SKUs; public products as lead magnets (productAudience: 'member').
    • Catalog enrichment — vendor pastes a manufacturer URL, runs Research, reviews suggested fields, saves Agent Knowledge, then clicks Use in gallery only for photos they want on the storefront.
    • DAGI assist — vendor ERP chat tool dagi_research_product returns the same suggested fields / research media / cabinet path for the bound vendor.

    Storefront product agent chats use Conversation.type: 'product' and stay visible in Messages. Generative Gallery tool chats set metadata kind: 'generative_gallery' (inbox filtering in conversation-service). See Messaging and Generative Gallery.

    Commission tiers (operator view)

    Settlement platform commission uses StoreTier benefits (constants/store.ts → TIER_BENEFITS):

    Store tierPlatform commission %Typical settlement cadence
    starter20%Weekly
    growth17%Daily
    professional15%Daily
    enterprise12%Instant

    Default fallback when tier benefits are missing: DEFAULT_COMMISSION_PCT = 15. Vendor trust levels (new → premium) track reputation separately from store tier. Referral commission is a dual rail — see Commissions and refcodes.

    features/store/services/server-cart.ts
    Collection store_user_carts; doc id cart_{userId}
    Cart HTTPapp/api/store/cart/route.tsAuth required; binds session.user.id only
    Soft-holdapp/api/store/cart/hold/route.tsInventory soft-hold while cart has lines
    Adapter checkoutfeatures/store/adapters/http-adapter.tsfetch('/api/store/checkout', { items, info })
    Checkout HTTPapp/api/store/checkout/route.tsAuth → StoreOrdersService + reserveInventoryForOrder; legacy adapter store_orders path is not the payable pipeline

    There is no public unauthenticated cart REST CRUD and no /api/store/vendors apply endpoint. Vendor onboarding is UI + server actions.

    Checkout delivery with Nova Poshta and store pickup

    features/store/components/checkout/prebilling-page.tsx asks GET /api/shipping/novapost/status whether Nova Poshta is configured (NOVAPOST_API_KEY, read in lib/shipping/nova-post.ts). Branch lookup uses /api/shipping/novapost/cities and /api/shipping/novapost/warehouses.

    Prices, ETAs, pickup address, and pickup hours come from platform_settings document store (features/store/services/store-settings-service.ts). Operators edit them at /admin/store/settings. A vendor who opens that page saves a shipping override on vendor_profiles (vendor_<entityId>). A cart that contains only that vendor’s products uses the override. A mixed-vendor cart sums each vendor’s shipping fee (respecting each vendor’s free-shipping threshold against that vendor’s subtotal, falling back to platform rates when a vendor has no override) and records shippingFee on each VendorSettlement.

    Express and Standard are not checkout options. A saved preference of express or standard falls back to Nova Poshta or pickup.

    Shipping methodWhat the form needsBilling address
    nova-postA selected branch. No street address is requiredForced to the shipping address
    pickupName and email. A home address is not requiredPickup address from store settings
    Other methods when Nova Poshta is offA saved address, or street and city for a guestAs chosen

    The selected branch card prints the settlement and region as plain text.

    Promo codes and product offers

    KindWhere it is storedWhere it applies
    Product offerstore_products.promotionsBOGO, percent off, or amount off on that line
    Platform promo codeplatform_settings / storeWhole cart. Default code WELCOME10 until an admin replaces it
    Vendor promo codeSame document, with vendorEntityIdOnly that vendor’s lines

    Buyers apply a code on the cart. It is kept in localStorage key ring_store_promo. quoteFromSettings in features/store/types/store-settings.ts is the client math. quoteStoreOrder in features/store/services/store-quote.ts is the charge. placeAndPayStoreOrder, POST /api/store/orders, and POST /api/store/checkout ignore the client total.

    Codes can have a start date, an end date, maxRedemptions (global cap), and maxUsesPerUser (per-buyer cap verified against paid orders by userId and buyer email). A date-only end date lasts through that UTC day. Online payment rails increment redemptionCount inside fulfillStoreOrderPaid (promoRedemptionCounted: true) so abandoned checkouts do not consume maxRedemptions.

    /admin/store/promotions edits codes, free shipping, and the checkout special-offer flag. Platform admins edit platform codes. Vendors edit their own codes and free-shipping policy. Product offers stay on the product form.

    Product agent chat and the inbox

    Opening a product page no longer creates a Messages thread. GET /api/store/products/<id>/agent-chat only looks up an existing conversation (findExistingConversation). The thread is created when the shopper sends a first message. metadata.buyerEngaged is set after that message is saved, and conversation:new is published then. ConversationService.getConversations hides product threads that are not engaged and have no message from the shopper. A later reply on an old thread backfills the flag.

    Curtain advertising and image hosts

    • Vendors can opt a product into the page curtain with an author commission of 1% to 10% (default 5%).
    • domains.imageHosts in ring-config.json lists extra hostnames next/image may load from, for example a partner inventory feed. next.config.mjs reads it at build time, so a running image cannot add hosts.

    Agent Knowledge Research (shipped)

    PiecePathRole
    Conductorlib/web/conductor/web-conductor.tsTextConductor webSearch: true → structured fields + productAgentMarkdown + NODUS JSON + citation-host image candidates
    Orchestratorfeatures/store/lib/product-agent-research.tsBuilds request + runProductAgentResearch
    Cabinet writerfeatures/store/lib/product-cabinet-media.tsDirs store/[storename]/[product-slug]/alt (fits MAX_FOLDER_DEPTH 3; conceptual files/ prefix), SSRF-safe image fetch → RingBase → cabinet nodes
    Actionsapp/_actions/product-agent-research.tsresearchProductAgentAction, researchProductDraftAction, saveProductAgentKnowledgeAction
    UIfeatures/store/components/product-agent-knowledge-section.tsxCreate + edit; Use in gallery explicit
    Wiki helperfeatures/store/lib/product-nodus-wiki.tscreateProductNodusWikiFromDraft → tenant Admin Wiki
    DAGIfeatures/store/services/dagi-erp-tools.tsdagi_research_product → suggestedFields / researchMedia / cabinetPath / skippedImages
    Schema notesAI-LEGIOX/legiox-truth-lens/AGENT-PRODUCT-SCHEMA.mdPhoto / research generator steps

    Auth: vendor entity owner or platform admin (resolveResearchVendor + ownership check). Draft research (no product id yet) uses researchProductDraftAction and still writes cabinet artifacts under the vendor owner.

    Gallery rule: research media is never auto-merged as primary. Operators must click Use in gallery.

    Product catalog SSOT

    getCachedProductCatalog() in features/store/config.ts ('use cache' + cacheTag('store:products')). Consumers: app/api/store/products/route.ts, getStoreProducts in app/_actions/store-products.ts, MCP app/api/mcp/v1/store/products/route.ts. Invalidate with updateTag('store:products') after create.

    Verified app routes

    RoutePurposeAuth
    /vendor/startVendor onboardingSubscriber+
    /vendor/productsVendor product CRUD + Agent KnowledgeVendor entity owner
    /admin/store/productsProduct approval queue (same form)Platform admin
    /admin/store/settingsNova Poshta and pickup prices, ETA, address, hoursPlatform admin, or a vendor (saves that vendor’s override)
    /admin/store/promotionsPromo codes, free shipping, checkout special offerPlatform admin, or a vendor (own codes only)
    /admin/store/commissionsCommission settlementsPlatform admin
    /admin/store/ordersOrder deskPlatform admin
    /admin/store/stockStock deskPlatform admin
    /storePublic storefront + audience filterPublic
    /store/settingsSaved addresses and checkout preferencesSigned-in buyer

    Product custom fields

    1. 1

      Vendor selects a category on the product form.

    2. 2

      Adds name+value parameters (“Add product parameter”).

    3. 3

      Persists via createProductCustomField() in app/_actions/vendor-actions.ts (ownership-guarded).

    Product audience filtering

    Products with productAudience: 'member' (or legacy audience) are hidden unless isAdmin || hasMemberPrivileges(currentRole) in app/_actions/store-products.ts.

    Settlement commission SSOT

    features/store/services/settlement.ts reads TIER_BENEFITS[vendor.storeTier || 'starter'].commissionRate (fallback DEFAULT_COMMISSION_PCT). Weighted referral commission uses features/store/lib/referral-commission.ts. Do not document WayForPay’s local getCommissionRateForTier(NEW…PREMIUM) map as the settlement SSOT — that helper is payment-path specific.

    Module summary

    ModulePurpose
    features/store/config.tsAdapter + cached catalog SSOT
    features/store/context.tsxDeferred client catalog + cart + checkout call
    features/store/services/server-cart.tsAuthenticated cart mirror
    features/store/services/vendor-lifecycle.tsVendor profile + trust levels
    features/store/services/settlement.tsCommission calculation
    features/store/services/orders-service.tsPayable orders pipeline
    features/store/services/inventory-sync.tsreserve / commitSale / cancel restore
    lib/web/conductor/web-conductor.tsWeb product research
    features/store/lib/product-cabinet-media.tsResearch → File Cabinet alt
    app/_actions/product-agent-research.tsResearch / draft / save knowledge
    app/_actions/vendor-actions.tsVendor product CRUD + research form fields
    app/_actions/admin-store-erp.tsAdmin product path + Agent Knowledge hidden fields
    features/auth/user-role.tshasMemberPrivileges()
    constants/store.tsStoreTier, VendorTrustLevel, TIER_BENEFITS

    Inventory & Stock

    Deep-dive: reserve on checkout → commitSaleForOrder on paid → cancel/refund restore.

    Commissions & Settlements

    Next-step: vendor commission ledger, dry-run payouts, and referral dual-rail.

    Store API

    Deep-dive: verified /api/store HTTP surface for products, cart mirror, checkout, and payments.

    Ring File Cabinet

    Same-workflow: research images land under store/product/alt; Image/Video chat enhances siblings.

    Generative Gallery

    Next-step: Generative Gallery Upload | Generate on product forms and cabinet scope.

    Admin Wiki

    Depends-on: Research writes product NODUS pages into the tenant wiki vault.

    Ring Oracle

    Depends-on: SSR FX hydrate and presentment convertPrice / displayMode for checkout.

    Product audience gating

    Mark products member-only. Non-members see public products only (hasMemberPrivileges()).

    Payments for store orders

    After checkout, buyers pay via PaymentConductor (store_order) — WayForPay, Stripe, credit, token, or PayPal when enabled.

    ERP stock

    Checkout reserves stock; paid webhooks drive commitSale — keep inventory and settlements aligned.

    Typical scenarios

    • Local business network — every shop lists inventory; settlements run from the commissions cockpit.
    • DAO / member catalog — member-gated SKUs; public products as lead magnets (productAudience: 'member').
    • Catalog enrichment — vendor pastes a manufacturer URL, runs Research, reviews suggested fields, saves Agent Knowledge, then clicks Use in gallery only for photos they want on the storefront.
    • DAGI assist — vendor ERP chat tool dagi_research_product returns the same suggested fields / research media / cabinet path for the bound vendor.

    Storefront product agent chats use Conversation.type: 'product' and stay visible in Messages. Generative Gallery tool chats set metadata kind: 'generative_gallery' (inbox filtering in conversation-service). See Messaging and Generative Gallery.

    Commission tiers (operator view)

    Settlement platform commission uses StoreTier benefits (constants/store.ts → TIER_BENEFITS):

    Store tierPlatform commission %Typical settlement cadence
    starter20%Weekly
    growth17%Daily
    professional15%Daily
    enterprise12%Instant

    Default fallback when tier benefits are missing: DEFAULT_COMMISSION_PCT = 15. Vendor trust levels (new → premium) track reputation separately from store tier. Referral commission is a dual rail — see Commissions and refcodes.

    features/store/services/server-cart.ts
    Collection store_user_carts; doc id cart_{userId}
    Cart HTTPapp/api/store/cart/route.tsAuth required; binds session.user.id only
    Soft-holdapp/api/store/cart/hold/route.tsInventory soft-hold while cart has lines
    Adapter checkoutfeatures/store/adapters/http-adapter.tsfetch('/api/store/checkout', { items, info })
    Checkout HTTPapp/api/store/checkout/route.tsAuth → StoreOrdersService + reserveInventoryForOrder; legacy adapter store_orders path is not the payable pipeline

    There is no public unauthenticated cart REST CRUD and no /api/store/vendors apply endpoint. Vendor onboarding is UI + server actions.

    Checkout delivery with Nova Poshta and store pickup

    features/store/components/checkout/prebilling-page.tsx asks GET /api/shipping/novapost/status whether Nova Poshta is configured (NOVAPOST_API_KEY, read in lib/shipping/nova-post.ts). Branch lookup uses /api/shipping/novapost/cities and /api/shipping/novapost/warehouses.

    Prices, ETAs, pickup address, and pickup hours come from platform_settings document store (features/store/services/store-settings-service.ts). Operators edit them at /admin/store/settings. A vendor who opens that page saves a shipping override on vendor_profiles (vendor_<entityId>). A cart that contains only that vendor’s products uses the override. A mixed-vendor cart sums each vendor’s shipping fee (respecting each vendor’s free-shipping threshold against that vendor’s subtotal, falling back to platform rates when a vendor has no override) and records shippingFee on each VendorSettlement.

    Express and Standard are not checkout options. A saved preference of express or standard falls back to Nova Poshta or pickup.

    Shipping methodWhat the form needsBilling address
    nova-postA selected branch. No street address is requiredForced to the shipping address
    pickupName and email. A home address is not requiredPickup address from store settings
    Other methods when Nova Poshta is offA saved address, or street and city for a guestAs chosen

    The selected branch card prints the settlement and region as plain text.

    Promo codes and product offers

    KindWhere it is storedWhere it applies
    Product offerstore_products.promotionsBOGO, percent off, or amount off on that line
    Platform promo codeplatform_settings / storeWhole cart. Default code WELCOME10 until an admin replaces it
    Vendor promo codeSame document, with vendorEntityIdOnly that vendor’s lines

    Buyers apply a code on the cart. It is kept in localStorage key ring_store_promo. quoteFromSettings in features/store/types/store-settings.ts is the client math. quoteStoreOrder in features/store/services/store-quote.ts is the charge. placeAndPayStoreOrder, POST /api/store/orders, and POST /api/store/checkout ignore the client total.

    Codes can have a start date, an end date, maxRedemptions (global cap), and maxUsesPerUser (per-buyer cap verified against paid orders by userId and buyer email). A date-only end date lasts through that UTC day. Online payment rails increment redemptionCount inside fulfillStoreOrderPaid (promoRedemptionCounted: true) so abandoned checkouts do not consume maxRedemptions.

    /admin/store/promotions edits codes, free shipping, and the checkout special-offer flag. Platform admins edit platform codes. Vendors edit their own codes and free-shipping policy. Product offers stay on the product form.

    Product agent chat and the inbox

    Opening a product page no longer creates a Messages thread. GET /api/store/products/<id>/agent-chat only looks up an existing conversation (findExistingConversation). The thread is created when the shopper sends a first message. metadata.buyerEngaged is set after that message is saved, and conversation:new is published then. ConversationService.getConversations hides product threads that are not engaged and have no message from the shopper. A later reply on an old thread backfills the flag.

    Curtain advertising and image hosts

    • Vendors can opt a product into the page curtain with an author commission of 1% to 10% (default 5%).
    • domains.imageHosts in ring-config.json lists extra hostnames next/image may load from, for example a partner inventory feed. next.config.mjs reads it at build time, so a running image cannot add hosts.

    Agent Knowledge Research (shipped)

    PiecePathRole
    Conductorlib/web/conductor/web-conductor.tsTextConductor webSearch: true → structured fields + productAgentMarkdown + NODUS JSON + citation-host image candidates
    Orchestratorfeatures/store/lib/product-agent-research.tsBuilds request + runProductAgentResearch
    Cabinet writerfeatures/store/lib/product-cabinet-media.tsDirs store/[storename]/[product-slug]/alt (fits MAX_FOLDER_DEPTH 3; conceptual files/ prefix), SSRF-safe image fetch → RingBase → cabinet nodes
    Actionsapp/_actions/product-agent-research.tsresearchProductAgentAction, researchProductDraftAction, saveProductAgentKnowledgeAction
    UIfeatures/store/components/product-agent-knowledge-section.tsxCreate + edit; Use in gallery explicit
    Wiki helperfeatures/store/lib/product-nodus-wiki.tscreateProductNodusWikiFromDraft → tenant Admin Wiki
    DAGIfeatures/store/services/dagi-erp-tools.tsdagi_research_product → suggestedFields / researchMedia / cabinetPath / skippedImages
    Schema notesAI-LEGIOX/legiox-truth-lens/AGENT-PRODUCT-SCHEMA.mdPhoto / research generator steps

    Auth: vendor entity owner or platform admin (resolveResearchVendor + ownership check). Draft research (no product id yet) uses researchProductDraftAction and still writes cabinet artifacts under the vendor owner.

    Gallery rule: research media is never auto-merged as primary. Operators must click Use in gallery.

    Product catalog SSOT

    getCachedProductCatalog() in features/store/config.ts ('use cache' + cacheTag('store:products')). Consumers: app/api/store/products/route.ts, getStoreProducts in app/_actions/store-products.ts, MCP app/api/mcp/v1/store/products/route.ts. Invalidate with updateTag('store:products') after create.

    Verified app routes

    RoutePurposeAuth
    /vendor/startVendor onboardingSubscriber+
    /vendor/productsVendor product CRUD + Agent KnowledgeVendor entity owner
    /admin/store/productsProduct approval queue (same form)Platform admin
    /admin/store/settingsNova Poshta and pickup prices, ETA, address, hoursPlatform admin, or a vendor (saves that vendor’s override)
    /admin/store/promotionsPromo codes, free shipping, checkout special offerPlatform admin, or a vendor (own codes only)
    /admin/store/commissionsCommission settlementsPlatform admin
    /admin/store/ordersOrder deskPlatform admin
    /admin/store/stockStock deskPlatform admin
    /storePublic storefront + audience filterPublic
    /store/settingsSaved addresses and checkout preferencesSigned-in buyer

    Product custom fields

    1. 1

      Vendor selects a category on the product form.

    2. 2

      Adds name+value parameters (“Add product parameter”).

    3. 3

      Persists via createProductCustomField() in app/_actions/vendor-actions.ts (ownership-guarded).

    Product audience filtering

    Products with productAudience: 'member' (or legacy audience) are hidden unless isAdmin || hasMemberPrivileges(currentRole) in app/_actions/store-products.ts.

    Settlement commission SSOT

    features/store/services/settlement.ts reads TIER_BENEFITS[vendor.storeTier || 'starter'].commissionRate (fallback DEFAULT_COMMISSION_PCT). Weighted referral commission uses features/store/lib/referral-commission.ts. Do not document WayForPay’s local getCommissionRateForTier(NEW…PREMIUM) map as the settlement SSOT — that helper is payment-path specific.

    Module summary

    ModulePurpose
    features/store/config.tsAdapter + cached catalog SSOT
    features/store/context.tsxDeferred client catalog + cart + checkout call
    features/store/services/server-cart.tsAuthenticated cart mirror
    features/store/services/vendor-lifecycle.tsVendor profile + trust levels
    features/store/services/settlement.tsCommission calculation
    features/store/services/orders-service.tsPayable orders pipeline
    features/store/services/inventory-sync.tsreserve / commitSale / cancel restore
    lib/web/conductor/web-conductor.tsWeb product research
    features/store/lib/product-cabinet-media.tsResearch → File Cabinet alt
    app/_actions/product-agent-research.tsResearch / draft / save knowledge
    app/_actions/vendor-actions.tsVendor product CRUD + research form fields
    app/_actions/admin-store-erp.tsAdmin product path + Agent Knowledge hidden fields
    features/auth/user-role.tshasMemberPrivileges()
    constants/store.tsStoreTier, VendorTrustLevel, TIER_BENEFITS

    Inventory & Stock

    Deep-dive: reserve on checkout → commitSaleForOrder on paid → cancel/refund restore.

    Commissions & Settlements

    Next-step: vendor commission ledger, dry-run payouts, and referral dual-rail.

    Store API

    Deep-dive: verified /api/store HTTP surface for products, cart mirror, checkout, and payments.

    Ring File Cabinet

    Same-workflow: research images land under store/product/alt; Image/Video chat enhances siblings.

    Generative Gallery

    Next-step: Generative Gallery Upload | Generate on product forms and cabinet scope.

    Admin Wiki

    Depends-on: Research writes product NODUS pages into the tenant wiki vault.

    Ring Oracle

    Depends-on: SSR FX hydrate and presentment convertPrice / displayMode for checkout.