replica-deploy
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesereplica-deploy
replica-deploy
Reads everything in . Writes (the checklist in
in this folder, filled in).
replica/replica/deploy.mdpreflight.md读取 下的所有内容,并将本文件夹中 里的检查清单填写后写入 。
replica/preflight.mdreplica/deploy.mdThe rules
规则
- Nothing goes live without the user's go. Show the preflight results and ask.
- The user buys and signs in. Claude never buys a domain, enters a card, types a password or pastes a live key. Claude writes the exact DNS records, env var names and commands; the user does the account steps.
- Not until it is rebranded. The sweep must be clean. No exceptions.
- 未经用户确认,不得上线任何内容。 展示预检结果并征求用户同意。
- 域名购买和登录操作由用户完成。 Claude 绝不购买域名、输入银行卡信息、键入密码或粘贴正式环境密钥。Claude 会写出准确的 DNS 记录、环境变量名称和命令;涉及账号的步骤由用户自行完成。
- 品牌重塑完成前不得上线。 扫描结果必须无任何残留,不设例外。
Step 1: preflight
第 1 步:预检
Run every check and paste the results into :
deploy.mdbash
npx playwright test # replica-test
python3 ../replica-diff/parity.py replica/features.csv # must-haves done
python3 ../replica-brand/sweep.py . --config replica/brand.json # exit 0: clean
python3 ../replica-launch/listing.py replica/launch/listing.json # if shipping to stores
npm run build # production build passes(Paths are relative to wherever the pack is installed. Under
that is and so
on.)
~/.claude/skills/~/.claude/skills/replica-diff/parity.pyPlus by hand: no open S1 or S2 bugs, privacy policy and terms pages live
(listing every processor), cookie banner if you use non-essential cookies in
the EU or UK, account deletion works, the favicon, titles and OG image are
yours.
Any failure stops the deploy. Say which and why.
运行每项检查,并将结果写入 :
deploy.mdbash
npx playwright test # replica-test
python3 ../replica-diff/parity.py replica/features.csv # must-haves done
python3 ../replica-brand/sweep.py . --config replica/brand.json # exit 0: clean
python3 ../replica-launch/listing.py replica/launch/listing.json # if shipping to stores
npm run build # production build passes(路径相对于技能包的安装位置。在 下,对应路径为 等。)
~/.claude/skills/~/.claude/skills/replica-diff/parity.py此外还需手动确认:没有尚未解决的 S1 或 S2 缺陷;隐私政策和服务条款页面已上线(列明所有数据处理方);如果在 EU 或 UK 使用非必要 Cookie,则已提供 Cookie 横幅;账户删除功能可用;favicon、页面标题和 OG 图片均使用你自己的品牌与内容。
任何检查失败都会阻止部署。明确说明失败的项目及原因。
Step 2: production services
第 2 步:生产环境服务
- A separate production project for the database (never the dev one), backups on, migrations run by the deploy, not by hand.
- Env vars set in the host for production, matching . Live keys only here.
.env.example - Stripe: switch to live mode, recreate products and prices, add the production webhook endpoint and its signing secret, test one real purchase and refund it.
- OAuth: add the production domain to every provider's redirect URIs and authorised origins. Google scopes that need verification must be approved, or only test users can sign in.
- Email: the sending domain verified with the provider.
- 为数据库创建单独的生产项目(绝不能使用开发项目),开启备份,并由部署流程运行 migrations,而不是手动执行。
- 在托管平台设置生产环境变量,并与 保持一致。正式环境密钥只能存放在这里。
.env.example - Stripe:切换到正式模式,重新创建产品和价格,添加生产环境的 webhook endpoint 及其 signing secret,然后测试一笔真实购买并为其退款。
- OAuth:将生产域名添加到所有提供商的 redirect URIs 和 authorised origins 中。需要验证的 Google scopes 必须先获得批准,否则只能由测试用户登录。
- 邮件:使用邮件服务商验证发件域名。
Step 3: host and domain
第 3 步:托管平台与域名
Default: Vercel for Next.js (Netlify, Cloudflare Pages, Fly or Render
otherwise). Connect the repo so deploys and pull requests get preview
URLs.
mainThe domain, after the user buys it at any registrar:
| record | name | value |
|---|---|---|
| A | @ | the host's apex IP (Vercel: shown in the domain settings) |
| CNAME | www | the host's target (Vercel: |
| TXT | @ or a subdomain | the host's verification value, if asked |
Email DNS from the email provider: SPF (TXT), DKIM (CNAME or TXT), and a
DMARC record starting at then
tightened to once reports are clean. Without these, your
confirmation emails go to spam.
v=DMARC1; p=none; rua=mailto:you@yourdomainquarantinePick one canonical host (apex or www) and redirect the other. HTTPS is
automatic on the hosts above; check it.
Next.js 默认使用 Vercel;其他项目使用 Netlify、Cloudflare Pages、Fly 或 Render。关联代码仓库,使 分支自动部署,并为 Pull Request 提供预览 URL。
main用户通过任意域名注册商购买域名后,配置以下记录:
| 记录类型 | 名称 | 值 |
|---|---|---|
| A | @ | 托管平台的顶级域名 IP(Vercel:在域名设置中显示) |
| CNAME | www | 托管平台的目标地址(Vercel: |
| TXT | @ 或子域名 | 托管平台的验证值(如有要求) |
还需配置邮件服务商提供的 Email DNS 记录:SPF(TXT)、DKIM(CNAME 或 TXT),以及 DMARC 记录。DMARC 初始配置为 ,待报告无问题后再收紧为 。缺少这些记录,确认邮件会进入垃圾邮件箱。
v=DMARC1; p=none; rua=mailto:you@yourdomainquarantine选择一个规范主机(顶级域名或 www),并将另一个重定向过去。上述托管平台会自动启用 HTTPS;需要进行确认。
Step 4: watch it
第 4 步:监控
Error tracking (Sentry or the host's), uptime checks on the home page and the
core flow's API, logs kept, analytics (a privacy-friendly one avoids the
cookie banner), and an alert to the user's email or phone. Then do the core
flow on the live site yourself, and ask the user to do it on their phone.
配置错误追踪(Sentry 或托管平台自带服务)、针对首页和核心流程 API 的可用性检查、日志保留,以及分析工具(采用隐私友好型方案可避免 Cookie 横幅)。同时设置向用户邮箱或手机发送告警。随后自行在正式网站上走一遍核心流程,并请用户在手机上完成一次。
Step 5: mobile, if there is an app
第 5 步:移动端(如有应用)
Expo: then to TestFlight and Play internal testing.
Native: archive in Xcode, upload to App Store Connect; Gradle bundle to Play
Console. The user owns the developer accounts ($99 a year for Apple, $25 once
for Google). Beta first, then review with the listing from replica-launch.
eas buildeas submitExpo:先运行 ,再运行 ,提交到 TestFlight 和 Play 内部测试。
eas buildeas submit原生版:在 Xcode 中归档并上传到 App Store Connect;通过 Gradle 生成 bundle 并上传到 Play Console。开发者账号归用户所有(Apple 每年 99 美元,Google 一次性 25 美元)。先发布 Beta 版本,再使用 replica-launch 生成的上架信息提交审核。
Output
输出
replica/deploy.md最终生成 ,记录每项检查及其结果、正式访问 URL、已设置的 DNS 记录,以及第一周需要重点关注的事项。此时,这个克隆版应用就正式以你的名义上线了。
replica/deploy.md