create-revenuecat-project

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

RevenueCat Project Bootstrap

RevenueCat项目快速搭建

Guide through setting up a complete RevenueCat project from scratch.
引导您从零开始搭建完整的RevenueCat项目。

Instructions

操作说明

Important: Use the RevenueCat MCP server for all tool calls. The MCP server may have access to multiple projects. Always use
list-projects
first to retrieve all accessible projects. If multiple projects are returned, ask the user which project to use or if they want to create a new one.
重要提示: 所有工具调用请使用RevenueCat MCP服务器。MCP服务器可能有权访问多个项目。请始终先使用
list-projects
检索所有可访问的项目。如果返回多个项目,请询问用户要使用哪个项目,或者是否要创建一个新项目。

Phase 1: Discovery

阶段1:需求调研

Ask targeted questions to understand the developer's needs:
  1. Platforms — "Which platforms are you building for?" (iOS, Android, Web, or multiple)
  2. Business Model — "What type of monetization are you planning?" (subscriptions, one-time purchases, consumables, or a mix)
  3. Subscription Tiers (if applicable) — "What subscription options do you want to offer?" (common: Monthly + Annual, single tier, Freemium + Premium)
  4. App Details — Bundle ID (iOS, e.g.
    com.company.appname
    ), package name (Android), and display name
提出针对性问题,了解开发者的需求:
  1. 平台 — "您的应用面向哪些平台开发?"(iOS、Android、Web或多个平台)
  2. 盈利模式 — "您计划采用哪种变现方式?"(订阅制、一次性购买、消耗品或混合模式)
  3. 订阅层级(如适用)— "您想要提供哪些订阅选项?"(常见选项:月度+年度、单一层级、免费增值+高级版)
  4. 应用详情 — Bundle ID(iOS,例如
    com.company.appname
    )、包名(Android)以及显示名称

Phase 2: Create Resources

阶段2:创建资源

Execute in this order — dependencies matter.
  1. Verify/Create Project
    list-projects
    - list accessible projects If multiple: ask user which to use, or offer to create a new one To create a new project, use the
    create-project
    MCP tool Store project_id for all subsequent calls
  2. Create Apps (for each platform):
    • For mobile apps, ask if the user already has set up their app in App Store Connect / Google Play Console. If so, create an app using the
      create-app
      tool (type: app_store | play_store). If not, use the automatically generated
      test_store
      app and tell the user that they can set up the integration with App Store Connect / Google Play Console later.
    • For web apps,
      create-app
      with type rc_billing (rc_billing is RevenueCat's own web billing engine with payments powered by Stripe, but without paying extra for Stripe Billing / Stripe Checkout)
  3. Create Products (for each subscription/purchase):
    create-product
    tool
  4. Create Entitlements (for each feature/access level):
    create-entitlement
    tool
  5. Attach Products to Entitlements:
    attach-products-to-entitlement
    tool
  6. Create Default Offering:
    create-offering
    tool (lookup_key: "default")
  7. Create Packages in Offering:
    create-package
    tool (for subscriptions, use $rc_monthly, $rc_annual, etc.)
  8. Attach Products to Packages:
    attach-products-to-package
    tool
  9. Get API Keys:
    list-app-public-api-keys
    tool. Note that these API keys are public and safe to embed in app code.
请按以下顺序执行——存在依赖关系。
  1. 验证/创建项目
    list-projects
    - 列出可访问的项目 如果有多个项目:询问用户要使用哪个,或者提供创建新项目的选项 要创建新项目,请使用
    create-project
    MCP工具 保存project_id,用于后续所有调用
  2. 创建应用(针对每个平台):
    • 对于移动应用,询问用户是否已在App Store Connect / Google Play Console中设置好应用。如果已设置,使用
      create-app
      工具创建应用(类型:app_store | play_store)。如果未设置,使用自动生成的
      test_store
      应用,并告知用户之后可以完成与App Store Connect / Google Play Console的集成。
    • 对于Web应用,使用
      create-app
      工具创建类型为rc_billing的应用(rc_billing是RevenueCat自带的Web计费引擎,由Stripe提供支付支持,但无需额外支付Stripe Billing / Stripe Checkout的费用)
  3. 创建产品(针对每个订阅/购买项):使用
    create-product
    工具
  4. 创建权益(针对每个功能/访问级别):使用
    create-entitlement
    工具
  5. 将产品关联到权益:使用
    attach-products-to-entitlement
    工具
  6. 创建默认产品组:使用
    create-offering
    工具(lookup_key: "default")
  7. 在产品组中创建套餐:使用
    create-package
    工具(对于订阅,使用$rc_monthly、$rc_annual等)
  8. 将产品关联到套餐:使用
    attach-products-to-package
    工具
  9. 获取API密钥:使用
    list-app-public-api-keys
    工具。请注意,这些API密钥是公开的,可以安全地嵌入到应用代码中。

Phase 3: Summary & Next Steps

阶段3:总结与后续步骤

Provide a complete setup summary:
Project Setup Complete!
=======================

Project: {project_name} ({project_id})

Apps Created:
  iOS: {app_name} - API Key: appl_xxxxx
  Android: {app_name} - API Key: goog_xxxxx

Products:
  - monthly_premium (subscription, P1M)
  - annual_premium (subscription, P1Y)

Entitlements:
  - premium → monthly_premium, annual_premium

Offering: default (current)
  └── $rc_monthly → monthly_premium
  └── $rc_annual → annual_premium

Next Steps:
1. Configure store credentials in RevenueCat dashboard
2. Create products in App Store Connect / Play Console
3. Add SDK to your app (see /rc:create-app)
4. Implement paywall UI using the "default" offering
提供完整的搭建总结:
项目搭建完成!
=======================

项目:{project_name} ({project_id})

已创建的应用:
  iOS:{app_name} - API密钥:appl_xxxxx
  Android:{app_name} - API密钥:goog_xxxxx

产品:
  - monthly_premium(订阅,P1M)
  - annual_premium(订阅,P1Y)

权益:
  - premium → monthly_premium, annual_premium

产品组:default(当前)
  └── $rc_monthly → monthly_premium
  └── $rc_annual → annual_premium

后续步骤:
1. 在RevenueCat控制台中配置商店凭证
2. 在App Store Connect / Play Console中创建产品
3. 为您的应用添加SDK(请查看/rc:create-app)
4. 使用“default”产品组实现付费墙UI

Error Handling

错误处理

If any step fails:
  1. Report the specific error clearly
  2. Suggest fixes (e.g., "Bundle ID may already be in use")
  3. Offer to retry or skip that step
  4. Continue with remaining steps if possible
如果任何步骤失败:
  1. 清晰报告具体错误
  2. 建议修复方案(例如:"Bundle ID可能已被使用")
  3. 提供重试或跳过该步骤的选项
  4. 如果可能,继续执行剩余步骤