Skip to content

Commit

Permalink
Merge pull request #100 from AprilNEA/refactor-new
Browse files Browse the repository at this point in the history
基于最新版本的 ChatGPT-Next-GPT 重构本项目
  • Loading branch information
AprilNEA authored Jun 20, 2023
2 parents 8774ec4 + 0ef36e2 commit 7c9cf58
Show file tree
Hide file tree
Showing 466 changed files with 17,605 additions and 15,134 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.env
**/.env
# IDE
.vscode/
.idea/
Expand Down
105 changes: 47 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,77 +1,66 @@
> ⚠️ 本项目为 [lmobest](https://lmo.best) 的开源版本,目前并没有发布正式版
>
> 用户层的逻辑已经实现完毕,管理页面(后台)仍在开发中。
>
> 可以关注[频道](https://t.me/s/ChatGPTAdminWebChannel)获取最新消息。
<div align="center">

<img src="apps/docs/static/img/icon.svg" alt="icon"/>
<img src="./docs/icon.svg" alt="预览"/>

<h1 align="center">ChatGPT Admin Web</h1>

简体中文 / [English](./README_EN.md)

[apps/chat](./apps/chat/README.md)
基于 [ChatGPT-Next-Web](https://github.com/Yidadaa/ChatGPT-Next-Web/tree/b1f27aaf93c88c088db6bae5ac8163e2ffe991bd)
二次开发

带有用户管理和后台面板的 ChatGPT 网页应用

<table>
<tbody>
<tr>
<td>
<a href="https://docs.lmo.best/">📚 部署文档</a>
</td>
<td>
<a href="https://lmo.best/">🎦 演示站点</a>
</td>
<td>
<a href="https://github.com/AprilNEA/ChatGPT-April-Web/issues">💬 反馈</a>
</td>
<td>
🌐 <a href="https://t.me/ChatGPTAdminWeb">群组</a> & <a href="https://t.me/ChatGPTAdminWebChannel">频道</a>
</td>
</tr>
</tbody>
</table>
</div>
免费部署你的商业 ChatGPT 网页应用。

## ChatGPT Admin Web
[暂无 Demo] / [Issues](https://github.com/AprilNEA/ChatGPT-Admin-Web/issues) / [Discord](https://discord.gg/y4vxgqfUW) / [Telegram](https://github.com/AprilNEA/ChatGPT-Admin-Web)

<img src="./docs/system.svg" alt="system"/>
[GitHub Sponsor](https://github.com/sponsors/AprilNEA) / [爱发电](https://afdian.net/a/aprilnea)

![主界面](./docs/cover.png)

</div>

## 🤩 开发计划
## 功能

<img src="./docs/roadmap.svg" alt="system"/>
- 面具 Mask 和提示词列表
- 用户管理、订单管理和订阅管理
- 支付接口
- 第三方支付接口
-[x]虎皮椒
- 文本安全
-[ ] 敏感词过滤
-[x] 第三方过滤
- 模型接入
-[x] OpenAI
-[ ] Bing
- 收益模式
-[ ] 广告
-[ ] 分销

## 🚀 技术栈 Tech Stack
<details><summary>思维导图</summary>

<img src="./docs/tech-stack.svg" alt="tech-stack"/>
![System](./docs/system.svg)

## 仓库 Repository
</details>

这是一个 monorepo 仓库,由以下部分组成:
## Features

| Package | Package Description | Package Version | License |
|-------------------|---------------------|-----------------|------------|
| apps/chat | 用户界面 | 0.0.1 | 996 && MIT |
| apps/dash | 后台管理 | 0.0.1 | MIT |
| apps/docs | 项目文档 | 0.0.1 | MIT |
| packages/bots | API 接口和自定义模型接口 | 0.0.1 | MIT |
| packages/database | 数据库 DAL 以及部分 Logic | 0.0.1 | MIT |
- 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

## 作者 Author
## Start

- [@AprilNEA](https://github.com/AprilNEA)
- [@PeronGH](https://github.com/PeronGH)
请查看[文档](https://caw.sku.moe)

## ☁️ 许可证 License
Please see [documentation](https://caw.sku.moe)

本仓库中 [apps/chat](./apps/chat) 是基于仓库 [Yidadaa's repository](https://github.com/Yidadaa/ChatGPT-Next-Web)
996许可证以[MIT license](./LICENSE)的形式从新分发。
## 捐赠

其他部分均以[MIT license](./LICENSE)分发
感谢您的激励,能让该项目持续发展

<img src="https://hits-app.vercel.app/hits?url=https%3A%2F%2Fgithub.com%2FAprilNEA%2FChatGPT-Admin-Web" />
[GitHub Sponsor](https://github.com/sponsors/AprilNEA) | [爱发电](https://afdian.net/a/aprilnea)
75 changes: 0 additions & 75 deletions README_EN.md

This file was deleted.

61 changes: 61 additions & 0 deletions apps/chat/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 网站相关设置

# 这是用来加密用户的令牌的密钥,我们建议您在此生成
# https://1password.com/password-generator/
JWT_SECRET=
# 标题
NEXT_PUBLIC_TITLE=
# 公众号
NEXT_PUBLIC_WECHAT_OA=

# Database
DATABASE_URL=postgres://<user>:<password>@<host>/<db-name>?pgbouncer=true&connect_timeout=10
DIRECT_URL=postgres://<user>:<password>@<host>/<db-name>?pgbouncer=true&connect_timeout=10
#SHADOW_DATABASE_URL=

# 如果你想使用 Redis 进行用户速率的限制,你可以在下方填入 U
REDIS_URL=
REDIS_TOKEN=

# 使用 OPENAI 模型的 BASE 和 Key
# 支持 api2d, closeAI 等第三方平台
OPENAI_BASE=https://renailu.deno.dev
OPENAI_KEY=JqHFaJXdFRrU3rjqNqD2

# 支付信息
DOMAIN=https://lmo.best
CALLBACK_DOMAIN=https://wxtest.deno.dev
# 虎皮椒的 appid 和 appsecret
XUNHU_PAY_APPID=
XUNHU_PAY_APPSECRET=

# 若不启用邮箱注册,请将该部分留空
NEXT_PUBLIC_EMAIL_SERVICE=

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=
1 change: 1 addition & 0 deletions apps/chat/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public/serviceWorker.js
3 changes: 2 additions & 1 deletion apps/chat/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "next/core-web-vitals"
"extends": "next/core-web-vitals",
"plugins": ["prettier"]
}
10 changes: 9 additions & 1 deletion apps/chat/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

# production
/build
/.env

# misc
.DS_Store
Expand All @@ -36,3 +35,12 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts
dev

.vscode
.idea

# docker-compose env files
.env

*.key
*.key.pub
11 changes: 11 additions & 0 deletions apps/chat/.gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
# and commit this file to your remote git repository to share the goodness with others.

# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart

tasks:
- init: yarn install && yarn run dev
command: yarn run dev


6 changes: 6 additions & 0 deletions apps/chat/.lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"./app/**/*.{js,ts,jsx,tsx,json,html,css,md}": [
"eslint --fix",
"prettier --write"
]
}
10 changes: 10 additions & 0 deletions apps/chat/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
printWidth: 80,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: false,
trailingComma: 'all',
bracketSpacing: true,
arrowParens: 'always',
};
Loading

0 comments on commit 7c9cf58

Please sign in to comment.