Skip to content

Let's use AI to Earn!

docs: 全面重构文档结构,中文为默认 README

yika699d750604b8
diff --git a/DOCKER_DEPLOYMENT_CN.md b/DOCKER_DEPLOYMENT_CN.md
index 786cfe4b..1b405833 100644
--- a/DOCKER_DEPLOYMENT_CN.md
+++ b/DOCKER_DEPLOYMENT_CN.md
@@ -49,48 +49,41 @@ docker --version
docker compose version
```
-## 快速开始
+---
-### 1. 克隆仓库
+## 🚀 3 分钟快速启动
-```bash
-git clone https://github.com/yikart/AiToEarn.git
-cd AiToEarn
-```
+只需 3 步,即可在本地跑起完整的 AiToEarn。
-### 2. 启动服务
+### 第 1 步:克隆并启动
```bash
+git clone https://github.com/yikart/AiToEarn.git
+cd AiToEarn
docker compose up -d
```
-首次启动会拉取镜像,可能需要几分钟。
+首次启动会拉取镜像,可能需要几分钟。运行 `docker compose ps` 确认所有服务为 `healthy` 或 `running`。
-### 3. 检查状态
+### 第 2 步:打开应用
-```bash
-docker compose ps
-```
+启动成功后,打开浏览器访问:**[http://localhost:8080](http://localhost:8080)**
-所有服务应显示 `healthy` 或 `running` 状态。
+> 首次启动会自动创建管理员账号并自动登录,无需手动注册。
-### 4. 访问应用
-
-| 地址 | 说明 |
-|------|------|
-| http://localhost:8080 | Web 前端(通过 Nginx) |
-| http://localhost:8080/api/ | 后端 API(通过 Nginx) |
-| http://localhost:8080/_nhealth | Nginx 健康检查 |
-| http://localhost:9001 | RustFS 对象存储控制台 |
+### 第 3 步:配置 Relay 中继(强烈推荐)
-### 5. 配置 Relay(推荐)
-
-Relay 允许自部署实例通过官方 AiToEarn 中继服务器连接社交媒体平台账号,无需自行配置各平台的 OAuth 凭据。
+> **为什么要配 Relay?**
+>
+> AiToEarn 需要登录你的社交媒体账号(抖音、小红书、TikTok 等)才能发布内容。这些平台要求 OAuth 开发者凭据才能授权登录。
+>
+> - **不配 Relay**:你需要自己去十几个平台逐一申请开发者账号,获取 client_id/secret,非常麻烦。
+> - **配了 Relay**:借用官方 aitoearn.ai 的凭据完成授权,**一个 API Key 搞定所有平台**。
-**配置步骤:**
+**配置方法**:
-1. 在 [https://aitoearn.ai](https://aitoearn.ai) 的 **设置 → API Key** 中创建一个 API Key。
-2. 在 `docker-compose.yml` 的 `aitoearn-server` 服务中配置:
+1. 在 [aitoearn.ai](https://aitoearn.ai)(国际)或 [aitoearn.cn](https://aitoearn.cn)(中国)注册登录,进入 **设置 → API Key**,创建一个 API Key
+2. 编辑 `docker-compose.yml`,在 `aitoearn-server` 服务的 `environment` 中添加:
```yaml
RELAY_SERVER_URL: https://aitoearn.ai/api
@@ -98,30 +91,38 @@ RELAY_API_KEY: 你的API-Key
RELAY_CALLBACK_URL: http://127.0.0.1:8080/api/plat/relay-callback
```
-3. 重启服务:`docker compose restart aitoearn-server`
+3. 重启服务:
-### 6. 配置 AI 服务
+```bash
+docker compose restart aitoearn-server
+```
+
+**到这里,你已经可以正常使用 AiToEarn 了!** 🎉
+
+以下是进阶配置,只在需要时参考。
+
+---
-**推荐:使用 new-api / one-api 等中继服务**统一管理所有 AI 模型。
+## 进阶配置
-- [new-api](https://github.com/Calcium-Ion/new-api) - 多模型 API 中继
-- [one-api](https://github.com/songquanpeng/one-api) - OpenAI API 管理分发
+### AI 服务配置
+
+默认的 AI 密钥是占位值(`sk-placeholder`),应用可以正常启动,但 AI 功能(如 AI 文案、AI 评论等)会返回错误。
-在 `docker-compose.yml` 中配置:
+**推荐使用 [new-api](https://github.com/Calcium-Ion/new-api) 或 [one-api](https://github.com/songquanpeng/one-api) 等中继服务**,一个地址统一管理 OpenAI、Claude、Gemini 等所有模型。
+
+在 `docker-compose.yml` 中配置(`aitoearn-ai` 和 `aitoearn-server` 两个服务都需要):
```yaml
-# 同时在 aitoearn-ai 和 aitoearn-server 两个服务中设置
OPENAI_BASE_URL: https://your-new-api-host/v1
OPENAI_API_KEY: sk-your-new-api-key
```
-> 默认的 `sk-placeholder` 值允许应用正常启动,但 AI 功能将返回错误,直到配置真实的密钥。
-
-### 7. 配置环境变量(生产环境)
+### 生产环境安全配置
-所有环境变量直接在 `docker-compose.yml` 文件中配置。**所有配置项都已提供默认值,无需修改即可直接启动应用。**
+默认密码均为 `password`,**生产环境务必修改**。
-生产环境部署时,建议修改以下安全相关配置:
+> 💡 可使用 `openssl rand -hex 32` 生成随机字符串。
```yaml
# 1. mongodb 服务 — 修改数据库密码
@@ -130,165 +131,78 @@ MONGO_INITDB_ROOT_PASSWORD: your-secure-password
# 2. redis 服务 — 修改 Redis 密码
command: redis-server --requirepass your-secure-password
-# 3. aitoearn-ai 服务 — 修改以下变量
-MONGODB_PASSWORD: your-secure-password # 与上面 MongoDB 密码一致
-REDIS_PASSWORD: your-secure-password # 与上面 Redis 密码一致
+# 3. aitoearn-ai 服务
+MONGODB_PASSWORD: your-secure-password # 与 MongoDB 密码一致
+REDIS_PASSWORD: your-secure-password # 与 Redis 密码一致
JWT_SECRET: your-random-jwt-secret
INTERNAL_TOKEN: your-random-internal-token
-# 4. aitoearn-server 服务 — 修改以下变量(须与 aitoearn-ai 保持一致)
+# 4. aitoearn-server 服务(须与 aitoearn-ai 保持一致)
MONGODB_PASSWORD: your-secure-password
REDIS_PASSWORD: your-secure-password
JWT_SECRET: your-random-jwt-secret # 须与 aitoearn-ai 一致
INTERNAL_TOKEN: your-random-internal-token # 须与 aitoearn-ai 一致
-APP_DOMAIN: your-domain.com # 生产环境改为你的域名
+APP_DOMAIN: your-domain.com # 改为你的公网域名
```
-> **注意**: 修改密码时,必须同步更新所有引用该密码的服务。例如 MongoDB 密码出现在 `mongodb`、`aitoearn-ai`、`aitoearn-server` 三个服务中。
->
-> 可以使用 `openssl rand -hex 32` 生成随机字符串。
-
-### 8. 配置应用配置文件
-
-配置文件位于各应用的 `config/` 子目录中,以只读卷挂载到容器中:
+> ⚠️ MongoDB 密码出现在 `mongodb`、`aitoearn-ai`、`aitoearn-server` 三个服务中,修改时必须同步更新。
-| 文件 | 挂载到 | 说明 |
-|------|--------|------|
-| `project/aitoearn-backend/apps/aitoearn-ai/config/config.js` | aitoearn-ai:/app/config.js | AI 服务配置(AI 模型定义、存储配置) |
-| `project/aitoearn-backend/apps/aitoearn-server/config/config.js` | aitoearn-server:/app/config.js | 后端配置(OAuth 回调、邮件、存储配置) |
-
-这些配置文件从 `process.env`(由 docker-compose.yml 设置)读取环境变量,同时包含一些硬编码配置(存储端点、AI 模型列表等)。
-
-**如需修改 RustFS 凭证或切换到外部 S3/OSS**,需同时更新两个 config.js 文件中的 `assets` 配置部分,或通过 `ASSETS_CONFIG` 环境变量覆盖(见下文)。
-
-## 环境变量详细说明
-
-以下变量均在 `docker-compose.yml` 各服务的 `environment` 部分配置。
-
-### 核心配置
+### 第三方平台 OAuth 配置(可选)
-以下变量均已提供可用的默认值,应用可直接启动。生产环境建议修改密码和密钥。
+> 如果你已经配置了 Relay,以下内容**可以跳过**。只有不使用 Relay、需要直接对接各平台 OAuth 的用户才需要配置。
-| 变量 | 所属服务 | 说明 | 默认值 |
-|------|----------|------|--------|
-| `MONGO_INITDB_ROOT_PASSWORD` | mongodb | MongoDB root 密码 | `password` |
-| `MONGODB_PASSWORD` | aitoearn-ai, aitoearn-server | MongoDB 连接密码(须与上面一致) | `password` |
-| `REDIS_PASSWORD` | aitoearn-ai, aitoearn-server | Redis 密码(须与 redis 服务 `--requirepass` 一致) | `password` |
-| `JWT_SECRET` | aitoearn-ai, aitoearn-server | JWT 签名密钥 | `change-this-jwt-secret` |
-| `INTERNAL_TOKEN` | aitoearn-ai, aitoearn-server | 内部服务通信 token | `change-this-secret-token` |
-| `APP_DOMAIN` | aitoearn-server | 应用域名(用于 OAuth 回调地址) | `localhost` |
-| `ASSETS_CONFIG` | aitoearn-ai, aitoearn-server | 资源存储配置(JSON 格式,见上文) | 内置 RustFS 配置 |
+在 `docker-compose.yml` 的 `aitoearn-server` 服务中按需配置:
-### 内部服务通信
+| 平台 | 变量 | 开发者后台 |
+|------|------|-----------|
+| Bilibili | `BILIBILI_CLIENT_ID/SECRET` | https://open.bilibili.com |
+| Google | `GOOGLE_CLIENT_ID/SECRET` | https://console.cloud.google.com/apis/credentials |
+| 快手 | `KWAI_CLIENT_ID/SECRET` | https://open.kuaishou.com |
+| Pinterest | `PINTEREST_CLIENT_ID/SECRET` | https://developers.pinterest.com |
+| TikTok | `TIKTOK_CLIENT_ID/SECRET` | https://developers.tiktok.com |
+| Twitter/X | `TWITTER_CLIENT_ID/SECRET` | https://developer.x.com/en/portal |
+| Facebook | `FACEBOOK_CLIENT_ID/SECRET`, `FACEBOOK_CONFIG_ID` | https://developers.facebook.com |
+| Threads | `THREADS_CLIENT_ID/SECRET` | https://developers.facebook.com |
+| Instagram | `INSTAGRAM_CLIENT_ID/SECRET` | https://developers.facebook.com |
+| LinkedIn | `LINKEDIN_CLIENT_ID/SECRET` | https://www.linkedin.com/developers |
+| YouTube | `YOUTUBE_CLIENT_ID/SECRET` | https://console.cloud.google.com/apis/credentials |
+| 微信公众平台 | `WXPLAT_APP_ID/SECRET`, `WXPLAT_ENCODING_AES_KEY` | https://mp.weixin.qq.com |
+| 抖音 | `DOYIN_CLIENT_ID/SECRET` | https://open.douyin.com |
-以下变量用于服务间通信,使用 Docker 内部网络,通常无需修改。
+OAuth 回调地址格式:`https://{APP_DOMAIN}/api/plat/{platform}/auth/back`
-| 变量 | 所属服务 | 说明 | 默认值 |
-|------|----------|------|--------|
-| `SERVER_URL` | aitoearn-ai | AI 服务访问后端的地址 | `http://aitoearn-server:3002` |
-| `AI_URL` | aitoearn-server | 后端访问 AI 服务的地址 | `http://aitoearn-ai:3010` |
+> 确保 `APP_DOMAIN` 已正确配置为你的公网域名。
-### 资源存储配置(RustFS)
+### 对象存储配置(RustFS)
Docker Compose 内置了 [RustFS](https://github.com/rustfs/rustfs) 作为 S3 兼容对象存储,**开箱即用,无需额外配置**。
-启动后会自动创建 `aitoearn` 存储桶,应用服务通过内部网络 `http://rustfs.local:9000` 访问。
-
**RustFS 管理控制台**:http://localhost:9001
- 默认账号:`rustfsadmin`
- 默认密码:`rustfsadmin`
-如需修改 RustFS 凭证,需要同时更新以下位置:
+<details>
+<summary>如需修改 RustFS 凭证或切换到外部 S3/OSS</summary>
+
+修改凭证需同时更新以下位置:
1. `docker-compose.yml` 中 `rustfs` 服务的 `RUSTFS_ACCESS_KEY` 和 `RUSTFS_SECRET_KEY`
-2. `docker-compose.yml` 中 `rustfs-init` 服务的 `entrypoint` 命令(`mc alias set` 中的凭证)
-3. `docker-compose.yml` 中 `aitoearn-ai` 和 `aitoearn-server` 服务的 `ASSETS_CONFIG` 环境变量
+2. `docker-compose.yml` 中 `rustfs-init` 服务的 `entrypoint` 命令
+3. `docker-compose.yml` 中 `aitoearn-ai` 和 `aitoearn-server` 服务的 `ASSETS_CONFIG`
-**`ASSETS_CONFIG` 环境变量**(JSON 格式)用于配置资源存储,在 `aitoearn-ai` 和 `aitoearn-server` 两个服务中都需要设置:
+`ASSETS_CONFIG` 格式(JSON),两个服务都需要设置:
```yaml
ASSETS_CONFIG: '{"provider":"s3","region":"us-east-1","bucketName":"aitoearn","endpoint":"http://rustfs.local:9000","publicEndpoint":"http://127.0.0.1:9000","cdnEndpoint":"http://127.0.0.1:8080/oss","accessKeyId":"rustfsadmin","secretAccessKey":"rustfsadmin","forcePathStyle":true}'
```
-**生产环境**如使用 AWS S3 或阿里云 OSS,更新 `ASSETS_CONFIG` 或两个 config.js 文件中的 `assets` 配置:
+使用 AWS S3 示例:
```yaml
-# docker-compose.yml 中(AWS S3 示例)
ASSETS_CONFIG: '{"provider":"s3","region":"ap-southeast-1","bucketName":"your-bucket","endpoint":"https://s3.ap-southeast-1.amazonaws.com","accessKeyId":"xxx","secretAccessKey":"xxx","cdnEndpoint":"https://your-cdn.com"}'
```
-### AI 服务配置
-
-**推荐使用 new-api / one-api 等中转服务**统一管理所有 AI 模型。通过中转服务,只需一个 API 地址和密钥就可以访问 OpenAI、Claude、Gemini 等多种模型。
-
-常用中转服务:
-- [new-api](https://github.com/Calcium-Ion/new-api) - 支持多种模型的 API 中转
-- [one-api](https://github.com/songquanpeng/one-api) - OpenAI 接口管理和分发系统
-
-部署中转服务后,在 `docker-compose.yml` 中配置:
-
-```yaml
-# aitoearn-ai 和 aitoearn-server 服务中
-OPENAI_BASE_URL: https://your-new-api-host/v1
-OPENAI_API_KEY: sk-your-new-api-key
-```
-
-> 默认提供 `sk-placeholder` 占位值,应用可以正常启动,但 AI 功能在实际调用时会返回错误。
-
-所有支持的 AI 服务(均在 `aitoearn-ai` 服务中配置):
-
-| 变量 | 服务 | 说明 |
-|------|------|------|
-| `OPENAI_API_KEY` | OpenAI / 中转服务 | API 密钥(aitoearn-ai 和 aitoearn-server 都需要) |
-| `OPENAI_BASE_URL` | API 地址 | 中转服务地址或 `https://api.openai.com/v1`(两个服务都需要) |
-| `ANTHROPIC_API_KEY` | Anthropic (Claude) | 可通过中转服务访问 |
-| `ANTHROPIC_BASE_URL` | Anthropic API 地址 | 默认 `https://api.anthropic.com` |
-| `VOLCENGINE_API_KEY` | 火山引擎(豆包) | https://console.volcengine.com/ark |
-| `VOLCENGINE_ACCESS_KEY_ID` | 火山引擎 | Access Key ID |
-| `VOLCENGINE_SECRET_ACCESS_KEY` | 火山引擎 | Secret Access Key |
-| `VOLCENGINE_VOD_SPACE_NAME` | 火山引擎 | VOD 空间名称 |
-| `GROK_API_KEY` | xAI (Grok) | https://console.x.ai |
-| `AICSO_API_KEY` | AICSO | AICSO 服务 API 密钥 |
-| `AICSO_BASE_URL` | AICSO | AICSO 服务地址 |
-| `GEMINI_KEY_PAIRS` | Google Gemini | JSON 数组格式 |
-| `GEMINI_LOCATION` | Google Gemini | 默认 `us-central1` |
-| `AI_PROXY_URL` | AI 代理 | 可选,用于代理访问 AI API |
-
-`GEMINI_KEY_PAIRS` 格式为 JSON 数组,默认为 `'[]'`(空数组):
-
-```yaml
-# 默认值(不使用 Gemini)
-GEMINI_KEY_PAIRS: '[]'
-
-# 配置 Gemini 示例
-GEMINI_KEY_PAIRS: '[{"projectId":"your-gcp-project-id","apiKey":"your-gemini-api-key","bucket":"your-bucket"}]'
-```
-
-AI 模型的具体定义(可用模型列表、定价等)在 `project/aitoearn-backend/apps/aitoearn-ai/config/config.js` 中配置。
-
-### 第三方平台 OAuth 配置(可选)
-
-按需在 `docker-compose.yml` 的 `aitoearn-server` 服务中配置社交媒体平台的 OAuth 凭证。
-
-| 平台 | 变量 | 开发者后台 |
-|------|------|-----------|
-| Bilibili | `BILIBILI_CLIENT_ID/SECRET` | https://open.bilibili.com |
-| Google | `GOOGLE_CLIENT_ID/SECRET` | https://console.cloud.google.com/apis/credentials |
-| 快手 | `KWAI_CLIENT_ID/SECRET` | https://open.kuaishou.com |
-| Pinterest | `PINTEREST_CLIENT_ID/SECRET` | https://developers.pinterest.com |
-| TikTok | `TIKTOK_CLIENT_ID/SECRET` | https://developers.tiktok.com |
-| Twitter/X | `TWITTER_CLIENT_ID/SECRET` | https://developer.x.com/en/portal |
-| Facebook | `FACEBOOK_CLIENT_ID/SECRET`, `FACEBOOK_CONFIG_ID` | https://developers.facebook.com |
-| Threads | `THREADS_CLIENT_ID/SECRET` | https://developers.facebook.com |
-| Instagram | `INSTAGRAM_CLIENT_ID/SECRET` | https://developers.facebook.com |
-| LinkedIn | `LINKEDIN_CLIENT_ID/SECRET` | https://www.linkedin.com/developers |
-| YouTube | `YOUTUBE_CLIENT_ID/SECRET` | https://console.cloud.google.com/apis/credentials |
-| 微信公众平台 | `WXPLAT_APP_ID/SECRET`, `WXPLAT_ENCODING_AES_KEY` | https://mp.weixin.qq.com |
-| 抖音 | `DOYIN_CLIENT_ID/SECRET` | https://open.douyin.com |
-
-**OAuth 回调地址格式**:`https://{APP_DOMAIN}/api/plat/{platform}/auth/back`
-
-> 确保 `APP_DOMAIN` 已正确配置为你的公网域名,否则 OAuth 回调将无法正常工作。
+</details>
### 其他可选服务
@@ -297,125 +211,98 @@ AI 模型的具体定义(可用模型列表、定价等)在 `project/aitoear
| `MAIL_USER` / `MAIL_PASS` | aitoearn-server | 邮件服务(AWS SES SMTP) | AWS Console → SES → SMTP |
| `ALI_SMS_ACCESS_KEY_ID` 等 4 项 | aitoearn-server | 阿里云短信 | https://dysms.console.aliyun.com |
-### 自动登录
-
-自动登录默认已启用。首次启动时,`aitoearn-init` 服务会生成管理员 token 并保存到共享卷中。`aitoearn-web` 服务会自动读取该 token,无需手动登录。
-
-### 镜像拉取策略
-
-Docker Compose 中所有应用服务镜像使用 `pull_policy: always`,确保每次 `docker compose up` 都拉取最新镜像:
-
-```yaml
-services:
- aitoearn-web:
- image: aitoearn/aitoearn-web:latest
- pull_policy: always
- aitoearn-server:
- image: aitoearn/aitoearn-server:latest
- pull_policy: always
- aitoearn-ai:
- image: aitoearn/aitoearn-ai:latest
- pull_policy: always
-```
+---
-## 配置文件参考
+## 运维参考
-以下是各应用配置文件的完整说明。这些文件以只读卷挂载到容器中,修改后需重启对应服务。
+### 自动登录
-### project/aitoearn-backend/apps/aitoearn-ai/config/config.js
+自动登录默认已启用。首次启动时,`aitoearn-init` 服务会生成管理员 token 并保存到共享卷中,`aitoearn-web` 服务自动读取该 token 完成登录。
-AI 服务的完整配置文件,挂载到 `aitoearn-ai:/app/config.js`。
+### 镜像拉取策略
-#### 基础配置
+所有应用服务镜像使用 `pull_policy: always`,确保每次 `docker compose up` 都拉取最新镜像。
-| 配置项 | 说明 | 默认值 |
-|--------|------|--------|
-| `port` | 服务监听端口 | `3010` |
-| `logger.console.enable` | 是否启用控制台日志 | `true` |
-| `logger.console.level` | 日志级别 | `debug` |
-| `logger.console.pretty` | 是否格式化日志输出 | `false` |
+### 内部服务通信
-#### 数据库与缓存
+以下变量用于服务间通信,使用 Docker 内部网络,通常无需修改:
-从环境变量读取,通常无需在配置文件中修改。
+| 变量 | 所属服务 | 默认值 |
+|------|----------|--------|
+| `SERVER_URL` | aitoearn-ai | `http://aitoearn-server:3002` |
+| `AI_URL` | aitoearn-server | `http://aitoearn-ai:3010` |
-| 配置项 | 说明 | 来源 |
-|--------|------|------|
-| `redis` | Redis 连接配置(host/port/password) | 环境变量 `REDIS_HOST/PORT/PASSWORD` |
-| `redlock` | 分布式锁 Redis 配置 | 同 redis |
-| `mongodb.uri` | MongoDB 连接 URI | 环境变量拼接 |
-| `mongodb.dbName` | 数据库名称 | `aitoearn` |
+### 配置文件
-#### 认证配置
+配置文件以只读卷挂载到容器中,修改后需重启对应服务:
-| 配置项 | 说明 | 来源 |
-|--------|------|------|
-| `auth.secret` | JWT 签名密钥 | 环境变量 `JWT_SECRET` |
-| `auth.expiresIn` | JWT 过期时间(秒) | `604800`(7 天) |
-| `auth.internalToken` | 内部服务通信 token | 环境变量 `INTERNAL_TOKEN` |
+| 文件 | 挂载到 | 说明 |
+|------|--------|------|
+| `project/aitoearn-backend/apps/aitoearn-ai/config/config.js` | aitoearn-ai:/app/config.js | AI 服务配置 |
+| `project/aitoearn-backend/apps/aitoearn-server/config/config.js` | aitoearn-server:/app/config.js | 后端配置 |
-#### 服务间通信
+---
-| 配置项 | 说明 | 来源 |
-|--------|------|------|
-| `serverClient.baseUrl` | 访问后端服务的地址 | 环境变量 `SERVER_URL` |
-| `serverClient.token` | 服务通信 token | 环境变量 `INTERNAL_TOKEN` |
+## 环境变量速查表
-#### 资源存储(assets)
+所有变量均在 `docker-compose.yml` 各服务的 `environment` 部分配置。
-**需要手动修改**。默认配置指向内置 RustFS:
+### 核心配置
-| 配置项 | 说明 | 默认值 |
-|--------|------|--------|
-| `assets.provider` | 存储提供商 | `s3` |
-| `assets.region` | 存储区域 | `us-east-1` |
-| `assets.bucketName` | 存储桶名称 | `aitoearn` |
-| `assets.endpoint` | 存储端点 | `http://rustfs.local:9000` |
-| `assets.accessKeyId` | 访问密钥 ID | `rustfsadmin` |
-| `assets.secretAccessKey` | 访问密钥 | `rustfsadmin` |
-| `assets.cdnEndpoint` | CDN 地址(可选) | 无 |
+| 变量 | 所属服务 | 说明 | 默认值 |
+|------|----------|------|--------|
+| `MONGO_INITDB_ROOT_PASSWORD` | mongodb | MongoDB root 密码 | `password` |
+| `MONGODB_PASSWORD` | aitoearn-ai, aitoearn-server | MongoDB 连接密码 | `password` |
+| `REDIS_PASSWORD` | aitoearn-ai, aitoearn-server | Redis 密码 | `password` |
+| `JWT_SECRET` | aitoearn-ai, aitoearn-server | JWT 签名密钥 | `change-this-jwt-secret` |
+| `INTERNAL_TOKEN` | aitoearn-ai, aitoearn-server | 内部服务通信 token | `change-this-secret-token` |
+| `APP_DOMAIN` | aitoearn-server | 应用域名 | `localhost` |
+| `ASSETS_CONFIG` | aitoearn-ai, aitoearn-server | 资源存储配置(JSON) | 内置 RustFS 配置 |
-#### AI 服务提供商
+### Relay 中继
-各 AI 服务的连接配置,从环境变量读取:
+| 变量 | 所属服务 | 说明 |
+|------|----------|------|
+| `RELAY_SERVER_URL` | aitoearn-server | 中继服务器地址(`https://aitoearn.ai/api`) |
+| `RELAY_API_KEY` | aitoearn-server | 你的 API Key |
+| `RELAY_CALLBACK_URL` | aitoearn-server | OAuth 回调地址(`http://127.0.0.1:8080/api/plat/relay-callback`) |
-| 配置项 | 说明 |
-|--------|------|
-| `ai.openai` | OpenAI 配置(baseUrl、apiKey),支持 `AI_PROXY_URL` 代理 |
-| `ai.anthropic` | Anthropic Claude 配置(baseUrl、apiKey),支持代理 |
-| `ai.grok` | xAI Grok 配置(baseUrl 固定为 `https://api.x.ai`,apiKey),支持代理 |
-| `ai.volcengine` | 火山引擎配置(baseUrl、apiKey、accessKeyId、secretAccessKey、spaceName) |
-| `ai.gemini` | Google Gemini 配置(keyPairs、location、apiKey),支持代理 |
-| `ai.aicso` | AICSO 配置(apiKey、baseUrl) |
+### AI 服务
-#### 视频 AI 功能定价(ai.aideo)
+| 变量 | 说明 |
+|------|------|
+| `OPENAI_API_KEY` | OpenAI / 中转服务 API 密钥(两个服务都需要) |
+| `OPENAI_BASE_URL` | API 地址(两个服务都需要) |
+| `ANTHROPIC_API_KEY` | Anthropic Claude |
+| `ANTHROPIC_BASE_URL` | Anthropic API 地址 |
+| `VOLCENGINE_API_KEY` | 火山引擎(豆包) |
+| `VOLCENGINE_ACCESS_KEY_ID` | 火山引擎 Access Key |
+| `VOLCENGINE_SECRET_ACCESS_KEY` | 火山引擎 Secret Key |
+| `VOLCENGINE_VOD_SPACE_NAME` | 火山引擎 VOD 空间 |
+| `GROK_API_KEY` | xAI (Grok) |
+| `AICSO_API_KEY` | AICSO 服务 |
+| `AICSO_BASE_URL` | AICSO 地址 |
+| `GEMINI_KEY_PAIRS` | Google Gemini(JSON 数组) |
+| `GEMINI_LOCATION` | Gemini 区域(默认 `us-central1`) |
+| `AI_PROXY_URL` | AI 代理地址(可选) |
+
+`GEMINI_KEY_PAIRS` 格式:
-各视频 AI 功能的定价配置(单位:分/分钟),默认均为 `0`(免费):
+```yaml
+# 不使用 Gemini(默认)
+GEMINI_KEY_PAIRS: '[]'
-| 配置项 | 说明 |
-|--------|------|
-| `ai.aideo.vCreative.basePrice` | AI 视频编辑(720P) |
-| `ai.aideo.vision.basePrice` | 视频理解 |
-| `ai.aideo.highlight.basePrice` | 高光智能剪辑 |
-| `ai.aideo.aiTranslation.facialTranslation` | 面部翻译 |
-| `ai.aideo.erase.basePrice` | AI 字幕去除 |
-| `ai.aideo.videoEdit.basePrice` | 视频编辑(720P) |
-| `ai.aideo.dramaRecap.basePrice` | 剧情回顾 |
-| `ai.aideo.styleTransfer.basePrice` | 视频风格迁移 |
+# 使用 Gemini
+GEMINI_KEY_PAIRS: '[{"projectId":"your-project","apiKey":"your-key","bucket":"your-bucket"}]'
+```
-#### AI 对话模型(ai.models.chat)
+---
-定义可用的 AI 对话模型列表。每个模型包含:
+## AI 模型配置参考
-| 字段 | 说明 |
-|------|------|
-| `name` | 模型 ID(API 调用时使用) |
-| `description` | 模型显示名称 |
-| `inputModalities` | 输入类型(`text`、`image`、`audio`、`video`) |
-| `outputModalities` | 输出类型(`text`、`image`) |
-| `pricing.tiers` | 分层定价(按 input/output token 计费) |
+AI 模型定义在 `project/aitoearn-backend/apps/aitoearn-ai/config/config.js` 中配置。
-默认配置的对话模型:
+### 对话模型(ai.models.chat)
| 模型 ID | 显示名称 | 输入 | 输出 |
|---------|----------|------|------|
@@ -430,278 +317,26 @@ AI 服务的完整配置文件,挂载到 `aitoearn-ai:/app/config.js`。
| `claude-sonnet-4-5-20250929` | Claude Sonnet 4.5 | text/image | text |
| `gemini-2.5-flash` | Gemini 2.5 Flash | text/image/audio/video | text |
-#### AI 图片模型(ai.models.image)
-
-**图片生成(generation)和图片编辑(edit)**模型:
+### 图片模型(ai.models.image)
| 模型 ID | 支持尺寸 | 质量选项 | 编辑最大输入图片数 |
|---------|----------|----------|-------------------|
| `gpt-image-1.5` | 1024x1024, 1536x1024, 1024x1536, auto | high, medium, low | 16(仅编辑模式) |
-#### AI 视频模型(ai.models.video.generation)
+### 视频模型(ai.models.video.generation)
-| 模型 ID | 显示名称 | 渠道 | 生成模式 | 分辨率 | 时长范围 | 宽高比 |
-|---------|----------|------|----------|--------|----------|--------|
-| `grok-imagine-video` | Grok Video | grok | text2video, image2video, video2video | 720p | 1-15 秒 | 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3 |
-| `grok-video-3-15s` | Grok Video 15s | aicso-grok | text2video, image2video | 720p | 15 秒 | 2:3, 3:2, 1:1 |
-| `veo3.1-components-4k` | Veo 3.1 4K | aicso-veo | text2video, image2video | 4k | 8 秒 | 9:16, 16:9, 1:1 |
-| `veo3.1-components` | Veo 3.1 | aicso-veo | text2video, image2video | 720p | 8 秒 | 9:16, 16:9, 1:1 |
+| 模型 ID | 显示名称 | 生成模式 | 分辨率 | 时长 | 宽高比 |
+|---------|----------|----------|--------|------|--------|
+| `grok-imagine-video` | Grok Video | text/image/video → video | 720p | 1-15 秒 | 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3 |
+| `grok-video-3-15s` | Grok Video 15s | text/image → video | 720p | 15 秒 | 2:3, 3:2, 1:1 |
+| `veo3.1-components-4k` | Veo 3.1 4K | text/image → video | 4k | 8 秒 | 9:16, 16:9, 1:1 |
+| `veo3.1-components` | Veo 3.1 | text/image → video | 720p | 8 秒 | 9:16, 16:9, 1:1 |
-#### 草稿生成图片模型(ai.draftGeneration.imageModels)
+### 草稿生成图片模型(ai.draftGeneration.imageModels)
| 模型 ID | 显示名称 | 支持宽高比 | 最大输入图片数 |
|---------|----------|-----------|---------------|
| `gemini-3.1-flash-image-preview` | NanoBanana 2 | 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9 | 14 |
| `gemini-3-pro-image-preview` | NanoBanana Pro | 同上 | 14 |
-定价按分辨率计费(1K/2K/4K),默认均为 `0`。
-
-#### Agent 配置
-
-| 配置项 | 说明 | 来源 |
-|--------|------|------|
-| `agent.baseUrl` | Agent API 地址 | 基于 `OPENAI_BASE_URL` + `/messages`,支持代理 |
-| `agent.apiKey` | Agent API 密钥 | 环境变量 `OPENAI_API_KEY` |
-
----
-
-### project/aitoearn-backend/apps/aitoearn-server/config/config.js
-
-后端服务的完整配置文件,挂载到 `aitoearn-server:/app/config.js`。
-
-#### 基础配置
-
-| 配置项 | 说明 | 默认值/来源 |
-|--------|------|-------------|
-| `appDomain` | 应用域名 | 环境变量 `APP_DOMAIN` |
-| `port` | 服务监听端口 | `3002` |
-| `environment` | 运行环境 | 环境变量 `NODE_ENV` |
-| `enableBadRequestDetails` | 是否返回请求错误详情 | `true` |
-
-#### 认证、日志、数据库、缓存
-
-与 aitoearn-ai.config.js 相同的配置结构,从环境变量读取。
-
-#### 平台集成配置(channel)
-
-**channel.channelDb** — 平台数据独立数据库:
-
-| 配置项 | 说明 | 默认值 |
-|--------|------|--------|
-| `channelDb.uri` | MongoDB 连接 URI | 与主数据库相同 |
-| `channelDb.dbName` | 数据库名称 | `aitoearn_channel` |
-
-**channel.moreApi** — 外部平台 API:
-
-| 配置项 | 说明 | 默认值 |
-|--------|------|--------|
-| `moreApi.platApiUri` | 平台 API 地址 | `https://platapi.yikart.cn` |
-| `moreApi.xhsCreatorUri` | 小红书创作者 API | `http://39.106.41.190:7008` |
-
-**channel.shortLink** — 短链接服务:
-
-| 配置项 | 说明 | 默认值 |
-|--------|------|--------|
-| `shortLink.baseUrl` | 短链接基础 URL | `https://{APP_DOMAIN}/api/shortLink/` |
-
-**各平台 OAuth 配置** — 每个平台的 OAuth 回调地址由 `APP_DOMAIN` 自动拼接:
-
-| 平台 | 回调地址格式 | 特殊配置 |
-|------|-------------|----------|
-| Bilibili | `https://{APP_DOMAIN}/api/plat/bilibili/auth/back` | — |
-| Google | 通过 Google SDK 处理 | — |
-| Google Business | `https://{APP_DOMAIN}/api/plat/google-business/auth/callback` | 需单独配置 clientId/clientSecret |
-| 快手 | `https://{APP_DOMAIN}/api/plat/kwai/auth/back` | — |
-| Pinterest | `https://{APP_DOMAIN}/api/plat/pinterest/authWebhook` | `baseUrl`: `https://api.pinterest.com`,支持 `test_authorization` |
-| TikTok | `https://{APP_DOMAIN}/api/plat/tiktok/auth/back` | 含推广回调和 scopes 配置 |
-| Twitter | `https://{APP_DOMAIN}/api/plat/twitter/auth/back` | — |
-| Facebook | `https://{APP_DOMAIN}/api/plat/meta/auth/back` | 含 `configId` 和 scopes |
-| Threads | `https://{APP_DOMAIN}/api/plat/meta/auth/back` | 独立的 clientId/Secret,含 scopes |
-| Instagram | `https://{APP_DOMAIN}/api/plat/meta/auth/back` | 含推广回调和 scopes |
-| LinkedIn | `https://{APP_DOMAIN}/api/plat/meta/auth/back` | scopes: openid, profile, email, w_member_social |
-| 微信公众平台 | `https://{APP_DOMAIN}/platcallback` | 含 token 和 encodingAESKey |
-| YouTube | `https://{APP_DOMAIN}/api/plat/youtube/auth/callback` | — |
-| 抖音 | `https://{APP_DOMAIN}/api/plat/douyin/auth/back` | — |
-
-#### 资源存储(assets)
-
-与 aitoearn-ai config.js 中的 `assets` 配置相同,两处需保持一致。也可通过 `ASSETS_CONFIG` 环境变量统一覆盖。
-
-#### 邮件配置(mail)
-
-| 配置项 | 说明 | 默认值/来源 |
-|--------|------|-------------|
-| `mail.transport.host` | SMTP 主机 | `email-smtp.ap-southeast-1.amazonaws.com` |
-| `mail.transport.port` | SMTP 端口 | `587` |
-| `mail.transport.secure` | 是否使用 TLS | `false`(STARTTLS) |
-| `mail.transport.auth.user` | SMTP 用户名 | 环境变量 `MAIL_USER` |
-| `mail.transport.auth.pass` | SMTP 密码 | 环境变量 `MAIL_PASS` |
-| `mail.defaults.from` | 默认发件人地址 | `[email protected]` |
-
-如需更换邮件服务商(如 SendGrid、Mailgun),修改 `mail.transport` 中的 host/port 配置。
-
-#### 阿里云短信(aliSms)
-
-| 配置项 | 说明 | 来源 |
-|--------|------|------|
-| `aliSms.accessKeyId` | 阿里云 AccessKey ID | 环境变量 `ALI_SMS_ACCESS_KEY_ID` |
-| `aliSms.accessKeySecret` | 阿里云 AccessKey Secret | 环境变量 `ALI_SMS_ACCESS_KEY_SECRET` |
-| `aliSms.signName` | 短信签名 | 环境变量 `ALI_SMS_SIGN_NAME` |
-| `aliSms.templateCode` | 短信模板代码 | 环境变量 `ALI_SMS_TEMPLATE_CODE` |
-
-#### 内部服务通信
-
-| 配置项 | 说明 | 来源 |
-|--------|------|------|
-| `aiClient.baseUrl` | 访问 AI 服务的地址 | 环境变量 `AI_URL` |
-| `aiClient.token` | 服务通信 token | 环境变量 `INTERNAL_TOKEN` |
-
-## 常用命令
-
-```bash
-# 启动所有服务
-docker compose up -d
-
-# 停止所有服务
-docker compose down
-
-# 查看服务状态
-docker compose ps
-
-# 查看所有日志
-docker compose logs -f
-
-# 查看指定服务日志
-docker compose logs -f aitoearn-web
-docker compose logs -f aitoearn-server
-docker compose logs -f aitoearn-ai
-
-# 重启单个服务
-docker compose restart aitoearn-server
-
-# 修改配置文件后重启相关服务
-docker compose restart aitoearn-ai aitoearn-server
-
-# 重新创建服务(修改 docker-compose.yml 后)
-docker compose down && docker compose up -d
-
-# 清理所有数据(危险!)
-docker compose down -v
-```
-
-## 数据持久化
-
-以下数据通过 Docker Volume 持久化:
-
-| Volume | 说明 |
-|--------|------|
-| `mongodb-data` | MongoDB 数据文件 |
-| `mongodb-config` | MongoDB 配置文件 |
-| `redis-data` | Redis 持久化数据 |
-| `rustfs-data` | RustFS 对象存储数据 |
-
-停止服务(`docker compose down`)不会删除数据。只有 `docker compose down -v` 才会删除 Volume 数据。
-
-## 生产环境部署建议
-
-### HTTPS 配置
-
-生产环境建议在 Nginx 前再加一层 HTTPS 反向代理(如 Caddy 或 Certbot + Nginx),或修改 `nginx/nginx.conf` 添加 SSL 配置:
-
-```bash
-# 方式一:使用 Caddy(推荐,自动 HTTPS)
-# 在 docker-compose.yml 中替换 nginx 服务为 caddy
-
-# 方式二:使用 Let's Encrypt
-# 将证书挂载到 nginx 容器中
-```
-
-### 安全建议
-
-1. **在 docker-compose.yml 中修改所有默认密码和密钥**
-2. 不要在生产环境暴露 MongoDB(27017)和 Redis(6379)端口
-3. 配置防火墙,仅允许 8080/443 端口
-4. 定期备份 MongoDB 数据
-
-### 备份
-
-```bash
-# 备份 MongoDB
-docker exec aitoearn-mongodb mongodump --uri="mongodb://admin:your-password@localhost:27017" --out=/dump
-docker cp aitoearn-mongodb:/dump ./backup/
-
-# 恢复 MongoDB
-docker cp ./backup/dump aitoearn-mongodb:/dump
-docker exec aitoearn-mongodb mongorestore --uri="mongodb://admin:your-password@localhost:27017" /dump
-```
-
-## 常见问题
-
-### Q: 如何从源码构建镜像?
-
-如果你需要从源码构建 Docker 镜像(而非使用预构建镜像),可以使用项目自带的构建脚本:
-
-```bash
-bash scripts/build.sh
-```
-
-该脚本会:
-1. 使用 Nx 构建后端项目(aitoearn-server、aitoearn-ai)
-2. 使用 Dockerfile 构建前端项目(aitoearn-web)
-3. 将所有镜像 tag 为 `aitoearn/*:latest`
-
-构建完成后,正常使用 `docker compose up -d` 启动即可。
-
-> 前置要求:需要安装 Node.js 和 pnpm,并在 `project/aitoearn-backend` 目录下执行过 `pnpm install`。
-
-### Q: 配置文件有什么作用?
-
-各应用的 `config/` 子目录包含应用配置文件:
-
-- **project/aitoearn-backend/apps/aitoearn-ai/config/config.js**: AI 服务的详细配置,包含 AI 模型定义(可用模型列表、定价)、存储配置、Gemini 设置等
-- **project/aitoearn-backend/apps/aitoearn-server/config/config.js**: 后端服务配置,包含 OAuth 回调地址模式、邮件传输设置、存储配置等
-
-这些文件以只读卷挂载到容器中,修改后需重启对应服务:`docker compose restart aitoearn-ai aitoearn-server`
-
-### Q: 如何修改或添加 AI 模型?
-
-编辑 `project/aitoearn-backend/apps/aitoearn-ai/config/config.js` 中的 `ai.models` 部分,可以修改可用模型列表、定价和模型参数。修改后重启 AI 服务:
-
-```bash
-docker compose restart aitoearn-ai
-```
-
-### Q: 服务启动失败,提示端口被占用?
-
-检查 8080、27017、6379 端口是否被其他程序占用:
-
-```bash
-lsof -i :8080
-lsof -i :27017
-lsof -i :6379
-```
-
-### Q: 前端页面加载但 API 请求失败?
-
-1. 检查 Nginx 是否正常运行:`docker compose logs nginx`
-2. 检查后端服务是否健康:`docker compose ps`
-
-### Q: OAuth 登录回调失败?
-
-1. 确认 `docker-compose.yml` 中 `aitoearn-server` 服务的 `APP_DOMAIN` 配置为你的公网域名(不是 localhost)
-2. 在各平台开发者后台配置正确的回调地址
-3. 确保域名已备案且 HTTPS 配置正确
-
-### Q: AI 功能不可用?
-
-1. 确认 `docker-compose.yml` 中 `OPENAI_API_KEY` 和 `OPENAI_BASE_URL` 已正确配置
-2. 推荐部署 [new-api](https://github.com/Calcium-Ion/new-api) 中转服务统一管理所有 AI 模型
-3. 默认的 `sk-placeholder` 仅作为占位值,不会调通任何 AI 服务
-4. AI 模型的配置在 `project/aitoearn-backend/apps/aitoearn-ai/config/config.js` 中,确认模型定义与你的 API 服务匹配
-
-### Q: 如何更新到最新版本?
-
-```bash
-docker compose pull
-docker compose down && docker compose up -d
-```
+定价按分辨率(1K/2K/4K),默认均为 `0`(免费)。
diff --git a/DOCKER_DEPLOYMENT_EN.md b/DOCKER_DEPLOYMENT_EN.md
index 2d24c1dd..0ba1557b 100644
--- a/DOCKER_DEPLOYMENT_EN.md
+++ b/DOCKER_DEPLOYMENT_EN.md
@@ -49,48 +49,41 @@ docker --version
docker compose version
```
-## Quick Start
+---
-### 1. Clone the Repository
+## 🚀 Get Running in 3 Minutes
-```bash
-git clone https://github.com/yikart/AiToEarn.git
-cd AiToEarn
-```
+Just 3 steps to run the complete AiToEarn on your machine.
-### 2. Start Services
+### Step 1: Clone and Start
```bash
+git clone https://github.com/yikart/AiToEarn.git
+cd AiToEarn
docker compose up -d
```
-First startup will pull images, which may take a few minutes.
+First startup pulls images — may take a few minutes. Run `docker compose ps` to confirm all services are `healthy` or `running`.
-### 3. Check Status
+### Step 2: Open the App
-```bash
-docker compose ps
-```
-
-All services should show `healthy` or `running` status.
-
-### 4. Access the Application
+Visit: **[http://localhost:8080](http://localhost:8080)**
-| URL | Description |
-|-----|-------------|
-| http://localhost:8080 | Web frontend (via Nginx) |
-| http://localhost:8080/api/ | Backend API (via Nginx) |
-| http://localhost:8080/_nhealth | Nginx health check |
-| http://localhost:9001 | RustFS object storage console |
+> First startup auto-creates an admin account and logs you in automatically.
-### 5. Configure Relay (Recommended)
+### Step 3: Configure Relay (Strongly Recommended)
-Relay allows self-hosted instances to connect social media platform accounts via the official AiToEarn relay server, without needing to configure OAuth credentials for each platform.
+> **Why configure Relay?**
+>
+> AiToEarn needs to log into your social media accounts (TikTok, Instagram, YouTube, etc.) to publish content. These platforms require OAuth developer credentials for authorization.
+>
+> - **Without Relay**: You'd need to register as a developer on each platform and obtain client_id/secret — extremely tedious.
+> - **With Relay**: Use the official aitoearn.ai credentials to authorize all platforms with **just one API Key**.
-**Setup:**
+**How to configure**:
-1. Go to **Settings → API Key** at [https://aitoearn.ai](https://aitoearn.ai) and create an API Key.
-2. Configure in the `aitoearn-server` service of `docker-compose.yml`:
+1. Sign up at [aitoearn.ai](https://aitoearn.ai) (international) or [aitoearn.cn](https://aitoearn.cn) (China), go to **Settings → API Key**, and create an API Key
+2. Edit `docker-compose.yml`, add to the `aitoearn-server` service `environment`:
```yaml
RELAY_SERVER_URL: https://aitoearn.ai/api
@@ -98,197 +91,118 @@ RELAY_API_KEY: your-api-key
RELAY_CALLBACK_URL: http://127.0.0.1:8080/api/plat/relay-callback
```
-3. Restart the service: `docker compose restart aitoearn-server`
+3. Restart the service:
-### 6. Configure AI Services
+```bash
+docker compose restart aitoearn-server
+```
-**Recommended: use a relay service like new-api / one-api** to manage all AI models through a single endpoint.
+**You're all set!** 🎉
-- [new-api](https://github.com/Calcium-Ion/new-api) - Multi-model API relay
-- [one-api](https://github.com/songquanpeng/one-api) - OpenAI API management and distribution
+Everything below is advanced configuration — refer to it only when needed.
+
+---
+
+## Advanced Configuration
+
+### AI Services
-Configure in `docker-compose.yml`:
+Default AI keys are placeholders (`sk-placeholder`). The app starts fine, but AI features (AI copywriting, AI comments, etc.) will return errors.
+
+**Recommended: use [new-api](https://github.com/Calcium-Ion/new-api) or [one-api](https://github.com/songquanpeng/one-api)** to manage all AI models (OpenAI, Claude, Gemini, etc.) through a single endpoint.
+
+Configure in `docker-compose.yml` (both `aitoearn-ai` and `aitoearn-server` services):
```yaml
-# In both aitoearn-ai and aitoearn-server services
OPENAI_BASE_URL: https://your-new-api-host/v1
OPENAI_API_KEY: sk-your-new-api-key
```
-> Default `sk-placeholder` values allow the app to start normally. AI features will return errors until real keys are configured.
-
-### 7. Configure Environment Variables (Production)
+### Production Security
-All environment variables are configured directly in `docker-compose.yml`. **Default values are already provided for all settings, so you can start the application immediately without any changes.**
+Default passwords are all `password`. **Change them for production.**
-For production deployments, it is recommended to modify the following security-related fields:
+> 💡 Generate random strings with `openssl rand -hex 32`
```yaml
-# 1. mongodb service — change database password
+# 1. mongodb service
MONGO_INITDB_ROOT_PASSWORD: your-secure-password
-# 2. redis service — change Redis password
+# 2. redis service
command: redis-server --requirepass your-secure-password
-# 3. aitoearn-ai service — change these variables
-MONGODB_PASSWORD: your-secure-password # must match MongoDB password above
-REDIS_PASSWORD: your-secure-password # must match Redis password above
+# 3. aitoearn-ai service
+MONGODB_PASSWORD: your-secure-password # must match MongoDB
+REDIS_PASSWORD: your-secure-password # must match Redis
JWT_SECRET: your-random-jwt-secret
INTERNAL_TOKEN: your-random-internal-token
-# 4. aitoearn-server service — change these variables (must match aitoearn-ai)
+# 4. aitoearn-server service (must match aitoearn-ai)
MONGODB_PASSWORD: your-secure-password
REDIS_PASSWORD: your-secure-password
JWT_SECRET: your-random-jwt-secret # must match aitoearn-ai
INTERNAL_TOKEN: your-random-internal-token # must match aitoearn-ai
-APP_DOMAIN: your-domain.com # change for production
+APP_DOMAIN: your-domain.com # your public domain
```
-> **Note**: When changing passwords, you must update ALL services that reference them. For example, the MongoDB password appears in the `mongodb`, `aitoearn-ai`, and `aitoearn-server` services.
->
-> Generate random strings with: `openssl rand -hex 32`
+> ⚠️ MongoDB password appears in `mongodb`, `aitoearn-ai`, and `aitoearn-server` — update all three when changing.
-### 8. Configure Application Config Files
+### Third-Party OAuth (Optional)
-Configuration files are located in each application's `config/` subdirectory, mounted as read-only volumes into containers:
+> If you've configured Relay, you can **skip this**. Only needed if you want to use your own OAuth credentials instead of Relay.
-| File | Mounted to | Description |
-|------|------------|-------------|
-| `project/aitoearn-backend/apps/aitoearn-ai/config/config.js` | aitoearn-ai:/app/config.js | AI service config (AI model definitions, storage) |
-| `project/aitoearn-backend/apps/aitoearn-server/config/config.js` | aitoearn-server:/app/config.js | Backend config (OAuth callbacks, email, storage) |
+Configure in the `aitoearn-server` service of `docker-compose.yml`:
-These config files read environment variables from `process.env` (set by docker-compose.yml) and also contain hardcoded configuration (storage endpoints, AI model lists, etc.).
-
-**To change RustFS credentials or switch to external S3/OSS**, update the `assets` configuration in both config.js files, or override via the `ASSETS_CONFIG` environment variable (see below).
-
-## Environment Variables Reference
-
-All variables below are configured in the `environment` section of each service in `docker-compose.yml`.
-
-### Core Settings
-
-All variables below have working defaults — the application starts out of the box. For production, change passwords and secrets.
-
-| Variable | Service(s) | Description | Default |
-|----------|------------|-------------|---------|
-| `MONGO_INITDB_ROOT_PASSWORD` | mongodb | MongoDB root password | `password` |
-| `MONGODB_PASSWORD` | aitoearn-ai, aitoearn-server | MongoDB connection password (must match above) | `password` |
-| `REDIS_PASSWORD` | aitoearn-ai, aitoearn-server | Redis password (must match redis `--requirepass`) | `password` |
-| `JWT_SECRET` | aitoearn-ai, aitoearn-server | JWT signing secret | `change-this-jwt-secret` |
-| `INTERNAL_TOKEN` | aitoearn-ai, aitoearn-server | Inter-service auth token | `change-this-secret-token` |
-| `APP_DOMAIN` | aitoearn-server | Application domain (for OAuth callbacks) | `localhost` |
-| `ASSETS_CONFIG` | aitoearn-ai, aitoearn-server | Asset storage config (JSON format, see above) | Built-in RustFS config |
-
-### Internal Service Communication
-
-These variables handle inter-service communication via Docker internal networking. Usually no changes needed.
+| Platform | Variables | Developer Console |
+|----------|-----------|------------------|
+| Bilibili | `BILIBILI_CLIENT_ID/SECRET` | https://open.bilibili.com |
+| Google | `GOOGLE_CLIENT_ID/SECRET` | https://console.cloud.google.com/apis/credentials |
+| Kwai | `KWAI_CLIENT_ID/SECRET` | https://open.kuaishou.com |
+| Pinterest | `PINTEREST_CLIENT_ID/SECRET` | https://developers.pinterest.com |
+| TikTok | `TIKTOK_CLIENT_ID/SECRET` | https://developers.tiktok.com |
+| Twitter/X | `TWITTER_CLIENT_ID/SECRET` | https://developer.x.com/en/portal |
+| Facebook | `FACEBOOK_CLIENT_ID/SECRET`, `FACEBOOK_CONFIG_ID` | https://developers.facebook.com |
+| Threads | `THREADS_CLIENT_ID/SECRET` | https://developers.facebook.com |
+| Instagram | `INSTAGRAM_CLIENT_ID/SECRET` | https://developers.facebook.com |
+| LinkedIn | `LINKEDIN_CLIENT_ID/SECRET` | https://www.linkedin.com/developers |
+| YouTube | `YOUTUBE_CLIENT_ID/SECRET` | https://console.cloud.google.com/apis/credentials |
+| WeChat | `WXPLAT_APP_ID/SECRET`, `WXPLAT_ENCODING_AES_KEY` | https://mp.weixin.qq.com |
+| Douyin | `DOYIN_CLIENT_ID/SECRET` | https://open.douyin.com |
-| Variable | Service | Description | Default |
-|----------|---------|-------------|---------|
-| `SERVER_URL` | aitoearn-ai | URL to reach aitoearn-server | `http://aitoearn-server:3002` |
-| `AI_URL` | aitoearn-server | URL to reach aitoearn-ai | `http://aitoearn-ai:3010` |
+OAuth callback URL format: `https://{APP_DOMAIN}/api/plat/{platform}/auth/back`
-### Assets Storage (RustFS)
+> Ensure `APP_DOMAIN` is set to your public domain.
-Docker Compose includes [RustFS](https://github.com/rustfs/rustfs) as a built-in S3-compatible object storage. **It works out of the box with no extra configuration**.
+### Object Storage (RustFS)
-On startup, the `aitoearn` bucket is automatically created. Application services access it via `http://rustfs.local:9000` on the internal network.
+Docker Compose includes [RustFS](https://github.com/rustfs/rustfs) as built-in S3-compatible storage. **Works out of the box.**
**RustFS Console**: http://localhost:9001
- Default username: `rustfsadmin`
- Default password: `rustfsadmin`
-To change RustFS credentials, update these locations:
+<details>
+<summary>Changing RustFS credentials or switching to external S3/OSS</summary>
+
+Update all three locations:
1. `docker-compose.yml` — `rustfs` service: `RUSTFS_ACCESS_KEY` and `RUSTFS_SECRET_KEY`
-2. `docker-compose.yml` — `rustfs-init` service: credentials in the `mc alias set` command
-3. `docker-compose.yml` — `ASSETS_CONFIG` environment variable in both `aitoearn-ai` and `aitoearn-server` services
+2. `docker-compose.yml` — `rustfs-init` service: credentials in `mc alias set` command
+3. `docker-compose.yml` — `ASSETS_CONFIG` in both `aitoearn-ai` and `aitoearn-server`
-**`ASSETS_CONFIG` environment variable** (JSON format) configures asset storage. Required in both `aitoearn-ai` and `aitoearn-server` services:
+`ASSETS_CONFIG` format (JSON), needed in both services:
```yaml
ASSETS_CONFIG: '{"provider":"s3","region":"us-east-1","bucketName":"aitoearn","endpoint":"http://rustfs.local:9000","publicEndpoint":"http://127.0.0.1:9000","cdnEndpoint":"http://127.0.0.1:8080/oss","accessKeyId":"rustfsadmin","secretAccessKey":"rustfsadmin","forcePathStyle":true}'
```
-**For production** with AWS S3 or other providers, update `ASSETS_CONFIG` or the `assets` config in both config.js files:
+AWS S3 example:
```yaml
-# In docker-compose.yml (AWS S3 example)
ASSETS_CONFIG: '{"provider":"s3","region":"ap-southeast-1","bucketName":"your-bucket","endpoint":"https://s3.ap-southeast-1.amazonaws.com","accessKeyId":"xxx","secretAccessKey":"xxx","cdnEndpoint":"https://your-cdn.com"}'
```
-### AI Services
-
-**Recommended: use a relay service like new-api / one-api** to manage all AI models through a single endpoint. One API URL and key gives you access to OpenAI, Claude, Gemini, and more.
-
-Popular relay services:
-- [new-api](https://github.com/Calcium-Ion/new-api) - Multi-model API relay
-- [one-api](https://github.com/songquanpeng/one-api) - OpenAI API management and distribution
-
-After deploying a relay service, configure in `docker-compose.yml`:
-
-```yaml
-# In both aitoearn-ai and aitoearn-server services
-OPENAI_BASE_URL: https://your-new-api-host/v1
-OPENAI_API_KEY: sk-your-new-api-key
-```
-
-> Default `sk-placeholder` values allow the app to start normally. AI features will return errors until real keys are configured.
-
-All supported AI services (configured in the `aitoearn-ai` service):
-
-| Variable | Service | Notes |
-|----------|---------|-------|
-| `OPENAI_API_KEY` | OpenAI / Relay | Needed in both aitoearn-ai and aitoearn-server |
-| `OPENAI_BASE_URL` | API URL | Relay URL or `https://api.openai.com/v1` (both services) |
-| `ANTHROPIC_API_KEY` | Anthropic (Claude) | Can be accessed via relay |
-| `ANTHROPIC_BASE_URL` | Anthropic API URL | Default: `https://api.anthropic.com` |
-| `VOLCENGINE_API_KEY` | Volcengine (Doubao) | https://console.volcengine.com/ark |
-| `VOLCENGINE_ACCESS_KEY_ID` | Volcengine | Access Key ID |
-| `VOLCENGINE_SECRET_ACCESS_KEY` | Volcengine | Secret Access Key |
-| `VOLCENGINE_VOD_SPACE_NAME` | Volcengine | VOD space name |
-| `GROK_API_KEY` | xAI (Grok) | https://console.x.ai |
-| `AICSO_API_KEY` | AICSO | AICSO service API key |
-| `AICSO_BASE_URL` | AICSO | AICSO service base URL |
-| `GEMINI_KEY_PAIRS` | Google Gemini | JSON array format |
-| `GEMINI_LOCATION` | Google Gemini | Default: `us-central1` |
-| `AI_PROXY_URL` | AI Proxy | Optional, for proxied AI API access |
-
-`GEMINI_KEY_PAIRS` format (JSON array), defaults to `'[]'` (empty array):
-
-```yaml
-# Default (Gemini disabled)
-GEMINI_KEY_PAIRS: '[]'
-
-# Example with Gemini configured
-GEMINI_KEY_PAIRS: '[{"projectId":"your-gcp-project-id","apiKey":"your-gemini-api-key","bucket":"your-bucket"}]'
-```
-
-AI model definitions (available models, pricing, etc.) are configured in `project/aitoearn-backend/apps/aitoearn-ai/config/config.js`.
-
-### Third-party OAuth (Optional)
-
-Configure social media OAuth credentials as needed in the `aitoearn-server` service of `docker-compose.yml`.
-
-| Platform | Variables | Developer Console |
-|----------|-----------|------------------|
-| Bilibili | `BILIBILI_CLIENT_ID/SECRET` | https://open.bilibili.com |
-| Google | `GOOGLE_CLIENT_ID/SECRET` | https://console.cloud.google.com/apis/credentials |
-| Kwai | `KWAI_CLIENT_ID/SECRET` | https://open.kuaishou.com |
-| Pinterest | `PINTEREST_CLIENT_ID/SECRET` | https://developers.pinterest.com |
-| TikTok | `TIKTOK_CLIENT_ID/SECRET` | https://developers.tiktok.com |
-| Twitter/X | `TWITTER_CLIENT_ID/SECRET` | https://developer.x.com/en/portal |
-| Facebook | `FACEBOOK_CLIENT_ID/SECRET`, `FACEBOOK_CONFIG_ID` | https://developers.facebook.com |
-| Threads | `THREADS_CLIENT_ID/SECRET` | https://developers.facebook.com |
-| Instagram | `INSTAGRAM_CLIENT_ID/SECRET` | https://developers.facebook.com |
-| LinkedIn | `LINKEDIN_CLIENT_ID/SECRET` | https://www.linkedin.com/developers |
-| YouTube | `YOUTUBE_CLIENT_ID/SECRET` | https://console.cloud.google.com/apis/credentials |
-| WeChat | `WXPLAT_APP_ID/SECRET`, `WXPLAT_ENCODING_AES_KEY` | https://mp.weixin.qq.com |
-| Douyin | `DOYIN_CLIENT_ID/SECRET` | https://open.douyin.com |
-
-**OAuth callback URL format**: `https://{APP_DOMAIN}/api/plat/{platform}/auth/back`
-
-> Ensure `APP_DOMAIN` is set to your public domain. OAuth callbacks won't work with `localhost`.
+</details>
### Other Optional Services
@@ -297,125 +211,98 @@ Configure social media OAuth credentials as needed in the `aitoearn-server` serv
| `MAIL_USER` / `MAIL_PASS` | aitoearn-server | Email (AWS SES SMTP) | AWS Console → SES → SMTP |
| `ALI_SMS_*` (4 vars) | aitoearn-server | Aliyun SMS | https://dysms.console.aliyun.com |
-### Auto-Login
-
-Auto-login is enabled by default. On first startup, the `aitoearn-init` service generates an admin token and saves it to a shared volume. The `aitoearn-web` service reads this token automatically and uses it to log in without manual authentication.
-
-### Image Pull Policy
-
-All application service images in Docker Compose use `pull_policy: always` to ensure the latest images are pulled on every `docker compose up`:
-
-```yaml
-services:
- aitoearn-web:
- image: aitoearn/aitoearn-web:latest
- pull_policy: always
- aitoearn-server:
- image: aitoearn/aitoearn-server:latest
- pull_policy: always
- aitoearn-ai:
- image: aitoearn/aitoearn-ai:latest
- pull_policy: always
-```
+---
-## Config Files Reference
+## Operations Reference
-Each application has its own configuration file, mounted as read-only volumes into containers. Restart the corresponding service after making changes.
+### Auto-Login
-### project/aitoearn-backend/apps/aitoearn-ai/config/config.js
+Enabled by default. On first startup, `aitoearn-init` generates an admin token saved to a shared volume. `aitoearn-web` reads it automatically.
-Complete configuration for the AI service, mounted to `aitoearn-ai:/app/config.js`.
+### Image Pull Policy
-#### Basic Settings
+All app images use `pull_policy: always` to pull the latest on every `docker compose up`.
-| Config | Description | Default |
-|--------|-------------|---------|
-| `port` | Service listening port | `3010` |
-| `logger.console.enable` | Enable console logging | `true` |
-| `logger.console.level` | Log level | `debug` |
-| `logger.console.pretty` | Pretty-print log output | `false` |
+### Internal Service Communication
-#### Database & Cache
+These variables handle inter-service communication via Docker networking. Usually no changes needed:
-Read from environment variables, usually no changes needed in the config file.
+| Variable | Service | Default |
+|----------|---------|---------|
+| `SERVER_URL` | aitoearn-ai | `http://aitoearn-server:3002` |
+| `AI_URL` | aitoearn-server | `http://aitoearn-ai:3010` |
-| Config | Description | Source |
-|--------|-------------|--------|
-| `redis` | Redis connection (host/port/password) | Env vars `REDIS_HOST/PORT/PASSWORD` |
-| `redlock` | Distributed lock Redis config | Same as redis |
-| `mongodb.uri` | MongoDB connection URI | Built from env vars |
-| `mongodb.dbName` | Database name | `aitoearn` |
+### Config Files
-#### Authentication
+Mounted as read-only volumes. Restart the service after changes:
-| Config | Description | Source |
-|--------|-------------|--------|
-| `auth.secret` | JWT signing secret | Env var `JWT_SECRET` |
-| `auth.expiresIn` | JWT expiration (seconds) | `604800` (7 days) |
-| `auth.internalToken` | Internal service token | Env var `INTERNAL_TOKEN` |
+| File | Mounted to | Description |
+|------|------------|-------------|
+| `project/aitoearn-backend/apps/aitoearn-ai/config/config.js` | aitoearn-ai:/app/config.js | AI service config |
+| `project/aitoearn-backend/apps/aitoearn-server/config/config.js` | aitoearn-server:/app/config.js | Backend config |
-#### Inter-service Communication
+---
-| Config | Description | Source |
-|--------|-------------|--------|
-| `serverClient.baseUrl` | URL to reach backend service | Env var `SERVER_URL` |
-| `serverClient.token` | Service communication token | Env var `INTERNAL_TOKEN` |
+## Environment Variables Quick Reference
-#### Assets Storage
+All variables are in the `environment` section of each service in `docker-compose.yml`.
-**Requires manual editing.** Defaults point to built-in RustFS:
+### Core
-| Config | Description | Default |
-|--------|-------------|---------|
-| `assets.provider` | Storage provider | `s3` |
-| `assets.region` | Storage region | `us-east-1` |
-| `assets.bucketName` | Bucket name | `aitoearn` |
-| `assets.endpoint` | Storage endpoint | `http://rustfs.local:9000` |
-| `assets.accessKeyId` | Access key ID | `rustfsadmin` |
-| `assets.secretAccessKey` | Secret access key | `rustfsadmin` |
-| `assets.cdnEndpoint` | CDN URL (optional) | None |
+| Variable | Service(s) | Description | Default |
+|----------|------------|-------------|---------|
+| `MONGO_INITDB_ROOT_PASSWORD` | mongodb | MongoDB root password | `password` |
+| `MONGODB_PASSWORD` | aitoearn-ai, aitoearn-server | MongoDB connection password | `password` |
+| `REDIS_PASSWORD` | aitoearn-ai, aitoearn-server | Redis password | `password` |
+| `JWT_SECRET` | aitoearn-ai, aitoearn-server | JWT signing secret | `change-this-jwt-secret` |
+| `INTERNAL_TOKEN` | aitoearn-ai, aitoearn-server | Inter-service auth token | `change-this-secret-token` |
+| `APP_DOMAIN` | aitoearn-server | Application domain | `localhost` |
+| `ASSETS_CONFIG` | aitoearn-ai, aitoearn-server | Asset storage config (JSON) | Built-in RustFS |
-#### AI Service Providers
+### Relay
-Connection config for each AI service, read from environment variables:
+| Variable | Service | Description |
+|----------|---------|-------------|
+| `RELAY_SERVER_URL` | aitoearn-server | Relay server URL (`https://aitoearn.ai/api`) |
+| `RELAY_API_KEY` | aitoearn-server | Your API Key |
+| `RELAY_CALLBACK_URL` | aitoearn-server | OAuth callback (`http://127.0.0.1:8080/api/plat/relay-callback`) |
-| Config | Description |
-|--------|-------------|
-| `ai.openai` | OpenAI config (baseUrl, apiKey), supports `AI_PROXY_URL` proxy |
-| `ai.anthropic` | Anthropic Claude config (baseUrl, apiKey), supports proxy |
-| `ai.grok` | xAI Grok config (baseUrl fixed to `https://api.x.ai`, apiKey), supports proxy |
-| `ai.volcengine` | Volcengine config (baseUrl, apiKey, accessKeyId, secretAccessKey, spaceName) |
-| `ai.gemini` | Google Gemini config (keyPairs, location, apiKey), supports proxy |
-| `ai.aicso` | AICSO config (apiKey, baseUrl) |
+### AI Services
-#### Video AI Feature Pricing (ai.aideo)
+| Variable | Description |
+|----------|-------------|
+| `OPENAI_API_KEY` | OpenAI / relay API key (both services) |
+| `OPENAI_BASE_URL` | API URL (both services) |
+| `ANTHROPIC_API_KEY` | Anthropic Claude |
+| `ANTHROPIC_BASE_URL` | Anthropic API URL |
+| `VOLCENGINE_API_KEY` | Volcengine (Doubao) |
+| `VOLCENGINE_ACCESS_KEY_ID` | Volcengine Access Key |
+| `VOLCENGINE_SECRET_ACCESS_KEY` | Volcengine Secret Key |
+| `VOLCENGINE_VOD_SPACE_NAME` | Volcengine VOD space |
+| `GROK_API_KEY` | xAI (Grok) |
+| `AICSO_API_KEY` | AICSO service |
+| `AICSO_BASE_URL` | AICSO URL |
+| `GEMINI_KEY_PAIRS` | Google Gemini (JSON array) |
+| `GEMINI_LOCATION` | Gemini region (default: `us-central1`) |
+| `AI_PROXY_URL` | AI proxy URL (optional) |
+
+`GEMINI_KEY_PAIRS` format:
-Pricing config for video AI features (unit: cents/minute), all default to `0` (free):
+```yaml
+# Disabled (default)
+GEMINI_KEY_PAIRS: '[]'
-| Config | Description |
-|--------|-------------|
-| `ai.aideo.vCreative.basePrice` | AI video editing (720P) |
-| `ai.aideo.vision.basePrice` | Video understanding |
-| `ai.aideo.highlight.basePrice` | Highlight smart editing |
-| `ai.aideo.aiTranslation.facialTranslation` | Facial translation |
-| `ai.aideo.erase.basePrice` | AI subtitle removal |
-| `ai.aideo.videoEdit.basePrice` | Video editing (720P) |
-| `ai.aideo.dramaRecap.basePrice` | Drama recap |
-| `ai.aideo.styleTransfer.basePrice` | Video style transfer |
+# Enabled
+GEMINI_KEY_PAIRS: '[{"projectId":"your-project","apiKey":"your-key","bucket":"your-bucket"}]'
+```
-#### AI Chat Models (ai.models.chat)
+---
-Defines the list of available AI chat models. Each model contains:
+## AI Model Reference
-| Field | Description |
-|-------|-------------|
-| `name` | Model ID (used in API calls) |
-| `description` | Display name |
-| `inputModalities` | Input types (`text`, `image`, `audio`, `video`) |
-| `outputModalities` | Output types (`text`, `image`) |
-| `pricing.tiers` | Tiered pricing (per input/output token) |
+AI models are defined in `project/aitoearn-backend/apps/aitoearn-ai/config/config.js`.
-Default chat models:
+### Chat Models (ai.models.chat)
| Model ID | Display Name | Input | Output |
|----------|-------------|-------|--------|
@@ -430,278 +317,26 @@ Default chat models:
| `claude-sonnet-4-5-20250929` | Claude Sonnet 4.5 | text/image | text |
| `gemini-2.5-flash` | Gemini 2.5 Flash | text/image/audio/video | text |
-#### AI Image Models (ai.models.image)
-
-**Image generation and image editing** models:
+### Image Models (ai.models.image)
| Model ID | Supported Sizes | Quality Options | Max Input Images (edit) |
|----------|----------------|-----------------|------------------------|
| `gpt-image-1.5` | 1024x1024, 1536x1024, 1024x1536, auto | high, medium, low | 16 (edit mode only) |
-#### AI Video Models (ai.models.video.generation)
+### Video Models (ai.models.video.generation)
-| Model ID | Display Name | Channel | Modes | Resolution | Duration | Aspect Ratios |
-|----------|-------------|---------|-------|------------|----------|---------------|
-| `grok-imagine-video` | Grok Video | grok | text2video, image2video, video2video | 720p | 1-15s | 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3 |
-| `grok-video-3-15s` | Grok Video 15s | aicso-grok | text2video, image2video | 720p | 15s | 2:3, 3:2, 1:1 |
-| `veo3.1-components-4k` | Veo 3.1 4K | aicso-veo | text2video, image2video | 4k | 8s | 9:16, 16:9, 1:1 |
-| `veo3.1-components` | Veo 3.1 | aicso-veo | text2video, image2video | 720p | 8s | 9:16, 16:9, 1:1 |
+| Model ID | Display Name | Modes | Resolution | Duration | Aspect Ratios |
+|----------|-------------|-------|------------|----------|---------------|
+| `grok-imagine-video` | Grok Video | text/image/video → video | 720p | 1-15s | 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3 |
+| `grok-video-3-15s` | Grok Video 15s | text/image → video | 720p | 15s | 2:3, 3:2, 1:1 |
+| `veo3.1-components-4k` | Veo 3.1 4K | text/image → video | 4k | 8s | 9:16, 16:9, 1:1 |
+| `veo3.1-components` | Veo 3.1 | text/image → video | 720p | 8s | 9:16, 16:9, 1:1 |
-#### Draft Generation Image Models (ai.draftGeneration.imageModels)
+### Draft Generation Image Models (ai.draftGeneration.imageModels)
| Model ID | Display Name | Supported Aspect Ratios | Max Input Images |
|----------|-------------|------------------------|-----------------|
| `gemini-3.1-flash-image-preview` | NanoBanana 2 | 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9 | 14 |
| `gemini-3-pro-image-preview` | NanoBanana Pro | Same as above | 14 |
-Pricing is per resolution (1K/2K/4K), all default to `0`.
-
-#### Agent Config
-
-| Config | Description | Source |
-|--------|-------------|--------|
-| `agent.baseUrl` | Agent API URL | Based on `OPENAI_BASE_URL` + `/messages`, supports proxy |
-| `agent.apiKey` | Agent API key | Env var `OPENAI_API_KEY` |
-
----
-
-### project/aitoearn-backend/apps/aitoearn-server/config/config.js
-
-Complete configuration for the backend service, mounted to `aitoearn-server:/app/config.js`.
-
-#### Basic Settings
-
-| Config | Description | Default / Source |
-|--------|-------------|-----------------|
-| `appDomain` | Application domain | Env var `APP_DOMAIN` |
-| `port` | Service listening port | `3002` |
-| `environment` | Runtime environment | Env var `NODE_ENV` |
-| `enableBadRequestDetails` | Return bad request error details | `true` |
-
-#### Auth, Logger, Database, Cache
-
-Same config structure as aitoearn-ai.config.js, read from environment variables.
-
-#### Platform Integration (channel)
-
-**channel.channelDb** — Separate database for platform data:
-
-| Config | Description | Default |
-|--------|-------------|---------|
-| `channelDb.uri` | MongoDB connection URI | Same as main database |
-| `channelDb.dbName` | Database name | `aitoearn_channel` |
-
-**channel.moreApi** — External platform APIs:
-
-| Config | Description | Default |
-|--------|-------------|---------|
-| `moreApi.platApiUri` | Platform API URL | `https://platapi.yikart.cn` |
-| `moreApi.xhsCreatorUri` | Xiaohongshu Creator API | `http://39.106.41.190:7008` |
-
-**channel.shortLink** — Short link service:
-
-| Config | Description | Default |
-|--------|-------------|---------|
-| `shortLink.baseUrl` | Short link base URL | `https://{APP_DOMAIN}/api/shortLink/` |
-
-**Platform OAuth Configuration** — OAuth callback URLs are auto-generated from `APP_DOMAIN`:
-
-| Platform | Callback URL Format | Special Config |
-|----------|-------------------|----------------|
-| Bilibili | `https://{APP_DOMAIN}/api/plat/bilibili/auth/back` | — |
-| Google | Handled via Google SDK | — |
-| Google Business | `https://{APP_DOMAIN}/api/plat/google-business/auth/callback` | Requires separate clientId/clientSecret |
-| Kwai | `https://{APP_DOMAIN}/api/plat/kwai/auth/back` | — |
-| Pinterest | `https://{APP_DOMAIN}/api/plat/pinterest/authWebhook` | `baseUrl`: `https://api.pinterest.com`, supports `test_authorization` |
-| TikTok | `https://{APP_DOMAIN}/api/plat/tiktok/auth/back` | Includes promotion callback and scopes |
-| Twitter | `https://{APP_DOMAIN}/api/plat/twitter/auth/back` | — |
-| Facebook | `https://{APP_DOMAIN}/api/plat/meta/auth/back` | Includes `configId` and scopes |
-| Threads | `https://{APP_DOMAIN}/api/plat/meta/auth/back` | Separate clientId/Secret, includes scopes |
-| Instagram | `https://{APP_DOMAIN}/api/plat/meta/auth/back` | Includes promotion callback and scopes |
-| LinkedIn | `https://{APP_DOMAIN}/api/plat/meta/auth/back` | Scopes: openid, profile, email, w_member_social |
-| WeChat | `https://{APP_DOMAIN}/platcallback` | Includes token and encodingAESKey |
-| YouTube | `https://{APP_DOMAIN}/api/plat/youtube/auth/callback` | — |
-| Douyin | `https://{APP_DOMAIN}/api/plat/douyin/auth/back` | — |
-
-#### Assets Storage
-
-Same as `assets` in the aitoearn-ai config.js. Both must be kept in sync. Can also be overridden via the `ASSETS_CONFIG` environment variable.
-
-#### Email Configuration (mail)
-
-| Config | Description | Default / Source |
-|--------|-------------|-----------------|
-| `mail.transport.host` | SMTP host | `email-smtp.ap-southeast-1.amazonaws.com` |
-| `mail.transport.port` | SMTP port | `587` |
-| `mail.transport.secure` | Use TLS | `false` (STARTTLS) |
-| `mail.transport.auth.user` | SMTP username | Env var `MAIL_USER` |
-| `mail.transport.auth.pass` | SMTP password | Env var `MAIL_PASS` |
-| `mail.defaults.from` | Default sender address | `[email protected]` |
-
-To switch email providers (e.g., SendGrid, Mailgun), modify the `mail.transport` host/port settings.
-
-#### Aliyun SMS (aliSms)
-
-| Config | Description | Source |
-|--------|-------------|--------|
-| `aliSms.accessKeyId` | Aliyun AccessKey ID | Env var `ALI_SMS_ACCESS_KEY_ID` |
-| `aliSms.accessKeySecret` | Aliyun AccessKey Secret | Env var `ALI_SMS_ACCESS_KEY_SECRET` |
-| `aliSms.signName` | SMS signature name | Env var `ALI_SMS_SIGN_NAME` |
-| `aliSms.templateCode` | SMS template code | Env var `ALI_SMS_TEMPLATE_CODE` |
-
-#### Inter-service Communication
-
-| Config | Description | Source |
-|--------|-------------|--------|
-| `aiClient.baseUrl` | URL to reach AI service | Env var `AI_URL` |
-| `aiClient.token` | Service communication token | Env var `INTERNAL_TOKEN` |
-
-## Common Commands
-
-```bash
-# Start all services
-docker compose up -d
-
-# Stop all services
-docker compose down
-
-# Check service status
-docker compose ps
-
-# View all logs
-docker compose logs -f
-
-# View specific service logs
-docker compose logs -f aitoearn-web
-docker compose logs -f aitoearn-server
-docker compose logs -f aitoearn-ai
-
-# Restart a single service
-docker compose restart aitoearn-server
-
-# Restart after editing config files
-docker compose restart aitoearn-ai aitoearn-server
-
-# Recreate services (after editing docker-compose.yml)
-docker compose down && docker compose up -d
-
-# Remove all data (dangerous!)
-docker compose down -v
-```
-
-## Data Persistence
-
-Data is persisted via Docker Volumes:
-
-| Volume | Description |
-|--------|-------------|
-| `mongodb-data` | MongoDB data files |
-| `mongodb-config` | MongoDB config files |
-| `redis-data` | Redis persistent data |
-| `rustfs-data` | RustFS object storage data |
-
-Stopping services (`docker compose down`) preserves data. Only `docker compose down -v` deletes volumes.
-
-## Production Deployment
-
-### HTTPS
-
-For production, add an HTTPS reverse proxy in front of Nginx (e.g., Caddy with automatic HTTPS, or Certbot + Nginx), or modify `nginx/nginx.conf` to add SSL:
-
-```bash
-# Option 1: Use Caddy (recommended, automatic HTTPS)
-# Replace the nginx service in docker-compose.yml with caddy
-
-# Option 2: Use Let's Encrypt
-# Mount certificates into the nginx container
-```
-
-### Security Recommendations
-
-1. **Change all default passwords and secrets in docker-compose.yml**
-2. Do not expose MongoDB (27017) and Redis (6379) ports in production
-3. Configure firewall to only allow ports 8080/443
-4. Regularly backup MongoDB data
-
-### Backup
-
-```bash
-# Backup MongoDB
-docker exec aitoearn-mongodb mongodump --uri="mongodb://admin:your-password@localhost:27017" --out=/dump
-docker cp aitoearn-mongodb:/dump ./backup/
-
-# Restore MongoDB
-docker cp ./backup/dump aitoearn-mongodb:/dump
-docker exec aitoearn-mongodb mongorestore --uri="mongodb://admin:your-password@localhost:27017" /dump
-```
-
-## FAQ
-
-### Q: How to build images from source?
-
-If you need to build Docker images from source (instead of using pre-built images), use the included build script:
-
-```bash
-bash scripts/build.sh
-```
-
-This script will:
-1. Build backend projects (aitoearn-server, aitoearn-ai) using Nx
-2. Build the frontend project (aitoearn-web) using its Dockerfile
-3. Tag all images as `aitoearn/*:latest`
-
-After building, start services normally with `docker compose up -d`.
-
-> Prerequisites: Node.js and pnpm must be installed, and `pnpm install` must have been run in `project/aitoearn-backend`.
-
-### Q: What are the config files for?
-
-Each application has its own config file in its `config/` subdirectory:
-
-- **project/aitoearn-backend/apps/aitoearn-ai/config/config.js**: Detailed AI service configuration including AI model definitions (available models, pricing), storage config, and Gemini settings
-- **project/aitoearn-backend/apps/aitoearn-server/config/config.js**: Backend service configuration including OAuth callback URL patterns, email transport settings, and storage config
-
-These files are mounted as read-only volumes. After editing, restart the relevant services: `docker compose restart aitoearn-ai aitoearn-server`
-
-### Q: How to add or change AI models?
-
-Edit the `ai.models` section in `project/aitoearn-backend/apps/aitoearn-ai/config/config.js` to modify the available model list, pricing, and model parameters. Then restart the AI service:
-
-```bash
-docker compose restart aitoearn-ai
-```
-
-### Q: Service fails to start, port already in use?
-
-Check if ports 8080, 27017, 6379 are occupied:
-
-```bash
-lsof -i :8080
-lsof -i :27017
-lsof -i :6379
-```
-
-### Q: Frontend loads but API requests fail?
-
-1. Check Nginx logs: `docker compose logs nginx`
-2. Check backend health: `docker compose ps`
-
-### Q: OAuth login callback fails?
-
-1. Ensure `APP_DOMAIN` in the `aitoearn-server` service of `docker-compose.yml` is set to your public domain (not localhost)
-2. Configure the correct callback URL in each platform's developer console
-3. Ensure your domain has valid HTTPS
-
-### Q: AI features not working?
-
-1. Verify `OPENAI_API_KEY` and `OPENAI_BASE_URL` are correctly configured in `docker-compose.yml`
-2. Recommended: deploy [new-api](https://github.com/Calcium-Ion/new-api) relay service to manage all AI models
-3. The default `sk-placeholder` is just a placeholder — no AI service will work until real keys are set
-4. AI model configuration is in `project/aitoearn-backend/apps/aitoearn-ai/config/config.js` — ensure model definitions match your API service
-
-### Q: How to update to the latest version?
-
-```bash
-docker compose pull
-docker compose down && docker compose up -d
-```
+Pricing is per resolution (1K/2K/4K), all default to `0` (free).
diff --git a/README.md b/README.md
index 02012c5f..84382b3f 100644
--- a/README.md
+++ b/README.md
@@ -1,338 +1,356 @@
-# [Aitoearn: The Best Open-Source AI Agent for Content Marketing](https://aitoearn.ai)
+# [Aitoearn:一人公司的AI内容营销智能体](https://aitoearn.ai)
<a href="https://trendshift.io/repositories/20785" target="_blank"><img src="https://trendshift.io/api/badge/repositories/20785" alt="yikart%2FAiToEarn | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
-![GitHub stars](https://img.shields.io/github/stars/yikart/AttAiToEarn?color=fa6470)
-![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)
-[![Required Node.JS 20.18.x](https://img.shields.io/static/v1?label=node\&message=20.18.x%20\&logo=node.js\&color=3f893e)](https://nodejs.org/about/releases)
+[![GitHub stars](https://img.shields.io/github/stars/yikart/AiToEarn?color=fa6470)](https://github.com/yikart/AiToEarn/stargazers)
+[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
+[![Required Node.JS 20.18.x](https://img.shields.io/static/v1?label=node&message=20.18.x&logo=node.js&color=3f893e)](https://nodejs.org/about/releases)
-English | [简体中文](README_CN.md)
+简体中文 | [English](README_EN.md)
+**Create · Publish · Engage · Monetize —— 一站式平台。**
+AiToEarn 通过 **AI 自动化**,帮助创作者、品牌与企业在全球主流平台上构建、分发并变现内容。
-**Create · Publish · Engage · Monetize — all in one platform.**
+支持渠道:
+抖音、小红书(Rednote)、视频号、快手、哔哩哔哩、微信公众号、TikTok、YouTube、Facebook、Instagram、Threads、Twitter(X)、Pinterest、LinkedIn
-AiToEarn helps creators, brands, and businesses build, distribute, and monetize content with **AI-powered automation** across the world’s most popular platforms.
+## 🚀 快速使用 AiToEarn(5 种方式)
-Supported Channels:
-Douyin, Xiaohongshu (Rednote), WeChat Channels, Kuaishou, Bilibili, WeChat Official Accounts,
-TikTok, YouTube, Facebook, Instagram, Threads, Twitter (X), Pinterest, LinkedIn
+| 方式 | 适合谁 | 需要部署吗 |
+|------|--------|-----------|
+| [① 打开网站直接用](#use-web) | 所有用户 | ❌ 不需要 |
+| [② 在龙虾 OpenClaw 中用](#use-in-openclaw) | 龙虾用户 | ❌ 不需要 |
+| [③ 在 Claude / Cursor 等 AI 助手中用](#use-in-claude) | AI 工具用户 | ❌ 不需要 |
+| [④ Docker 一键部署](#use-docker) | 想私有化部署的团队 | ✅ 需要服务器 |
+| [⑤ 源码开发](#use-source) | 开发者 | ✅ 需要开发环境 |
+
+> 💡 **方式 ②③④ 都需要先获取 API Key**,请先看 [如何获取 API Key](#get-api-key)。
## 🎥 Demo Video
+
<a href="https://youtu.be/y900LxIrZT4">
<img src="./presentation/display-1.5.2png.png" alt="Watch the video" width="480">
</a>
-
[![Watch the video](https://img.youtube.com/vi/5041jEKaiU8/0.jpg)](https://www.youtube.com/watch?v=5041jEKaiU8)
-## What's new:
-* 2025.02.07: [1.8.0 version](https://www.aitoearn.ai/), we introduced support for offline business scenarios, covering restaurants, retail stores, hotels and guesthouses, beauty and hair salons, gyms, and other types of physical businesses. This feature transforms offline promotional activities into executable online distribution tasks. Through content publishing and user participation mechanisms, it helps businesses gain more online exposure and in-store traffic.
-* 2025.01.06 : [1.5.3 version](https://www.aitoearn.ai/en), deal with lots of issue
-* 2025.12.15 : "All In Agent" arrives! We've introduced a super AI agent that can automatically generate and publish content, and help you operate AiToEarn. [v1.4.3](https://github.com/yikart/AiToEarn/releases/tag/v1.4.3)
+## 最新动态
-* 2025.11.28 : Support automatic updates within the application. Add a large number of AI functions to the creation interface, such as abbreviation, expansion, image creation, video creation, tag generation, etc., supporting Nano Banana Pro.[v1.4.0](https://github.com/yikart/AiToEarn/releases/tag/v1.4.0)
-* 2025.11.12 : The first open-source, fully usable version,[v1.3.2](https://github.com/yikart/AiToEarn/releases/tag/v1.3.2)
+- **2026-03-26**: [2.1 version](https://www.aitoearn.ai/) — 修复大量可用性问题;新增 OpenClaw(龙虾)支持,可在龙虾中直接使用 AiToEarn;新增 MCP 协议支持,可在 Claude、Cursor 等任何支持 MCP 的 Agent 或大模型中使用 AiToEarn。
+- **2025-02-07**: [1.8.0 version](https://www.aitoearn.ai/),新增线下商户推广解决方案,支持餐厅、零售店、民宿、美容美发、健身房等多种线下业态,将线下推广活动转化为可执行的线上传播任务,通过内容发布与用户参与机制,帮助门店获取更多线上曝光和到店流量。
+- **2025-01-06**: [1.5.3 version](https://www.aitoearn.ai/),修复大量已知问题
+- **2024-12-15**: "All In Agent" 的开始!我们加入了能够自动内容生成和发布以及一些帮助你操作 Aitoearn 的超级 AI 智能 Agent。[v1.4.3](https://github.com/yikart/AiToEarn/releases/tag/v1.4.3)
+- **2024-11-28**: 支持应用内自动更新。在创作界面新增大量 AI 功能,例如:缩写、扩写、图片生成、视频生成、标签生成等,并支持 Nano Banana Pro。[v1.4.0](https://github.com/yikart/AiToEarn/releases/tag/v1.4.0)
+- **2024-11-12**: 首个开源且可完全使用的版本。[v1.3.2](https://github.com/yikart/AiToEarn/releases/tag/v1.3.2)
<details>
- <summary><h2 style="display:inline;margin:0">Table of Contents</h2></summary>
-
- <br/>
-
- 1. [Quick Start for Creators (Apps & Web)](#quick-start-for-creators)
- 3. [Key Features](#key-features)
- 4. [Quick Start for Developers (Docker, Recommended)](#quick-start-for-developers-docker-recommended)
- 5. [MCP Service](#mcp-service)
- 7. [Contact](#contact)
- 9. [FAQ](#faq)
- 10. [Recommended](#recommended)
-</details>
-
-
-
-
-
-## [Quick Start for Creators](https://aitoearn.ai/)
-
-
-
-
+ <summary><h2 style="display:inline;margin:0">目录</h2></summary>
+ <br/>
+ 1. [快速使用 AiToEarn(5 种方式)](#-快速使用-aitoearn5-种方式)
+ 2. [如何获取 API Key](#get-api-key)
+ 3. [核心功能](#核心功能)
+ 4. [贡献指南](#贡献指南)
+ 5. [联系](#联系)
+ 6. [常见问题](#常见问题)
+ 7. [推荐](#推荐)
+</details>
+## [核心功能](https://aitoearn.ai/)
+🚀 **AiToEarn 是一个全链条的 AI 驱动内容增长与变现平台。**
-## Key Features
+从创意灵感,到多平台分发,再到数据分析与变现——AiToEarn 让你真正实现 **Create · Publish · Engage · Monetize**。
-🚀 **AiToEarn is a full-stack AI-powered content growth & monetization platform.**
-From creative ideas, to multi-channel publishing, to analytics & monetization — AiToEarn helps you truly **Create · Publish · Engage · Monetize.**
+### Agent —— 智能体
-### Agent — AI Assistant
-- **All In Agent**: Let the AI agent help you create and publish content, assisting you in operating AiToEarn.
+- **All In Agent**:让智能体帮你创作和发布,辅助你使用我们的 AiToEarn
<div style="display: flex; justify-content: space-around;">
<img src="presentation/agent_0.png" width="100%">
</div>
+### 1. 内容发布 —— 一键多平台
-### 1. Content Publishing — One-Click Multi-Platform
+- **全网分发**:覆盖最广的平台矩阵(Douyin、Kwai、WeChat Channels、WeChat Official Accounts、Bilibili、Rednote、Facebook、Instagram、TikTok、LinkedIn、Threads、YouTube、Pinterest、X(Twitter))。
+- **智能导入**:导入历史内容,快速二次编辑与再分发。
+ - 例如:一键将你的小红书内容同步到 YouTube。
+- **日历排期**:像排日程一样统一规划所有平台的内容。
-* **Distribute Everywhere**: Publish to the widest range of global platforms (Douyin, Kwai, WeChat Channels, WeChat Offical Account, Bilibili, Rednote, Facebook, Instagram, TikTok, LinkedIn, Threads, YouTube, Pinterest, x(Twitter)).
-* **Smart Import**: Import historical content for fast re-editing & redistribution.
-
- * Example: Sync your Xiaohongshu posts to YouTube in one click.
-* **Calendar Scheduler**: Plan & coordinate content like a calendar across all platforms.
<div style="display: flex; justify-content: space-around;">
- <img src="presentation/app-screenshot/1. content publish/calendar.jpeg" width="30%">
- <img src="presentation/app-screenshot/1. content publish/support_channels.jpeg" width="30%">
+ <img src="presentation/app-screenshot/1.%20content%20publish/calendar.jpeg" width="30%">
+ <img src="presentation/app-screenshot/1.%20content%20publish/support_channels.jpeg" width="30%">
</div>
-### 2. Content Hotspot — Viral Inspiration Engine
+### 2. 热点灵感 —— 爆款灵感引擎
+
+- **案例库**:浏览 1 万+ 点赞量级内容的创作方法。
+- **趋势雷达**:第一时间捕捉热点,缓解创作者焦虑。
-* **Case Library**: Explore how others create posts with 10,000+ likes.
-* **Trend Radar**: Discover the latest viral trends instantly, reduce creator anxiety.
<div style="display: flex; justify-content: space-around;">
- <img src="presentation/app-screenshot/2. content hotspot/hotspot.jpg" width="22%">
- <img src="presentation/app-screenshot/2. content hotspot/hotspot2.jpeg" width="22%">
- <img src="presentation/app-screenshot/2. content hotspot/hotspot3.jpeg" width="22%">
- <img src="presentation/app-screenshot/2. content hotspot/hotspot4.jpeg" width="22%">
+ <img src="presentation/app-screenshot/2.%20content%20hotspot/hotspot.jpg" width="22%">
+ <img src="presentation/app-screenshot/2.%20content%20hotspot/hotspot2.jpeg" width="22%">
+ <img src="presentation/app-screenshot/2.%20content%20hotspot/hotspot3.jpeg" width="22%">
+ <img src="presentation/app-screenshot/2.%20content%20hotspot/hotspot4.jpeg" width="22%">
</div>
-### 3. Content Search — Brand & Market Insights
+### 3. 内容搜索 —— 品牌与市场洞察
-* **Brand Monitoring**: Track conversations about your brand in real-time.
-* **Content Discovery**: Search for posts, topics, and communities for targeted engagement.
+- **品牌监测**:实时追踪关于你品牌的讨论。
+- **内容发现**:按主题、话题与社区检索,以更精准地参与互动。
-<div style="display:flex; justify-content:space-between; align-items:center;">
+<div style="display: flex; justify-content: space-between; align-items: center;">
<img src="presentation/app-screenshot/3.%20content%20search/contentsearch.gif" width="22%">
<img src="presentation/app-screenshot/3.%20content%20search/contentsearch1.jpeg" width="22%">
<img src="presentation/app-screenshot/3.%20content%20search/contentsearch2.jpeg" width="22%">
<img src="presentation/app-screenshot/3.%20content%20search/contentsearch4.jpeg" width="22%">
</div>
+### 4. 评论搜寻 —— 精准用户挖掘
-### 4. Comments Search — Precision User Mining
+- **智能评论检索**:识别"求链接""怎么购买"等高转化信号。
+- **转化加速器**:快速回复,驱动更高互动与销量。
-* **Smart Comment Search**: Detect high-conversion signals like “link please” or “how to buy.”
-* **Conversion Booster**: Reply instantly, drive higher engagement & sales.
- <div style="display:flex; justify-content:space-between; align-items:center;">
- <img src="presentation/app-screenshot/4. comments search/commentsearch.gif" width="30%">
- <img src="presentation/app-screenshot/4. comments search/commentfilter.jpeg" width="30%">
+<div style="display: flex; justify-content: space-between; align-items: center;">
+ <img src="presentation/app-screenshot/4.%20comments%20search/commentsearch.gif" width="30%">
+ <img src="presentation/app-screenshot/4.%20comments%20search/commentfilter.jpeg" width="30%">
</div>
-### 5. Content Engagement — Growth Engine
+### 5. 互动运营 —— 增长引擎
-* **Unified Dashboard**: Manage all interactions in one place.
-* **Proactive Engagement**: Join trending conversations, connect with potential customers.
-* Turn **passive operations** into **active traffic growth.**
+- **统一工作台**:在一个界面管理全部互动。
+- **主动参与**:跟进热点话题,连接潜在用户。
- <div style="display:flex; justify-content:space-between; align-items:center;">
- <img src="presentation/app-screenshot/5. content engagement/commentfilter2.jpeg" width="30%">
+将**被动运营**转变为**主动引流**。
+
+<div style="display: flex; justify-content: space-between; align-items: center;">
+ <img src="presentation/app-screenshot/5.%20content%20engagement/commentfilter2.jpeg" width="30%">
</div>
-### 6. Content Analytics — Full-Funnel Data
+### 6. 数据分析 —— 全链路漏斗
-* **Cross-Platform Comparison**: One platform may block traffic, but others won’t.
-* **End-to-End Monitoring**: Track performance and build your path to 1M+ followers.
+- **跨平台对比**:某个平台限流?其他平台一样能打。
+- **端到端监控**:追踪表现,构建通往 100 万+ 粉丝的路线图。
-<img src="./presentation/data_center.png" alt="post" width="500"/>
+<img src="./presentation/data_center.png" alt="数据中心" width="500">
-### 7. (Coming Soon) AI Content Creation — End-to-End Assistant
+### 7.(即将推出)AI 内容创作 —— 端到端助手
-* **AI Copywriting**: Auto-generate titles, captions & descriptions.
-* **AI Commenting**: Engage proactively, attract traffic.
-* **Image & Card Generator**: Speed up content workflows.
-* **Supported AI Video Models**: Seedance, Kling, Hailuo, Veo, Medjourney, Sora, Pika, Runway.
-* **Supported AI Image Models**: GPT, Flux.
-* **Next**: Tag generator, smart DMs, video editing, AI avatars, translation for global distribution.
+- **AI 文案**:自动生成标题、文案与描述。
+- **AI 评论**:主动互动,吸引流量。
+- **图片与卡片生成**:加速内容工作流。
+- **支持的视频模型**:Seedance、Kling、海螺(Hailuo)、Veo、Midjourney、Sora、Pika、Runway。
+- **支持的图像模型**:GPT、Flux。
+- **下一步**:标签生成、智能私信、视频剪辑、AI 数字人、全球分发多语种翻译等。
+### 8.(即将推出)内容交易市场 —— 创作即变现
-### 8. (Coming Soon) Content Marketplace — Trade & Monetize
+- **创作者**:直接出售你的内容,高效找到买家。
+- **品牌方**:即买即用的优质内容资源。
+- **AI 驱动增长**:
-* **Creators**: Sell your content directly, find buyers fast.
-* **Brands**: Purchase ready-made, high-quality content.
-* **AI-Powered Growth**:
- **Let’s use AI to earn. Let’s earn money together!**
+**让我们用 AI 赚钱,一起赚!**
-## Quick Start for Developers (Docker, Recommended)
+---
-This is the easiest way to run AiToEarn. It will start the **frontend, backend, MongoDB and Redis** with one command.
-You **do NOT** need to install MongoDB or Redis on your machine manually.
+<h2 id="use-web">① 打开网站直接用</h2>
-```bash
-git clone https://github.com/yikart/AiToEarn.git
-cd AiToEarn
-docker compose up -d
-```
+最简单的方式,打开浏览器即可使用,无需任何配置:
+- 🇨🇳 中国用户访问:**[aitoearn.cn](https://aitoearn.cn/)**
+- 🌍 国际用户访问:**[aitoearn.ai](https://aitoearn.ai/)**
-### 🌐 Access Applications
+---
-After Docker starts successfully, you can access services at:
+<h2 id="get-api-key">🔑 如何获取 API Key(后续步骤的前置条件)</h2>
-| Service | URL | Description |
-| -------------------- | ------------------------------------------------ | ------------------------------------ |
-| **Web Frontend** | [http://localhost:8080](http://localhost:8080) | Web user interface (via Nginx) |
-| **Backend API** | [http://localhost:8080/api](http://localhost:8080/api) | AiToEarn backend API (via Nginx) |
-| **RustFS Console** | [http://localhost:9001](http://localhost:9001) | Object storage management console |
-| **MongoDB** | localhost:27017 | MongoDB database |
-| **Redis** | localhost:6379 | Redis cache |
+> 以下的方式 ②③④ 都需要 API Key。只需获取一次,所有方式通用。
-> ℹ️ All services (MongoDB, Redis, RustFS, Nginx, etc.) are started by `docker compose`. No extra local installation is required.
+**3 步获取**:
+1. 打开 [aitoearn.cn](https://aitoearn.cn/)(中国用户)或 [aitoearn.ai](https://aitoearn.ai/)(国际用户),注册并登录
+2. 点击左侧菜单 **设置**
+3. 在 **API Key** 中点击创建,复制生成的 Key
-### 🧩 Advanced Configuration
+<img src="app-screenshot/0.%20api-key/b4d316c4-300c-4935-a8ef-801eb18f436d.png" alt="获取 API Key" width="600">
-All service configurations (passwords, API keys, domain settings, etc.) are managed directly in `docker-compose.yml` and the config files under the `config/` directory.
+> ⚠️ 请妥善保管你的 API Key,不要泄露给他人。
-For detailed deployment instructions, see [DOCKER_DEPLOYMENT_EN.md](DOCKER_DEPLOYMENT_EN.md).
+---
+<h2 id="use-in-openclaw">② 在龙虾 OpenClaw 中使用</h2>
+> 前置条件:已 [获取 API Key](#get-api-key)
-<details>
-<summary>🧪 Optional: Run backend & frontend manually (dev mode)</summary>
+只需一步——把下面这句话发给龙虾,把 `你的API-Key` 替换成你自己的:
-This mode is mainly for local development & debugging.
-You can still use Docker for MongoDB/Redis, or configure your own services in the config files.
+> 使用 mcporter 帮我安装这个 MCP 服务:`https://aitoearn.ai/api/unified/mcp`,认证 header 是 `x-api-key: 你的API-Key`
-#### 1. Start the backend services
+龙虾会自动完成安装。之后你就可以直接对龙虾说"帮我发一条小红书"之类的指令了。
-```bash
-cd project/aitoearn-backend
-pnpm install
-# Copy config files for local development
-cp apps/aitoearn-ai/config/config.js apps/aitoearn-ai/config/local.config.js
-cp apps/aitoearn-server/config/config.js apps/aitoearn-server/config/local.config.js
-pnpm nx serve aitoearn-ai
-# in another terminal
-pnpm nx serve aitoearn-server
-```
+---
-#### 2. Start the frontend `aitoearn-web`
+<h2 id="use-in-claude">③ 在 Claude / Cursor / 其他 AI 助手中使用</h2>
-```bash
-pnpm install
-pnpm run dev
-```
+> 前置条件:已 [获取 API Key](#get-api-key)
-</details>
+AiToEarn 支持所有兼容 MCP 协议的 AI 助手。以下是常见工具的配置方式:
+
+<details open>
+<summary><b>Claude Desktop</b></summary>
+找到并编辑 `claude_desktop_config.json`,添加:
+
+```json
+{
+ "mcpServers": {
+ "aitoearn": {
+ "type": "http",
+ "url": "https://aitoearn.ai/api/unified/mcp",
+ "headers": {
+ "x-api-key": "你的API-Key"
+ }
+ }
+ }
+}
+```
+</details>
<details>
-<summary>🖥️ Optional: Start Electron desktop project</summary>
+<summary><b>Cursor</b></summary>
-```bash
-# Clone the repo
-git clone https://github.com/yikart/AttAiToEarn.git
+在 Cursor 的 MCP 设置中添加:
-# Enter directory
-cd AttAiToEarn
+```
+MCP 地址:https://aitoearn.ai/api/unified/mcp
+认证 Header:x-api-key: 你的API-Key
+```
-# Install dependencies
-npm i
+</details>
-# Compile sqlite (better-sqlite3 requires node-gyp and local Python)
-npm run rebuild
+<details>
+<summary><b>其他 AI 助手(通用配置)</b></summary>
-# Start development
-npm run dev
-```
+任何支持 MCP 协议的工具,只需要两个信息:
-The Electron project provides a desktop client for AiToEarn.
+| 配置项 | 值 |
+|--------|------|
+| **MCP 地址** | `https://aitoearn.ai/api/unified/mcp` |
+| **认证 Header** | `x-api-key: 你的API-Key` |
+
+也支持 SSE 长连接方式:`https://aitoearn.ai/api/unified/sse`
</details>
-## MCP Service
+> 💡 如果你是自部署用户,将 `aitoearn.ai` 替换为你自己的地址(如 `localhost:8080`)。
-AiToEarn provides MCP (Model Context Protocol) server endpoints that allow AI assistants (such as Claude, Cursor, etc.) to interact with your AiToEarn instance programmatically — including publishing content, managing accounts, and more.
+---
-### Endpoints
+<h2 id="use-docker">④ Docker 一键部署</h2>
-AiToEarn exposes two MCP transport protocols:
+> 前置条件:已安装 [Docker](https://docs.docker.com/get-docker/)
-| Transport | Endpoint | Description |
-|-----------|----------|-------------|
-| **HTTP** | `{baseUrl}/api/unified/mcp` | Recommended. Stateless HTTP-based MCP transport |
-| **SSE** | `{baseUrl}/api/unified/sse` | Server-Sent Events transport for long-lived connections |
+适合想把 AiToEarn 部署在自己服务器上的团队。3 条命令搞定,无需手动安装数据库:
-### Quick Setup
+```bash
+git clone https://github.com/yikart/AiToEarn.git
+cd AiToEarn
+docker compose up -d
+```
-1. Go to **Settings → API Key** in the AiToEarn web interface and create an API Key.
-2. Configure your AI assistant's MCP client to connect to one of the endpoints above, passing your API Key via the `x-api-key` header.
+启动后打开 **[http://localhost:8080](http://localhost:8080)** 即可使用。
-**Example for Claude Desktop** (`claude_desktop_config.json`):
+#### 配置 Relay(强烈推荐)
-```json
-{
- "mcpServers": {
- "aitoearn": {
- "type": "http",
- "url": "https://aitoearn.ai/api/unified/mcp",
- "headers": {
- "x-api-key": "your-api-key"
- }
- }
- }
-}
+> **为什么要配 Relay?** 发布内容需要登录社交媒体账号(抖音、小红书、TikTok 等),而这些平台的 OAuth 登录需要开发者凭据。配置 Relay 后,你可以直接借用官方 aitoearn.ai 的凭据完成授权,**不需要自己去各平台申请开发者账号**。
+
+在 `docker-compose.yml` 的 `aitoearn-server` 服务中添加(API Key 获取方式见 [上方说明](#get-api-key)):
+
+```yaml
+RELAY_SERVER_URL: https://aitoearn.ai/api
+RELAY_API_KEY: 你的API-Key
+RELAY_CALLBACK_URL: http://127.0.0.1:8080/api/plat/relay-callback
```
-> For self-hosted instances, replace the URL with your own (e.g., `http://localhost:8080/api/unified/mcp`).
+然后重启:`docker compose restart aitoearn-server`
+
+> 📖 完整部署指南(生产环境配置、AI 服务、OAuth、存储等)请参阅 [DOCKER_DEPLOYMENT_CN.md](DOCKER_DEPLOYMENT_CN.md)。
-**Example for OpenClaw**:
+---
-**Method 1**: Send the following message to OpenClaw:
+<h2 id="use-source">⑤ 源码开发</h2>
-> Help me use mcporter to install this MCP server: `https://aitoearn.ai/api/unified/mcp`, authentication header is `x-api-key: your-api-key`
+<details>
+<summary>🧪 手动运行后端和前端(开发模式)</summary>
-OpenClaw will handle the rest automatically.
+此模式主要用于本地开发和调试。
+您仍然可以使用 Docker 运行 MongoDB/Redis,或在配置文件中指向您自己的服务。
-**Method 2**: Install via [mcporter](https://github.com/steipete/mcporter):
+#### 1. 启动后端服务
```bash
-npm install -g mcporter
-mcporter config add aitoearn --url "https://aitoearn.ai/api/unified/mcp" --header "x-api-key=your-api-key"
+cd project/aitoearn-backend
+pnpm install
+# 复制配置文件用于本地开发
+cp apps/aitoearn-ai/config/config.js apps/aitoearn-ai/config/local.config.js
+cp apps/aitoearn-server/config/config.js apps/aitoearn-server/config/local.config.js
+pnpm nx serve aitoearn-ai
+# 在另一个终端
+pnpm nx serve aitoearn-server
```
-## Relay Service
+#### 2. 启动前端 `aitoearn-web`
-Relay enables self-hosted AiToEarn instances to connect social media platform accounts via the official AiToEarn relay server (`https://aitoearn.ai`), without needing to configure OAuth credentials for each platform yourself.
+```bash
+pnpm install
+pnpm run dev
+```
-### How It Works
+</details>
-1. Your self-hosted instance sends OAuth requests through the relay server.
-2. Users authorize on the platform via the relay server's OAuth credentials.
-3. The relay server forwards the authorization result back to your instance via the callback URL.
+<details>
+<summary>🖥️ 启动 Electron 桌面项目</summary>
-### Setup
+```bash
+# 克隆仓库
+git clone https://github.com/yikart/AttAiToEarn.git
-1. Go to **Settings → API Key** on [https://aitoearn.ai](https://aitoearn.ai) and create an API Key.
-2. Configure the following environment variables in your `docker-compose.yml` under the `aitoearn-server` service:
+# 进入目录
+cd AttAiToEarn
-```yaml
-RELAY_SERVER_URL: https://aitoearn.ai/api
-RELAY_API_KEY: your-api-key
-RELAY_CALLBACK_URL: http://127.0.0.1:8080/api/plat/relay-callback
-```
+# 安装依赖
+npm install
+
+# 编译 sqlite(better-sqlite3 需要 node-gyp 和本地 Python)
+npm run rebuild
-3. Restart the service: `docker compose restart aitoearn-server`
+# 启动开发
+npm run dev
+```
-## Contact
-https://t.me/harryyyy2025
+Electron 项目为 AiToEarn 提供桌面客户端。
+</details>
-## [FAQ](https://heovzp8pm4.feishu.cn/wiki/UksHwxdFai45SvkLf0ycblwRnTc?from=from_copylink)
+## 贡献指南
+请查看 [贡献指南](./CONTRIBUTING.md) 开始参与。
-## Recommended
+## 联系
-* [https://github.com/TMElyralab/MuseTalk](https://github.com/TMElyralab/MuseTalk)
-* [https://github.com/5ime/video\_spider](https://github.com/5ime/video_spider)
-* [https://github.com/FunAudioLLM/CosyVoice?tab=readme-ov-file](https://github.com/FunAudioLLM/CosyVoice?tab=readme-ov-file)
-* [https://github.com/facefusion/facefusion](https://github.com/facefusion/facefusion)
-* [https://github.com/linyqh/NarratoAI](https://github.com/linyqh/NarratoAI)
-* [https://github.com/harry0703/MoneyPrinterTurbo](https://github.com/harry0703/MoneyPrinterTurbo)
+- Telegram: [https://t.me/harryyyy2025](https://t.me/harryyyy2025)
+## [常见问题](https://heovzp8pm4.feishu.cn/wiki/UksHwxdFai45SvkLf0ycblwRnTc?from=from_copylink)
+## 推荐
+- [MuseTalk](https://github.com/TMElyralab/MuseTalk)
+- [video_spider](https://github.com/5ime/video_spider)
+- [CosyVoice](https://github.com/FunAudioLLM/CosyVoice?tab=readme-ov-file)
+- [facefusion](https://github.com/facefusion/facefusion)
+- [NarratoAI](https://github.com/linyqh/NarratoAI)
+- [MoneyPrinterTurbo](https://github.com/harry0703/MoneyPrinterTurbo)
diff --git a/README_CN.md b/README_CN.md
deleted file mode 100644
index dbda6cd3..00000000
--- a/README_CN.md
+++ /dev/null
@@ -1,335 +0,0 @@
-
-# Aitoearn:一人公司的AI内容营销智能体
-<a href="https://trendshift.io/repositories/20785" target="_blank"><img src="https://trendshift.io/api/badge/repositories/20785" alt="yikart%2FAiToEarn | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
-
-[![GitHub stars](https://img.shields.io/github/stars/yikart/AttAiToEarn?color=fa6470)](https://github.com/yikart/AttAiToEarn/stargazers)
-[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
-[![Required Node.JS 20.18.x](https://img.shields.io/static/v1?label=node&message=20.18.x&logo=node.js&color=3f893e)](https://nodejs.org/about/releases)
-
-[English](README.md) | 简体中文
-
-**Create · Publish · Engage · Monetize —— 一站式平台。**
-
-AiToEarn 通过 **AI 自动化**,帮助创作者、品牌与企业在全球主流平台上构建、分发并变现内容。
-
-支持渠道:
-抖音、小红书(Rednote)、视频号、快手、哔哩哔哩、微信公众号、TikTok、YouTube、Facebook、Instagram、Threads、Twitter(X)、Pinterest、LinkedIn
-
-我们预计会在2026年4月份发布全新版本。
-
-## 🎥 Demo Video
-
-<a href="https://youtu.be/y900LxIrZT4">
- <img src="./presentation/display-1.5.2png.png" alt="Watch the video" width="480">
-</a>
-
-[![Watch the video](https://img.youtube.com/vi/5041jEKaiU8/0.jpg)](https://www.youtube.com/watch?v=5041jEKaiU8)
-
-## 最新动态
-
-- **2025-02-07**: [1.8.0 version](https://www.aitoearn.ai/),新增线下商户推广解决方案,支持餐厅、零售店、民宿、美容美发、健身房等多种线下业态,将线下推广活动转化为可执行的线上传播任务,通过内容发布与用户参与机制,帮助门店获取更多线上曝光和到店流量。
-- **2025-01-06**: [1.5.3 version](https://www.aitoearn.ai/),修复大量已知问题
-- **2024-12-15**: "All In Agent" 的开始!我们加入了能够自动内容生成和发布以及一些帮助你操作 Aitoearn 的超级 AI 智能 Agent。[v1.4.3](https://github.com/yikart/AiToEarn/releases/tag/v1.4.3)
-- **2024-11-28**: 支持应用内自动更新。在创作界面新增大量 AI 功能,例如:缩写、扩写、图片生成、视频生成、标签生成等,并支持 Nano Banana Pro。[v1.4.0](https://github.com/yikart/AiToEarn/releases/tag/v1.4.0)
-- **2024-11-12**: 首个开源且可完全使用的版本。[v1.3.2](https://github.com/yikart/AiToEarn/releases/tag/v1.3.2)
-
-
-
-<details>
- <summary><h2 style="display:inline;margin:0">目录</h2></summary>
-
- <br/>
-
- 1. [中小企业快速开始](#中小企业快速开始)
- 3. [开发者快速开始(Docker,推荐)](#开发者快速开始docker推荐)
- 4. [MCP 服务](#mcp-服务)
- 7. [联系](#联系)
- 9. [常见问题](#常见问题)
- 10. [推荐](#推荐)
-</details>
-
-
-## [中小企业快速开始](https://aitoearn.ai/en/)
-
-🚀 **AiToEarn 是一个全链条的 AI 驱动内容增长与变现平台。**
-
-从创意灵感,到多平台分发,再到数据分析与变现——AiToEarn 让你真正实现 **Create · Publish · Engage · Monetize**。
-
-### Agent —— 智能体
-
-- **All In Agent**:让智能体帮你创作和发布,辅助你使用我们的 AiToEarn
-
-<div style="display: flex; justify-content: space-around;">
- <img src="presentation/agent_0.png" width="100%">
-</div>
-
-### 1. 内容发布 —— 一键多平台
-
-- **全网分发**:覆盖最广的平台矩阵(Douyin、Kwai、WeChat Channels、WeChat Official Accounts、Bilibili、Rednote、Facebook、Instagram、TikTok、LinkedIn、Threads、YouTube、Pinterest、X(Twitter))。
-- **智能导入**:导入历史内容,快速二次编辑与再分发。
- - 例如:一键将你的小红书内容同步到 YouTube。
-- **日历排期**:像排日程一样统一规划所有平台的内容。
-
-<div style="display: flex; justify-content: space-around;">
- <img src="presentation/app-screenshot/1.%20content%20publish/calendar.jpeg" width="30%">
- <img src="presentation/app-screenshot/1.%20content%20publish/support_channels.jpeg" width="30%">
-</div>
-
-### 2. 热点灵感 —— 爆款灵感引擎
-
-- **案例库**:浏览 1 万+ 点赞量级内容的创作方法。
-- **趋势雷达**:第一时间捕捉热点,缓解创作者焦虑。
-
-<div style="display: flex; justify-content: space-around;">
- <img src="presentation/app-screenshot/2.%20content%20hotspot/hotspot.jpg" width="22%">
- <img src="presentation/app-screenshot/2.%20content%20hotspot/hotspot2.jpeg" width="22%">
- <img src="presentation/app-screenshot/2.%20content%20hotspot/hotspot3.jpeg" width="22%">
- <img src="presentation/app-screenshot/2.%20content%20hotspot/hotspot4.jpeg" width="22%">
-</div>
-
-### 3. 内容搜索 —— 品牌与市场洞察
-
-- **品牌监测**:实时追踪关于你品牌的讨论。
-- **内容发现**:按主题、话题与社区检索,以更精准地参与互动。
-
-<div style="display: flex; justify-content: space-between; align-items: center;">
- <img src="presentation/app-screenshot/3.%20content%20search/contentsearch.gif" width="22%">
- <img src="presentation/app-screenshot/3.%20content%20search/contentsearch1.jpeg" width="22%">
- <img src="presentation/app-screenshot/3.%20content%20search/contentsearch2.jpeg" width="22%">
- <img src="presentation/app-screenshot/3.%20content%20search/contentsearch4.jpeg" width="22%">
-</div>
-
-### 4. 评论搜寻 —— 精准用户挖掘
-
-- **智能评论检索**:识别"求链接""怎么购买"等高转化信号。
-- **转化加速器**:快速回复,驱动更高互动与销量。
-
-<div style="display: flex; justify-content: space-between; align-items: center;">
- <img src="presentation/app-screenshot/4.%20comments%20search/commentsearch.gif" width="30%">
- <img src="presentation/app-screenshot/4.%20comments%20search/commentfilter.jpeg" width="30%">
-</div>
-
-### 5. 互动运营 —— 增长引擎
-
-- **统一工作台**:在一个界面管理全部互动。
-- **主动参与**:跟进热点话题,连接潜在用户。
-
-将**被动运营**转变为**主动引流**。
-
-<div style="display: flex; justify-content: space-between; align-items: center;">
- <img src="presentation/app-screenshot/5.%20content%20engagement/commentfilter2.jpeg" width="30%">
-</div>
-
-### 6. 数据分析 —— 全链路漏斗
-
-- **跨平台对比**:某个平台限流?其他平台一样能打。
-- **端到端监控**:追踪表现,构建通往 100 万+ 粉丝的路线图。
-
-<img src="./presentation/data_center.png" alt="数据中心" width="500">
-
-### 7.(即将推出)AI 内容创作 —— 端到端助手
-
-- **AI 文案**:自动生成标题、文案与描述。
-- **AI 评论**:主动互动,吸引流量。
-- **图片与卡片生成**:加速内容工作流。
-- **支持的视频模型**:Seedance、Kling、海螺(Hailuo)、Veo、Midjourney、Sora、Pika、Runway。
-- **支持的图像模型**:GPT、Flux。
-- **下一步**:标签生成、智能私信、视频剪辑、AI 数字人、全球分发多语种翻译等。
-
-### 8.(即将推出)内容交易市场 —— 创作即变现
-
-- **创作者**:直接出售你的内容,高效找到买家。
-- **品牌方**:即买即用的优质内容资源。
-- **AI 驱动增长**:
-
-**让我们用 AI 赚钱,一起赚!**
-
-## 开发者快速开始(Docker,推荐)
-
-这是运行 AiToEarn 最简单的方式。它将通过一条命令启动**前端、后端、MongoDB 和 Redis**。
-您**无需**在机器上手动安装 MongoDB 或 Redis。
-
-```bash
-git clone https://github.com/yikart/AiToEarn.git
-cd AiToEarn
-docker compose up -d
-```
-
-### 🌐 访问应用
-
-Docker 成功启动后,您可以通过以下地址访问服务:
-
-| 服务 | URL | 描述 |
-|------|-----|------|
-| **Web 前端** | [http://localhost:8080](http://localhost:8080) | Web 用户界面(通过 Nginx) |
-| **后端 API** | [http://localhost:8080/api](http://localhost:8080/api) | AiToEarn 后端 API(通过 Nginx) |
-| **RustFS 控制台** | [http://localhost:9001](http://localhost:9001) | 对象存储管理控制台 |
-| **MongoDB** | `localhost:27017` | MongoDB 数据库 |
-| **Redis** | `localhost:6379` | Redis 缓存 |
-
-> ℹ️ 所有服务(MongoDB、Redis、RustFS、Nginx 等)均由 `docker compose` 启动,无需额外的本地安装。
-
-### 🧩 高级配置
-
-所有服务配置(密码、API 密钥、域名设置等)直接在 `docker-compose.yml` 和 `config/` 目录下的配置文件中管理。
-
-详细部署说明请参阅 [DOCKER_DEPLOYMENT_CN.md](DOCKER_DEPLOYMENT_CN.md)。
-
-<details>
-<summary>🧪 可选:手动运行后端和前端(开发模式)</summary>
-
-此模式主要用于本地开发和调试。
-您仍然可以使用 Docker 运行 MongoDB/Redis,或在配置文件中指向您自己的服务。
-
-#### 1. 启动后端服务
-
-```bash
-cd project/aitoearn-backend
-pnpm install
-# 复制配置文件用于本地开发
-cp apps/aitoearn-ai/config/config.js apps/aitoearn-ai/config/local.config.js
-cp apps/aitoearn-server/config/config.js apps/aitoearn-server/config/local.config.js
-pnpm nx serve aitoearn-ai
-# 在另一个终端
-pnpm nx serve aitoearn-server
-```
-
-#### 2. 启动前端 `aitoearn-web`
-
-```bash
-pnpm install
-pnpm run dev
-```
-
-</details>
-
-<details>
-<summary>🖥️ 可选:启动 Electron 桌面项目</summary>
-
-```bash
-# 克隆仓库
-git clone https://github.com/yikart/AttAiToEarn.git
-
-# 进入目录
-cd AttAiToEarn
-
-# 安装依赖
-npm install
-
-# 编译 sqlite(better-sqlite3 需要 node-gyp 和本地 Python)
-npm run rebuild
-
-# 启动开发
-npm run dev
-```
-
-Electron 项目为 AiToEarn 提供桌面客户端。
-
-</details>
-
-## 核心功能
-
-(此处可补充核心功能概述或保持链接锚点)
-
-## MCP 服务
-
-AiToEarn 提供 MCP(Model Context Protocol)服务端点,让 AI 助手(如 Claude、Cursor 等)能够以编程方式与您的 AiToEarn 实例交互——包括发布内容、管理账号等。
-
-### 端点
-
-AiToEarn 支持两种 MCP 传输协议:
-
-| 传输方式 | 端点 | 说明 |
-|---------|------|------|
-| **HTTP** | `{baseUrl}/api/unified/mcp` | 推荐。基于 HTTP 的无状态 MCP 传输 |
-| **SSE** | `{baseUrl}/api/unified/sse` | 基于 Server-Sent Events 的长连接传输 |
-
-### 快速配置
-
-1. 在 AiToEarn Web 界面中进入 **设置 → API Key**,创建一个 API Key。
-2. 在你的 AI 助手中配置 MCP 客户端连接到上述端点,通过 `x-api-key` header 传入你的 API Key。
-
-**以 Claude Desktop 为例**(`claude_desktop_config.json`):
-
-```json
-{
- "mcpServers": {
- "aitoearn": {
- "type": "http",
- "url": "https://aitoearn.ai/api/unified/mcp",
- "headers": {
- "x-api-key": "你的API-Key"
- }
- }
- }
-}
-```
-
-> 如果是自部署实例,将 URL 替换为你自己的地址(如 `http://localhost:8080/api/unified/mcp`)。
-
-**OpenClaw(龙虾)配置示例**:
-
-**方式一**:发送以下消息给龙虾:
-
-> 使用 mcporter 帮我安装这个 MCP 服务:`https://aitoearn.ai/api/unified/mcp`,认证 header 是 `x-api-key: 你的API-Key`
-
-龙虾会自动完成安装配置。
-
-**方式二**:通过 [mcporter](https://github.com/steipete/mcporter) 安装:
-
-```bash
-npm install -g mcporter
-mcporter config add aitoearn --url "https://aitoearn.ai/api/unified/mcp" --header "x-api-key=你的API-Key"
-```
-
-## Relay 中继服务
-
-Relay 允许自部署的 AiToEarn 实例通过官方中继服务器(`https://aitoearn.ai`)连接社交媒体平台账号,无需自行配置各平台的 OAuth 凭据。
-
-### 工作原理
-
-1. 您的自部署实例通过中继服务器发送 OAuth 请求。
-2. 用户通过中继服务器的 OAuth 凭据在平台上授权。
-3. 中继服务器通过回调 URL 将授权结果转发回您的实例。
-
-### 配置步骤
-
-1. 在 [https://aitoearn.ai](https://aitoearn.ai) 的 **设置 → API Key** 中创建一个 API Key。
-2. 在 `docker-compose.yml` 的 `aitoearn-server` 服务中配置以下环境变量:
-
-```yaml
-RELAY_SERVER_URL: https://aitoearn.ai/api
-RELAY_API_KEY: 你的API-Key
-RELAY_CALLBACK_URL: http://127.0.0.1:8080/api/plat/relay-callback
-```
-
-3. 重启服务:`docker compose restart aitoearn-server`
-
-## 高级设置
-
-AiToEarn 集成了多种官方 API。以下是开发者密钥配置指南:
-
-- [B 站(Bilibili)](./aitoearn_web/CHANNEL_Md/BILIBILI.md)
-- [微信公众号(WeChat Official Accounts)](./aitoearn_web/CHANNEL_Md/WXPLAT.md)
-
-## 贡献指南
-
-请查看 [贡献指南](./aitoearn_web/CONTRIBUTING.md) 开始参与。
-
-## 联系
-
-- Telegram: [https://t.me/harryyyy2025](https://t.me/harryyyy2025)
-
-
-
-## [常见问题](https://heovzp8pm4.feishu.cn/wiki/UksHwxdFai45SvkLf0ycblwRnTc?from=from_copylink)
-
-
-## 推荐
-
-- [MuseTalk](https://github.com/TMElyralab/MuseTalk)
-- [video_spider](https://github.com/5ime/video_spider)
-- [CosyVoice](https://github.com/FunAudioLLM/CosyVoice?tab=readme-ov-file)
-- [facefusion](https://github.com/facefusion/facefusion)
-- [NarratoAI](https://github.com/linyqh/NarratoAI)
-- [MoneyPrinterTurbo](https://github.com/harry0703/MoneyPrinterTurbo)
diff --git a/README_EN.md b/README_EN.md
new file mode 100644
index 00000000..d3475b48
--- /dev/null
+++ b/README_EN.md
@@ -0,0 +1,341 @@
+
+# [Aitoearn: The Best Open-Source AI Agent for Content Marketing](https://aitoearn.ai)
+
+<a href="https://trendshift.io/repositories/20785" target="_blank"><img src="https://trendshift.io/api/badge/repositories/20785" alt="yikart%2FAiToEarn | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
+
+[![GitHub stars](https://img.shields.io/github/stars/yikart/AiToEarn?color=fa6470)](https://github.com/yikart/AiToEarn/stargazers)
+[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
+[![Required Node.JS 20.18.x](https://img.shields.io/static/v1?label=node&message=20.18.x%20&logo=node.js&color=3f893e)](https://nodejs.org/about/releases)
+
+English | [简体中文](README.md)
+
+**Create · Publish · Engage · Monetize — all in one platform.**
+
+AiToEarn helps creators, brands, and businesses build, distribute, and monetize content with **AI-powered automation** across the world's most popular platforms.
+
+Supported Channels:
+Douyin, Xiaohongshu (Rednote), WeChat Channels, Kuaishou, Bilibili, WeChat Official Accounts,
+TikTok, YouTube, Facebook, Instagram, Threads, Twitter (X), Pinterest, LinkedIn
+
+## 🚀 Quick Start with AiToEarn (5 Ways)
+
+| Option | Best for | Deployment needed? |
+|--------|----------|-------------------|
+| [① Use the Website](#use-web) | Everyone | ❌ No |
+| [② Use in OpenClaw](#use-in-openclaw) | OpenClaw users | ❌ No |
+| [③ Use in Claude / Cursor / Other AI Assistants](#use-in-claude) | AI tool users | ❌ No |
+| [④ Docker One-Click Deploy](#use-docker) | Teams wanting self-hosted | ✅ Server needed |
+| [⑤ Build from Source](#use-source) | Developers | ✅ Dev environment needed |
+
+> 💡 **Options ②③④ require an API Key first.** See [How to Get an API Key](#get-api-key).
+
+## 🎥 Demo Video
+<a href="https://youtu.be/y900LxIrZT4">
+ <img src="./presentation/display-1.5.2png.png" alt="Watch the video" width="480">
+</a>
+
+[![Watch the video](https://img.youtube.com/vi/5041jEKaiU8/0.jpg)](https://www.youtube.com/watch?v=5041jEKaiU8)
+
+## What's New
+
+- **2026-03-26**: [2.1 version](https://www.aitoearn.ai/) — Fixed numerous usability issues; added OpenClaw support for using AiToEarn directly within OpenClaw; added MCP protocol support for using AiToEarn in Claude, Cursor, and any MCP-compatible Agent or LLM.
+- **2025-02-07**: [1.8.0 version](https://www.aitoearn.ai/) — We introduced support for offline business scenarios, covering restaurants, retail stores, hotels and guesthouses, beauty and hair salons, gyms, and other types of physical businesses. This feature transforms offline promotional activities into executable online distribution tasks.
+- **2025-01-06**: [1.5.3 version](https://www.aitoearn.ai/) — Fixed a large number of known issues.
+- **2024-12-15**: "All In Agent" arrives! We've introduced a super AI agent that can automatically generate and publish content, and help you operate AiToEarn. [v1.4.3](https://github.com/yikart/AiToEarn/releases/tag/v1.4.3)
+- **2024-11-28**: Support automatic updates within the application. Add a large number of AI functions to the creation interface, such as abbreviation, expansion, image creation, video creation, tag generation, etc., supporting Nano Banana Pro. [v1.4.0](https://github.com/yikart/AiToEarn/releases/tag/v1.4.0)
+- **2024-11-12**: The first open-source, fully usable version. [v1.3.2](https://github.com/yikart/AiToEarn/releases/tag/v1.3.2)
+
+<details>
+ <summary><h2 style="display:inline;margin:0">Table of Contents</h2></summary>
+
+ <br/>
+
+ 1. [Quick Start with AiToEarn (5 Ways)](#-quick-start-with-aitoearn-5-ways)
+ 2. [How to Get an API Key](#get-api-key)
+ 3. [Key Features](#key-features)
+ 4. [Contributing](#contributing)
+ 5. [Contact](#contact)
+ 6. [FAQ](#faq)
+ 7. [Recommended](#recommended)
+</details>
+
+## [Key Features](https://aitoearn.ai/)
+
+🚀 **AiToEarn is a full-stack AI-powered content growth & monetization platform.**
+From creative ideas, to multi-channel publishing, to analytics & monetization — AiToEarn helps you truly **Create · Publish · Engage · Monetize.**
+
+### Agent — AI Assistant
+- **All In Agent**: Let the AI agent help you create and publish content, assisting you in operating AiToEarn.
+
+<div style="display: flex; justify-content: space-around;">
+ <img src="presentation/agent_0.png" width="100%">
+</div>
+
+### 1. Content Publishing — One-Click Multi-Platform
+
+* **Distribute Everywhere**: Publish to the widest range of global platforms (Douyin, Kwai, WeChat Channels, WeChat Official Accounts, Bilibili, Rednote, Facebook, Instagram, TikTok, LinkedIn, Threads, YouTube, Pinterest, X (Twitter)).
+* **Smart Import**: Import historical content for fast re-editing & redistribution.
+ * Example: Sync your Xiaohongshu posts to YouTube in one click.
+* **Calendar Scheduler**: Plan & coordinate content like a calendar across all platforms.
+
+<div style="display: flex; justify-content: space-around;">
+ <img src="presentation/app-screenshot/1. content publish/calendar.jpeg" width="30%">
+ <img src="presentation/app-screenshot/1. content publish/support_channels.jpeg" width="30%">
+</div>
+
+### 2. Content Hotspot — Viral Inspiration Engine
+
+* **Case Library**: Explore how others create posts with 10,000+ likes.
+* **Trend Radar**: Discover the latest viral trends instantly, reduce creator anxiety.
+
+<div style="display: flex; justify-content: space-around;">
+ <img src="presentation/app-screenshot/2. content hotspot/hotspot.jpg" width="22%">
+ <img src="presentation/app-screenshot/2. content hotspot/hotspot2.jpeg" width="22%">
+ <img src="presentation/app-screenshot/2. content hotspot/hotspot3.jpeg" width="22%">
+ <img src="presentation/app-screenshot/2. content hotspot/hotspot4.jpeg" width="22%">
+</div>
+
+### 3. Content Search — Brand & Market Insights
+
+* **Brand Monitoring**: Track conversations about your brand in real-time.
+* **Content Discovery**: Search for posts, topics, and communities for targeted engagement.
+
+<div style="display:flex; justify-content:space-between; align-items:center;">
+ <img src="presentation/app-screenshot/3.%20content%20search/contentsearch.gif" width="22%">
+ <img src="presentation/app-screenshot/3.%20content%20search/contentsearch1.jpeg" width="22%">
+ <img src="presentation/app-screenshot/3.%20content%20search/contentsearch2.jpeg" width="22%">
+ <img src="presentation/app-screenshot/3.%20content%20search/contentsearch4.jpeg" width="22%">
+</div>
+
+### 4. Comments Search — Precision User Mining
+
+* **Smart Comment Search**: Detect high-conversion signals like "link please" or "how to buy."
+* **Conversion Booster**: Reply instantly, drive higher engagement & sales.
+
+<div style="display:flex; justify-content:space-between; align-items:center;">
+ <img src="presentation/app-screenshot/4. comments search/commentsearch.gif" width="30%">
+ <img src="presentation/app-screenshot/4. comments search/commentfilter.jpeg" width="30%">
+</div>
+
+### 5. Content Engagement — Growth Engine
+
+* **Unified Dashboard**: Manage all interactions in one place.
+* **Proactive Engagement**: Join trending conversations, connect with potential customers.
+* Turn **passive operations** into **active traffic growth.**
+
+<div style="display:flex; justify-content:space-between; align-items:center;">
+ <img src="presentation/app-screenshot/5. content engagement/commentfilter2.jpeg" width="30%">
+</div>
+
+### 6. Content Analytics — Full-Funnel Data
+
+* **Cross-Platform Comparison**: One platform may block traffic, but others won't.
+* **End-to-End Monitoring**: Track performance and build your path to 1M+ followers.
+
+<img src="./presentation/data_center.png" alt="post" width="500"/>
+
+### 7. (Coming Soon) AI Content Creation — End-to-End Assistant
+
+* **AI Copywriting**: Auto-generate titles, captions & descriptions.
+* **AI Commenting**: Engage proactively, attract traffic.
+* **Image & Card Generator**: Speed up content workflows.
+* **Supported AI Video Models**: Seedance, Kling, Hailuo, Veo, Midjourney, Sora, Pika, Runway.
+* **Supported AI Image Models**: GPT, Flux.
+* **Next**: Tag generator, smart DMs, video editing, AI avatars, translation for global distribution.
+
+### 8. (Coming Soon) Content Marketplace — Trade & Monetize
+
+* **Creators**: Sell your content directly, find buyers fast.
+* **Brands**: Purchase ready-made, high-quality content.
+* **AI-Powered Growth**:
+ **Let's use AI to earn. Let's earn money together!**
+
+---
+
+<h2 id="use-web">① Use the Website</h2>
+
+The simplest way — just open your browser:
+
+- 🇨🇳 China users: **[aitoearn.cn](https://aitoearn.cn/)**
+- 🌍 International users: **[aitoearn.ai](https://aitoearn.ai/)**
+
+---
+
+<h2 id="get-api-key">🔑 How to Get an API Key (Required for Steps Below)</h2>
+
+> Options ②③④ all need an API Key. You only need to get it once.
+
+**3 steps**:
+
+1. Open [aitoearn.cn](https://aitoearn.cn/) (China) or [aitoearn.ai](https://aitoearn.ai/) (international), sign up and log in
+2. Click **Settings** in the left menu
+3. Go to **API Key**, click Create, and copy the generated key
+
+<img src="app-screenshot/0.%20api-key/b4d316c4-300c-4935-a8ef-801eb18f436d.png" alt="Get API Key" width="600">
+
+> ⚠️ Keep your API Key safe. Do not share it with others.
+
+---
+
+<h2 id="use-in-openclaw">② Use in OpenClaw</h2>
+
+> Prerequisite: [Get an API Key](#get-api-key) first
+
+Just one step — send this message to OpenClaw (replace `your-api-key` with your own):
+
+> Help me use mcporter to install this MCP server: `https://aitoearn.ai/api/unified/mcp`, authentication header is `x-api-key: your-api-key`
+
+OpenClaw will handle the setup automatically. After that, you can say things like "publish a post to Rednote" directly.
+
+---
+
+<h2 id="use-in-claude">③ Use in Claude / Cursor / Other AI Assistants</h2>
+
+> Prerequisite: [Get an API Key](#get-api-key) first
+
+AiToEarn works with any MCP-compatible AI assistant. Here's how to configure the most popular ones:
+
+<details open>
+<summary><b>Claude Desktop</b></summary>
+
+Find and edit `claude_desktop_config.json`, add:
+
+```json
+{
+ "mcpServers": {
+ "aitoearn": {
+ "type": "http",
+ "url": "https://aitoearn.ai/api/unified/mcp",
+ "headers": {
+ "x-api-key": "your-api-key"
+ }
+ }
+ }
+}
+```
+
+</details>
+
+<details>
+<summary><b>Cursor</b></summary>
+
+In Cursor's MCP settings, add:
+
+```
+MCP URL: https://aitoearn.ai/api/unified/mcp
+Auth Header: x-api-key: your-api-key
+```
+
+</details>
+
+<details>
+<summary><b>Other AI Assistants (Generic Config)</b></summary>
+
+Any MCP-compatible tool just needs two pieces of info:
+
+| Setting | Value |
+|---------|-------|
+| **MCP URL** | `https://aitoearn.ai/api/unified/mcp` |
+| **Auth Header** | `x-api-key: your-api-key` |
+
+SSE transport is also available: `https://aitoearn.ai/api/unified/sse`
+
+</details>
+
+> 💡 For self-hosted instances, replace `aitoearn.ai` with your own address (e.g., `localhost:8080`).
+
+---
+
+<h2 id="use-docker">④ Docker One-Click Deploy</h2>
+
+> Prerequisite: [Docker](https://docs.docker.com/get-docker/) installed
+
+For teams wanting to run AiToEarn on their own server. 3 commands, no manual database setup:
+
+```bash
+git clone https://github.com/yikart/AiToEarn.git
+cd AiToEarn
+docker compose up -d
+```
+
+Open **[http://localhost:8080](http://localhost:8080)** and you're ready to go.
+
+#### Configure Relay (Strongly Recommended)
+
+> **Why Relay?** Publishing content requires logging into social media accounts (TikTok, Instagram, YouTube, etc.), which need OAuth developer credentials. With Relay, you can use the official aitoearn.ai credentials — **no need to register as a developer on each platform**.
+
+Add to `docker-compose.yml` under `aitoearn-server` (see [How to Get an API Key](#get-api-key)):
+
+```yaml
+RELAY_SERVER_URL: https://aitoearn.ai/api
+RELAY_API_KEY: your-api-key
+RELAY_CALLBACK_URL: http://127.0.0.1:8080/api/plat/relay-callback
+```
+
+Then restart: `docker compose restart aitoearn-server`
+
+> 📖 Full deployment guide (production config, AI services, OAuth, storage, etc.): [DOCKER_DEPLOYMENT_EN.md](DOCKER_DEPLOYMENT_EN.md).
+
+---
+
+<h2 id="use-source">⑤ Build from Source</h2>
+
+<details>
+<summary>🧪 Run backend & frontend manually (dev mode)</summary>
+
+For local development and debugging. You can use Docker for MongoDB/Redis, or point to your own services.
+
+#### 1. Start the backend services
+
+```bash
+cd project/aitoearn-backend
+pnpm install
+cp apps/aitoearn-ai/config/config.js apps/aitoearn-ai/config/local.config.js
+cp apps/aitoearn-server/config/config.js apps/aitoearn-server/config/local.config.js
+pnpm nx serve aitoearn-ai
+# in another terminal
+pnpm nx serve aitoearn-server
+```
+
+#### 2. Start the frontend `aitoearn-web`
+
+```bash
+pnpm install
+pnpm run dev
+```
+
+</details>
+
+<details>
+<summary>🖥️ Start Electron desktop project</summary>
+
+```bash
+git clone https://github.com/yikart/AttAiToEarn.git
+cd AttAiToEarn
+npm i
+npm run rebuild
+npm run dev
+```
+
+The Electron project provides a desktop client for AiToEarn.
+
+</details>
+
+## Contributing
+
+Please see [Contributing Guide](./CONTRIBUTING.md) to get started.
+
+## Contact
+
+- Telegram: [https://t.me/harryyyy2025](https://t.me/harryyyy2025)
+
+## [FAQ](https://heovzp8pm4.feishu.cn/wiki/UksHwxdFai45SvkLf0ycblwRnTc?from=from_copylink)
+
+## Recommended
+
+* [MuseTalk](https://github.com/TMElyralab/MuseTalk)
+* [video_spider](https://github.com/5ime/video_spider)
+* [CosyVoice](https://github.com/FunAudioLLM/CosyVoice?tab=readme-ov-file)
+* [facefusion](https://github.com/facefusion/facefusion)
+* [NarratoAI](https://github.com/linyqh/NarratoAI)
+* [MoneyPrinterTurbo](https://github.com/harry0703/MoneyPrinterTurbo)
diff --git a/app-screenshot/0. api-key/b4d316c4-300c-4935-a8ef-801eb18f436d.png b/app-screenshot/0. api-key/b4d316c4-300c-4935-a8ef-801eb18f436d.png
new file mode 100644
index 00000000..6ebeeb1f
Binary files /dev/null and b/app-screenshot/0. api-key/b4d316c4-300c-4935-a8ef-801eb18f436d.png differ