Підготовка контенту платформи Ring
Підготовка контенту платформи Ring
Підготовка контенту платформи Ring
Concepts, value, and typical clone scenarios — less code.
Concepts, value, and typical clone scenarios — less code.
Concepts, value, and typical clone scenarios — less code.
Ring Platform ships a multi-vendor marketplace where any verified Entity can operate a store, list products, and earn through automated commission settlements. The platform operator (Founder) earns from tiered commissions; vendors add products via a configurable product form with per-category custom fields and audience-gated visibility.
Use the Founder / Developer tabs in the docs sidebar to filter this page by audience.
Every Entity in your Ring deployment can become a selling vendor — no external marketplace needed. The store generates platform revenue through tier-based commission rates (NEW → BASIC → VERIFIED → TRUSTED → PREMIUM, descending from 20% to 12%) on every sale. Vendors handle cataloguing themselves via the product form; operators review submissions through the admin product queue and process settlements in the commissions dashboard.
Onboard entities as vendors at /vendor/start. Trust scoring, tier progression, and suspension workflows are automated.
Tier-based commissions calculated per sale. Admin dashboard at /admin/store/commissions shows pending payouts with referral breakdowns.
Vendors can mark products as member-only. Non-member visitors see only public products. Gated by the hasMemberPrivileges() role guard.
Vendors add per-category custom parameters (name + value pairs) below the category selector on the product form. Categories ship with SQL migration presets.
Inventory, stock management, warehouse operations, and vendor settlement pipelines.
Step-by-step guide for vendors: onboarding, product listing, and storefront setup.
API routes for products, orders, checkout, payments, and commission settlements.
WayForPay integration, HMAC webhook validation, and subscription billing.
Ring Platform ships a multi-vendor marketplace where any verified Entity can operate a store, list products, and earn through automated commission settlements. The platform operator (Founder) earns from tiered commissions; vendors add products via a configurable product form with per-category custom fields and audience-gated visibility.
Use the Founder / Developer tabs in the docs sidebar to filter this page by audience.
Every Entity in your Ring deployment can become a selling vendor — no external marketplace needed. The store generates platform revenue through tier-based commission rates (NEW → BASIC → VERIFIED → TRUSTED → PREMIUM, descending from 20% to 12%) on every sale. Vendors handle cataloguing themselves via the product form; operators review submissions through the admin product queue and process settlements in the commissions dashboard.
Onboard entities as vendors at /vendor/start. Trust scoring, tier progression, and suspension workflows are automated.
Tier-based commissions calculated per sale. Admin dashboard at /admin/store/commissions shows pending payouts with referral breakdowns.
Vendors can mark products as member-only. Non-member visitors see only public products. Gated by the hasMemberPrivileges() role guard.
Vendors add per-category custom parameters (name + value pairs) below the category selector on the product form. Categories ship with SQL migration presets.
Inventory, stock management, warehouse operations, and vendor settlement pipelines.
Step-by-step guide for vendors: onboarding, product listing, and storefront setup.
API routes for products, orders, checkout, payments, and commission settlements.
WayForPay integration, HMAC webhook validation, and subscription billing.
Ring Platform ships a multi-vendor marketplace where any verified Entity can operate a store, list products, and earn through automated commission settlements. The platform operator (Founder) earns from tiered commissions; vendors add products via a configurable product form with per-category custom fields and audience-gated visibility.
Use the Founder / Developer tabs in the docs sidebar to filter this page by audience.
Every Entity in your Ring deployment can become a selling vendor — no external marketplace needed. The store generates platform revenue through tier-based commission rates (NEW → BASIC → VERIFIED → TRUSTED → PREMIUM, descending from 20% to 12%) on every sale. Vendors handle cataloguing themselves via the product form; operators review submissions through the admin product queue and process settlements in the commissions dashboard.
Onboard entities as vendors at /vendor/start. Trust scoring, tier progression, and suspension workflows are automated.
Tier-based commissions calculated per sale. Admin dashboard at /admin/store/commissions shows pending payouts with referral breakdowns.
Vendors can mark products as member-only. Non-member visitors see only public products. Gated by the hasMemberPrivileges() role guard.
Vendors add per-category custom parameters (name + value pairs) below the category selector on the product form. Categories ship with SQL migration presets.
Inventory, stock management, warehouse operations, and vendor settlement pipelines.
Step-by-step guide for vendors: onboarding, product listing, and storefront setup.
API routes for products, orders, checkout, payments, and commission settlements.
WayForPay integration, HMAC webhook validation, and subscription billing.
Cache invalidation: after product create, call updateTag('store:products') — verified in app/api/store/products/route.ts (POST) and app/api/mcp/v1/store/products/route.ts (POST). New products appear immediately instead of waiting for cacheLife('minutes').
features/store/context.tsx mounts StoreProvider globally (nav cart badge needs totalItems on every route) but defers the product-list network call:
pathname includes /store or the user already has cart items in localStorage.fetchStoreProductsSingleFlight) so concurrent mounts share one GET /api/store/products.refreshEnhancedProducts() bypasses single-flight and hits the network fresh.This follows the minimal-global-state pattern — no full catalog in client state until a store route or cart warrants it.
| Route | Purpose | Auth |
|---|---|---|
/vendor/start | Vendor onboarding form | Subscriber+ |
/vendor/products | Vendor product CRUD | Vendor entity owner |
/vendor/products/product-form.tsx | Create/edit product form with category selector, custom fields, audience toggle | Vendor entity owner |
/admin/store/commissions | Commission settlements dashboard | Platform admin |
/admin/store/products | Product approval queue | Platform admin |
/store | Public storefront with audience filtering | Public (member-gated products hidden) |
When a vendor is approved, createVendorProfile() in features/store/services/vendor-lifecycle.ts:
VendorProfile with store_activated: true and store_status: 'test'storeCategories: getSystemConfigSnapshot().store?.storeCategories ?? []entities collection (embedded) and vendor_profiles collection (mirror)STORE_CREATED eventCategories are defined in ring-config.json under store.storeCategories and shipped via SQL migration presets (productFieldsPresets).
Vendors can add arbitrary name-value pairs to products, scoped by category. The flow:
product_custom_fields table via createProductCustomField() in app/_actions/vendor-actions.tsCRUD actions (all auth-guarded via getVendorEntity() + product ownership verification):
Products carrying productAudience: 'member' are hidden from non-member visitors. Implemented in app/_actions/store-products.ts after catalog filters:
The hasMemberPrivileges() guard checks role >= member (member, confidential, admin, superadmin).
| Module | Purpose |
|---|---|
features/store/config.ts | Adapter selection + getCachedProductCatalog() SSOT |
features/store/context.tsx | StoreProvider — deferred client catalog load, cart state |
features/store/services/vendor-lifecycle.ts | Vendor profile creation, trust scoring, tier progression |
features/store/services/settlement.ts | Commission calculation (tier-based + referral) |
app/_actions/vendor-actions.ts | Vendor product CRUD, custom fields CRUD |
app/_actions/store-products.ts | Storefront listing — cached catalog + filters + audience gate |
app/api/store/products/route.ts | REST catalog GET/POST + updateTag on create |
app/api/mcp/v1/store/products/route.ts | MCP list/create + updateTag on create |
features/auth/user-role.ts | hasMemberPrivileges() — role-based product visibility |
Cache invalidation: after product create, call updateTag('store:products') — verified in app/api/store/products/route.ts (POST) and app/api/mcp/v1/store/products/route.ts (POST). New products appear immediately instead of waiting for cacheLife('minutes').
features/store/context.tsx mounts StoreProvider globally (nav cart badge needs totalItems on every route) but defers the product-list network call:
pathname includes /store or the user already has cart items in localStorage.fetchStoreProductsSingleFlight) so concurrent mounts share one GET /api/store/products.refreshEnhancedProducts() bypasses single-flight and hits the network fresh.This follows the minimal-global-state pattern — no full catalog in client state until a store route or cart warrants it.
| Route | Purpose | Auth |
|---|---|---|
/vendor/start | Vendor onboarding form | Subscriber+ |
/vendor/products | Vendor product CRUD | Vendor entity owner |
/vendor/products/product-form.tsx | Create/edit product form with category selector, custom fields, audience toggle | Vendor entity owner |
/admin/store/commissions | Commission settlements dashboard | Platform admin |
/admin/store/products | Product approval queue | Platform admin |
/store | Public storefront with audience filtering | Public (member-gated products hidden) |
When a vendor is approved, createVendorProfile() in features/store/services/vendor-lifecycle.ts:
VendorProfile with store_activated: true and store_status: 'test'storeCategories: getSystemConfigSnapshot().store?.storeCategories ?? []entities collection (embedded) and vendor_profiles collection (mirror)STORE_CREATED eventCategories are defined in ring-config.json under store.storeCategories and shipped via SQL migration presets (productFieldsPresets).
Vendors can add arbitrary name-value pairs to products, scoped by category. The flow:
product_custom_fields table via createProductCustomField() in app/_actions/vendor-actions.tsCRUD actions (all auth-guarded via getVendorEntity() + product ownership verification):
Products carrying productAudience: 'member' are hidden from non-member visitors. Implemented in app/_actions/store-products.ts after catalog filters:
The hasMemberPrivileges() guard checks role >= member (member, confidential, admin, superadmin).
| Module | Purpose |
|---|---|
features/store/config.ts | Adapter selection + getCachedProductCatalog() SSOT |
features/store/context.tsx | StoreProvider — deferred client catalog load, cart state |
features/store/services/vendor-lifecycle.ts | Vendor profile creation, trust scoring, tier progression |
features/store/services/settlement.ts | Commission calculation (tier-based + referral) |
app/_actions/vendor-actions.ts | Vendor product CRUD, custom fields CRUD |
app/_actions/store-products.ts | Storefront listing — cached catalog + filters + audience gate |
app/api/store/products/route.ts | REST catalog GET/POST + updateTag on create |
app/api/mcp/v1/store/products/route.ts | MCP list/create + updateTag on create |
features/auth/user-role.ts | hasMemberPrivileges() — role-based product visibility |
Cache invalidation: after product create, call updateTag('store:products') — verified in app/api/store/products/route.ts (POST) and app/api/mcp/v1/store/products/route.ts (POST). New products appear immediately instead of waiting for cacheLife('minutes').
features/store/context.tsx mounts StoreProvider globally (nav cart badge needs totalItems on every route) but defers the product-list network call:
pathname includes /store or the user already has cart items in localStorage.fetchStoreProductsSingleFlight) so concurrent mounts share one GET /api/store/products.refreshEnhancedProducts() bypasses single-flight and hits the network fresh.This follows the minimal-global-state pattern — no full catalog in client state until a store route or cart warrants it.
| Route | Purpose | Auth |
|---|---|---|
/vendor/start | Vendor onboarding form | Subscriber+ |
/vendor/products | Vendor product CRUD | Vendor entity owner |
/vendor/products/product-form.tsx | Create/edit product form with category selector, custom fields, audience toggle | Vendor entity owner |
/admin/store/commissions | Commission settlements dashboard | Platform admin |
/admin/store/products | Product approval queue | Platform admin |
/store | Public storefront with audience filtering | Public (member-gated products hidden) |
When a vendor is approved, createVendorProfile() in features/store/services/vendor-lifecycle.ts:
VendorProfile with store_activated: true and store_status: 'test'storeCategories: getSystemConfigSnapshot().store?.storeCategories ?? []entities collection (embedded) and vendor_profiles collection (mirror)STORE_CREATED eventCategories are defined in ring-config.json under store.storeCategories and shipped via SQL migration presets (productFieldsPresets).
Vendors can add arbitrary name-value pairs to products, scoped by category. The flow:
product_custom_fields table via createProductCustomField() in app/_actions/vendor-actions.tsCRUD actions (all auth-guarded via getVendorEntity() + product ownership verification):
Products carrying productAudience: 'member' are hidden from non-member visitors. Implemented in app/_actions/store-products.ts after catalog filters:
The hasMemberPrivileges() guard checks role >= member (member, confidential, admin, superadmin).
| Module | Purpose |
|---|---|
features/store/config.ts | Adapter selection + getCachedProductCatalog() SSOT |
features/store/context.tsx | StoreProvider — deferred client catalog load, cart state |
features/store/services/vendor-lifecycle.ts | Vendor profile creation, trust scoring, tier progression |
features/store/services/settlement.ts | Commission calculation (tier-based + referral) |
app/_actions/vendor-actions.ts | Vendor product CRUD, custom fields CRUD |
app/_actions/store-products.ts | Storefront listing — cached catalog + filters + audience gate |
app/api/store/products/route.ts | REST catalog GET/POST + updateTag on create |
app/api/mcp/v1/store/products/route.ts | MCP list/create + updateTag on create |
features/auth/user-role.ts | hasMemberPrivileges() — role-based product visibility |