@fayz-ai/plugin-reputation

中文文档
0.10.55发布于 2026/11/11MITTypeScriptES Module近 30 天下载 6326

[experimental] Fayz SDK — reviews & reputation management plugin

原始使用文档
文档目录6 节
  1. What's inside
  2. On a storefront
  3. Install
  4. Usage
  5. Part of the Fayz SDK
  6. Roadmap & contributing

@fayz-ai/plugin-reputation

Status: experimental (incubating). Now carries most of the capability bar — a mock/Supabase provider pair, an entity registry, migrations with canonical RLS, seed data and tests. Still short of settings, and the Google/Facebook sync remains unbuilt. Fine to explore in dogfoods; its API may still change without notice.

Reviews and reputation, in one place — see the stars, reply, ask for more.

npm license

Reputation is the cheapest growth lever a local business has, and the easiest to ignore. Reviews sit scattered across Google and Facebook, replies never happen, and nobody ever asks the happy customer for a rating. plugin-reputation is the GoHighLevel-style reputation surface for the Fayz engine: a single home for your rating, your review feed, and the actions that move it.

It now does two jobs. The backoffice is a moderation queue: an average-rating card, a star distribution, and a review feed where each row can be published, refused or deleted — reading a real table, not a fixture. The storefront surface (./public) reads the approved rows and renders them: a star rating for a product page, the review list beneath it, and a homepage social-proof section fed by real reviews rather than hardcoded testimonials.

Two shapes of review share one table. A business review has no product and is what the Google/Facebook feed will fill; a product review points at a product and is what a shopper reads on a PDP. Only approved rows ever leave the building — the storefront reads column-whitelisted views, never the base table.

What's inside

  • A /reputation home: average-rating card, star-distribution bars, and a moderation queue (publish / refuse / delete)
  • Product reviews: per-product aggregate, per-product feed, and a "verified purchase" badge for reviews tied to an order
  • Storefront components — ProductRating, ProductReviews, TopReviews, Stars — in the lean ./public subpath
  • A migration with canonical tenant RLS plus two anon-readable views (v_public_product_reviews, v_public_product_ratings)
  • Google / Facebook review sources represented in the UI (sync itself still to come)
  • Configurable navigation (label, position, section) and vertical scoping

On a storefront

import { createReputationWebsite, ProductRating, ProductReviews, TopReviews } from '@fayz-ai/plugin-reputation/public'

// Anon storefronts have no session, so the tenant is explicit.
const reviews = createReputationWebsite({ tenantId: storeId })

// Wrap the app in reviews.Provider, then drop components into storefront slots:
<ProductRating productId={product.id} onClick={scrollToReviews} />   // productDetail/afterTitle
<ProductReviews productId={product.id} />                            // productDetail/afterDetail
<TopReviews limit={3} productHref={(r) => `/product/${r.productSlug}`} />

A catalogue grid should not fire one query per card — ask for every rating at once:

const ratings = await reviews.dataProvider.getProductRatings(products.map((p) => p.id))
<ProductRating average={ratings[p.id].average} count={ratings[p.id].count} />

Install

npm install @fayz-ai/plugin-reputation

Peer deps: @fayz-ai/core, @fayz-ai/ui, plus react / react-dom.

Usage

import { defineSaas } from '@fayz-ai/admin'
import { createReputationPlugin } from '@fayz-ai/plugin-reputation'

export const app = defineSaas({
  // ...
  plugins: [
    createReputationPlugin({ navLabel: 'Reputation', navPosition: 8 }),
  ],
})

Part of the Fayz SDK

The trust layer of the engine. Pairs with plugin-conversations (turn a great chat into a review request), plugin-crm (know exactly who to ask), and plugin-marketing (feed the social proof back into acquisition).

Roadmap & contributing

Early scaffold — built in the open. See the Fayz SDK roadmap for current gaps, missing features, and good first issues.

版本与发布记录

@fayz-ai/plugin-reputation 共发布 74 个版本,首次发布于 2026/06/20;过去 12 个月发布了 74 个版本。

版本发布日期距今
0.10.55latest2026/11/112 天前
0.10.542026/11/113 天前
0.10.532026/11/067 天前
0.10.522026/11/068 天前
0.10.512026/11/068 天前
0.10.502026/11/059 天前

其他发布通道:next → 0.9.0-next.1,canary → 0.10.47-canary.20261028153856。

关于 @fayz-ai/plugin-reputation 的常见问题

@fayz-ai/plugin-reputation 是什么?

[experimental] Fayz SDK — reviews & reputation management plugin

如何安装 @fayz-ai/plugin-reputation?

在项目目录运行 npm install @fayz-ai/plugin-reputation,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^18.0.0 || ^19.0.0)、react-dom(^18.0.0 || ^19.0.0)、lucide-react(>=0.400.0 <1.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@fayz-ai/plugin-reputation 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@fayz-ai/plugin-reputation 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@fayz-ai/plugin-reputation 可以商用吗?

@fayz-ai/plugin-reputation 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@fayz-ai/plugin-reputation 的下载量有多少?

根据 npm 官方下载统计,@fayz-ai/plugin-reputation 在 2026/10/15 – 2026/11/13 这 30 天内被下载 6,326 次,日均约 211 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@fayz-ai/plugin-reputation 还在维护吗?

最新版本 0.10.55 发布于 2026/11/11(2 天前);至今共发布 74 个版本,其中过去 12 个月发布了 74 个;首次发布于 2026/06/20。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。