chore: settle product naming across app, widget and deployments

One word everywhere: ReplyPier in UI copy, package and image names, the
replypier.site domains (app/api/docs/help), REPLYPIER_* settings and the
--rp-* design tokens.

- public widget API is window.ReplyPier with replypierId / replypierBaseUrl /
  replypierConfig / replypierToken, loader at webclient/replypier.min.js;
  both bundles rebuilt from source
- NOTICE, llms.txt, CONTRIBUTING, HELP_CENTER_INFRA and the demo runtime
  config rewritten; the demo config ships no third-party keys
- migration adds the ReplyPier managed model value to the AI model enum
- local compose project, database, role, volume and Docker network carry the
  same name
This commit is contained in:
WangShen007 committed 2026-10-26 00:57:22 +08:00
1 parent ff0a09f0e5
commit 20fef2b9f3
1156 files changed
+7267 -7148

No files matched your search

+11 -11
View File
@@ -1,11 +1,11 @@
// A pretend customer website with the ChatterMate widget embedded the way the
// A pretend customer website with the ReplyPier widget embedded the way the
// dashboard's install snippet does it. Everything about the embed comes from the
// query string:
//
// http://127.0.0.1:13000/?widget=<id>
// &config=<json> → window.chattermateConfig (launcher, position, trigger, …)
// &token=<jwt> → window.chattermateToken (token-authenticated widgets)
// &trigger=1 → adds a page button with data-chattermate-open
// &config=<json> → window.replypierConfig (launcher, position, trigger, …)
// &token=<jwt> → window.replypierToken (token-authenticated widgets)
// &trigger=1 → adds a page button with data-replypier-open
// &snippet=iframe → the dashboard's iframe snippet instead of the script
//
// It has to be a real server on 127.0.0.1: Chrome's Local Network Access check
@@ -23,7 +23,7 @@ function arg(name: string, fallback: string): string {
const port = Number(arg('port', '13000'))
const apiUrl = arg('api', 'http://127.0.0.1:18000/api/v1')
const loaderUrl = arg('loader', 'http://127.0.0.1:15173/webclient/chattermate.min.js')
const loaderUrl = arg('loader', 'http://127.0.0.1:15173/webclient/replypier.min.js')
interface Embed {
widgetId: string
@@ -36,7 +36,7 @@ interface Embed {
/** The dashboard's iframe snippet (AgentWidgetTab), classed so the page object finds it. */
function iframeSnippet(widgetId: string): string {
const src = `${apiUrl}/widgets/${encodeURIComponent(widgetId)}/data`
return `<iframe class="chattermate-iframe" src="${src}" width="100%" height="600" frameborder="0" title="AI Assistant" allow="clipboard-write"></iframe>`
return `<iframe class="replypier-iframe" src="${src}" width="100%" height="600" frameborder="0" title="AI Assistant" allow="clipboard-write"></iframe>`
}
function page(embed: Embed): string {
@@ -51,18 +51,18 @@ function page(embed: Embed): string {
</html>`
}
const globals = [
`window.chattermateId = ${JSON.stringify(embed.widgetId)};`,
`window.chattermateBaseUrl = ${JSON.stringify(apiUrl)};`,
`window.replypierId = ${JSON.stringify(embed.widgetId)};`,
`window.replypierBaseUrl = ${JSON.stringify(apiUrl)};`,
// config arrives as JSON text; parse it here so a malformed value fails the request, not the page.
embed.config ? `window.chattermateConfig = ${JSON.stringify(JSON.parse(embed.config))};` : '',
embed.token ? `window.chattermateToken = ${JSON.stringify(embed.token)};` : '',
embed.config ? `window.replypierConfig = ${JSON.stringify(JSON.parse(embed.config))};` : '',
embed.token ? `window.replypierToken = ${JSON.stringify(embed.token)};` : '',
].filter(Boolean).join('\n ')
return `<!doctype html>
<html lang="en">
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Acme Store</title></head>
<body>
<h1>Acme Store</h1>
${embed.trigger ? '<button type="button" data-chattermate-open>Chat with us</button>' : ''}
${embed.trigger ? '<button type="button" data-replypier-open>Chat with us</button>' : ''}
<script>
${globals}
</script>