diff --git a/README.md b/README.md
new file mode 100644
index 00000000..b86a67f9
--- /dev/null
+++ b/README.md
@@ -0,0 +1,66 @@
+
+
+
+
ChatGPT Admin Web
+
+免费部署你的商业 ChatGPT 网页应用。
+
+[暂无 Demo] / [Issues](https://github.com/AprilNEA/ChatGPT-Admin-Web/issues) / [Discord](https://discord.gg/y4vxgqfUW) / [Telegram](https://github.com/AprilNEA/ChatGPT-Admin-Web)
+
+[GitHub Sponsor](https://github.com/sponsors/AprilNEA) / [爱发电](https://afdian.net/a/aprilnea)
+
+![主界面](./docs/cover.png)
+
+
+
+## 功能
+
+- 面具 Mask 和提示词列表
+- 用户管理、订单管理和订阅管理
+- 支付接口
+ - 第三方支付接口
+ -[x]虎皮椒
+- 文本安全
+ -[ ] 敏感词过滤
+ -[x] 第三方过滤
+- 模型接入
+ -[x] OpenAI
+ -[ ] Bing
+- 收益模式
+ -[ ] 广告
+ -[ ] 分销
+
+思维导图
+
+![System](./docs/system.svg)
+
+
+
+## Features
+
+- Mask and prompt list
+- User management, order management and subscription management
+- Payment interface
+- Third party payment interface
+ -[x]Xunhu Pay
+- Text Security
+-[ ] Sensitive word filter
+-[x] Third-party filtering
+- Model Access
+-[x] OpenAI
+-[ ] Bing
+- Revenue model
+-[ ] Advertising
+-[ ] Distribution
+
+## Start
+
+请查看[文档](https://caw.sku.moe)
+
+Please see [documentation](https://caw.sku.moe)
+
+## 捐赠
+
+感谢您的激励,能让该项目持续发展。
+
+[GitHub Sponsor](https://github.com/sponsors/AprilNEA) | [爱发电](https://afdian.net/a/aprilnea)
diff --git a/apps/chat/.env.template b/apps/chat/.env.template
index 5f3fc02d..96c311f9 100644
--- a/apps/chat/.env.template
+++ b/apps/chat/.env.template
@@ -1,29 +1,61 @@
+# 网站相关设置
-# Your openai api key. (required)
-OPENAI_API_KEY=sk-xxxx
+# 这是用来加密用户的令牌的密钥,我们建议您在此生成
+# https://1password.com/password-generator/
+JWT_SECRET=
+# 标题
+NEXT_PUBLIC_TITLE=
+# 公众号
+NEXT_PUBLIC_WECHAT_OA=
-# Access passsword, separated by comma. (optional)
-CODE=your-password
+# Database
+DATABASE_URL=postgres://:@/?pgbouncer=true&connect_timeout=10
+DIRECT_URL=postgres://:@/?pgbouncer=true&connect_timeout=10
+#SHADOW_DATABASE_URL=
-# You can start service behind a proxy
-PROXY_URL=http://localhost:7890
+# 如果你想使用 Redis 进行用户速率的限制,你可以在下方填入 U
+REDIS_URL=
+REDIS_TOKEN=
-# Override openai api request base url. (optional)
-# Default: https://api.openai.com
-# Examples: http://your-openai-proxy.com
-BASE_URL=
+# 使用 OPENAI 模型的 BASE 和 Key
+# 支持 api2d, closeAI 等第三方平台
+OPENAI_BASE=https://renailu.deno.dev
+OPENAI_KEY=JqHFaJXdFRrU3rjqNqD2
-# Specify OpenAI organization ID.(optional)
-# Default: Empty
-# If you do not want users to input their own API key, set this value to 1.
-OPENAI_ORG_ID=
+# 支付信息
+DOMAIN=https://lmo.best
+CALLBACK_DOMAIN=https://wxtest.deno.dev
+# 虎皮椒的 appid 和 appsecret
+XUNHU_PAY_APPID=
+XUNHU_PAY_APPSECRET=
-# (optional)
-# Default: Empty
-# If you do not want users to input their own API key, set this value to 1.
-HIDE_USER_API_KEY=
+# 若不启用邮箱注册,请将该部分留空
+NEXT_PUBLIC_EMAIL_SERVICE=
-# (optional)
-# Default: Empty
-# If you do not want users to use GPT-4, set this value to 1.
-DISABLE_GPT4=
+MAILGUN_EMAIL_DOMAIN=
+MAILGUN_EMAIL_API_KEY=
+
+ELASTICE_EMAIL_API_KEY=
+ELASTICE_EMAIL_SENDER=
+
+# SMS 短信
+SMS_SERVICE=uni
+# UniSMS 的 key
+SMS_UNI_KEY_ID=
+# 在 UniSMS 中申请的签名,发送+86的短信请保证签名中带有中文
+SMS_UNI_SIGNATURE=
+
+# 文本安全配置,当前支持 baidu 或 tencent
+TEXT_SECURITY=
+
+TENCENT_SECRETID=
+TENCENT_SECRETKEY=
+
+BAIDU_APIKEY=
+BAIDU_SECRETKEY=
+
+# 微信登录配置,填入公众号的 appid 和 appsecret
+# 公众号必须通过企业认证且为订阅号
+WECHAT_PROXY=
+WECHAT_APP_ID=
+WECHAT_APP_SECRET=
diff --git a/apps/chat/app/components/auth/auth.tsx b/apps/chat/app/components/auth/auth.tsx
index 81485875..aeae7459 100644
--- a/apps/chat/app/components/auth/auth.tsx
+++ b/apps/chat/app/components/auth/auth.tsx
@@ -1,17 +1,17 @@
import styles from "./auth.module.scss";
-import { IconButton } from "../button/button";
+import {IconButton} from "../button/button";
-import { NavigateFunction, useNavigate } from "react-router-dom";
-import { Path } from "../../constant";
+import {NavigateFunction, useNavigate} from "react-router-dom";
+import {Path} from "../../constant";
import Locale from "../../locales";
import BotIcon from "../../icons/bot.svg";
-import React, { FormEvent, useCallback, useState } from "react";
+import React, {FormEvent, useCallback, useState} from "react";
import usePreventFormSubmit from "@/app/hooks/use-prevent-form";
-import { useUserStore } from "@/app/store";
-import { Input, showToast } from "@/app/components/ui-lib/ui-lib";
+import {useUserStore} from "@/app/store";
+import {Input, showToast} from "@/app/components/ui-lib/ui-lib";
import Locales from "@/app/locales";
import {
apiUserLoginGet,
@@ -20,9 +20,9 @@ import {
apiUserRegister,
apiUserRegisterCode,
} from "@/app/api";
-import { serverStatus } from "@caw/types";
+import {serverStatus} from "@caw/types";
import useIntervalAsync from "@/app/hooks/use-interval-async";
-import { Loading } from "@/app/components/loading";
+import {Loading} from "@/app/components/loading";
import Image from "next/image";
const emailService = process.env.NEXT_PUBLIC_EMAIL_SERVICE;
@@ -64,7 +64,7 @@ const PhoneLogin: React.FC = () => {
Locales.User.PleaseInput(`${Locales.User.Phone}, ${Locales.User.Code}`),
);
- const res = await apiUserRegister({ phone: phone, verificationCode: code });
+ const res = await apiUserRegister({phone: phone, verificationCode: code});
switch (res.status) {
case serverStatus.success: {
@@ -193,7 +193,7 @@ const EmailLogin: React.FC = () => {
-
+
);
@@ -202,6 +202,7 @@ const EmailLogin: React.FC = () => {
const WeChatLogin: React.FC = () => {
const navigate = useNavigate();
const [ticket, setTicket] = useState("");
+ const updateSessionToken = useUserStore((state) => state.updateSessionToken);
useIntervalAsync(
useCallback(async () => {
@@ -221,13 +222,12 @@ const WeChatLogin: React.FC = () => {
return;
}
}
- }, [ticket]),
+ }, [ticket, navigate, updateSessionToken]),
3000,
);
- const updateSessionToken = useUserStore((state) => state.updateSessionToken);
- if (!ticket) return ;
+ if (!ticket) return ;
return (
@@ -249,7 +249,7 @@ export function AuthPage() {
return (
-
+
{Locale.Auth.Title}
@@ -257,7 +257,7 @@ export function AuthPage() {
-
+
@@ -281,7 +281,7 @@ export function AuthPage() {
)}
- {tab === "phone" ?
:
}
+ {tab === "phone" ?
:
}
diff --git a/docs/cover.png b/docs/cover.png
new file mode 100644
index 00000000..38157305
Binary files /dev/null and b/docs/cover.png differ
diff --git a/docs/roadmap.svg b/docs/roadmap.svg
deleted file mode 100644
index 11e1ab48..00000000
--- a/docs/roadmap.svg
+++ /dev/null
@@ -1,125 +0,0 @@
- ]>
diff --git a/docs/system.svg b/docs/system.svg
index 53c81d61..4c427e4a 100644
--- a/docs/system.svg
+++ b/docs/system.svg
@@ -1,4 +1,4 @@
- ]>
+]]>ChatGPT-Admin-Web敏感词过滤检测方式第三方过滤腾讯云天御/阿里云云盾/网易易盾百度云/京东云 内容安全关键词过滤拦截方式敏感词换**阻止提交收益模式付费充值充值次数订阅模式FreeProPremium流量主广告开屏广告Banner广告欢迎页广告关键词弹窗支付接口微信支付宝虎皮椒Stripe分销二级分销查看收益申请体现用户系统订阅验证邮箱验证SMTP(需要中转)Restful APIMailgun短信验证UniSMS内容接口内置接口OpenAI APINew Bing......Key Pool自定义接口ReSendElastice
\ No newline at end of file
diff --git a/docs/tech-stack.svg b/docs/tech-stack.svg
deleted file mode 100644
index 00f3bf8c..00000000
--- a/docs/tech-stack.svg
+++ /dev/null
@@ -1,125 +0,0 @@
- ]>