You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.8 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 查价中台chajia
MotherShip / Flock Freight 卡派查价中台Next.js + Prisma + Playwright RPA
远程仓库(团队拉取):<https://git.shipro.ltd/nanchuanbeizi/chajia.git>
## 克隆与本地启动
```bash
git clone https://git.shipro.ltd/nanchuanbeizi/chajia.git
cd chajia
npm ci
cp .env.example .env
# 按需编辑 .envJWT_SECRET、数据库、HOST_SERVICE_TOKENS 等)
```
本地基础设施与开发Windows PowerShell 示例):
```powershell
# 详见 scripts/dev、deploy/README.md
npm run db:deploy # 或 db:migrate
npm run dev
# 另开终端npm run worker:rpa
```
生产 / BT 主机部署见 `deploy/README.md`、`deploy/RELEASE-NOTES.md`。
## 必读文档
| 文档 | 说明 |
|------|------|
| `api调用文档/api对接文档.md` | 第三方 OpenAPI + **iframe 嵌入直登§2.5** |
| `api调用文档/api调用文档.md` | 完整 API / 管理端说明 |
| `deploy/README.md` | 部署与环境变量 |
| `docs/` | PRD、技术设计、RPA SOP |
## 仓库已包含(可开发)
- 应用:`app/`、`components/`、`modules/`、`lib/`、`workers/`
- 数据库:`prisma/schema.prisma` + `prisma/migrations/`
- 依赖锁:`package-lock.json`
- 部署:`Dockerfile*`、`deploy/`
- 单测:`__tests__/`
- 环境模板:`.env.example`、`deploy/.env.*.example`
## 不会进库(本地自行生成)
- `.env` / `.env.local`(密钥,勿提交)
- `node_modules/`、`.next/`
- `.rpa/`Playwright storage / 截图)
- `.dev/`、`上传到服务器/`、`*.zip`
## 嵌入页CC iframe
```text
https://<域名>/embed-demo?login_type=api_key&api_key=<API_Key>&embed=1
```
详见对接文档 §2.5。
## 常用脚本
```bash
npm run lint # tsc --noEmit
npm test # vitest
npm run worker:rpa # RPA Worker
```