- 新增 Spring Boot 3 后端:JWT 认证、六个业务模块查询接口、Caffeine 聚合缓存与只读事务约束 - 新增 Vue 3 管理前端:登录、概览、词书、词条、词根词族、近反义词与数据质量 - 补充前后端 README、环境变量示例与本地构建部署说明 - 同步 OpenSpec 变更文档与任务进度(64/65,只读数据库账号待确认) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
72 lines
2.4 KiB
Markdown
72 lines
2.4 KiB
Markdown
# word-market
|
||
|
||
单词数据 Monorepo,包含三个子项目:
|
||
|
||
| 目录 | 项目 | 状态 | 说明 |
|
||
|---|---|---|---|
|
||
| `importer/` | 单词导入 | 已有 | 从 Lexis 导出词书与词条,建库并导入 SQLite/PostgreSQL/MySQL |
|
||
| `backend/` | 管理后台后端 | 已有 | Spring Boot 3 + MyBatis-Plus,只读查询 MySQL `word_market` |
|
||
| `frontend/` | 管理后台前端 | 已有 | Vue 3 + Vite + TypeScript + Element Plus + ECharts |
|
||
|
||
## 快速开始
|
||
|
||
### 1. 导入数据
|
||
|
||
单词导入流程见 [`importer/README.md`](importer/README.md)。命令需在 `importer/` 目录下执行:
|
||
|
||
```powershell
|
||
cd importer
|
||
python run.py
|
||
```
|
||
|
||
### 2. 启动后端
|
||
|
||
准备数据库连接、管理员账号和 JWT 密钥(见 [`backend/README.md`](backend/README.md)):
|
||
|
||
```powershell
|
||
cd backend
|
||
$env:DB_USERNAME = 'your_user'
|
||
$env:DB_PASSWORD = 'your_password'
|
||
$env:ADMIN_USERNAME = 'admin'
|
||
$env:ADMIN_PASSWORD_HASH = '$2a$10$...'
|
||
$env:JWT_SECRET = 'at-least-32-bytes-random-secret'
|
||
mvn spring-boot:run
|
||
```
|
||
|
||
默认监听 `http://127.0.0.1:8080`。
|
||
|
||
### 3. 启动前端
|
||
|
||
```powershell
|
||
cd frontend
|
||
npm install
|
||
npm run dev
|
||
```
|
||
|
||
默认地址 `http://127.0.0.1:5173`,开发服务器代理 `/api` 到后端。
|
||
|
||
## 管理后台
|
||
|
||
只读管理后台覆盖六个模块:概览、词书、词条、词根词族、近反义词、数据质量。所有接口仅执行 `SELECT`,应用层启用只读事务,建议数据库侧使用只读账号。
|
||
|
||
生产部署方式为后端可执行 jar + 前端 `dist` 静态资源,由 Nginx 托管并反向代理 `/api`。
|
||
|
||
## 数据与产物
|
||
|
||
`importer/` 下的数据与研究产物不纳入 Git(见 `.gitignore`),仅保留在本机:
|
||
|
||
- `importer/output/`:导出数据(约 6.8G)
|
||
- `importer/assets/wordroot.db`:词根/词族/近义词源数据库
|
||
- `importer/bin/`、`importer/jadx-out/`:APK、反编译与调试工具
|
||
- `importer/.runtime/`、`importer/lexis.db`:本地运行时与 SQLite 数据库
|
||
|
||
Git 只跟踪源码、文档与配置。
|
||
|
||
## 文档
|
||
|
||
- 管理后端:[`backend/README.md`](backend/README.md)
|
||
- 管理前端:[`frontend/README.md`](frontend/README.md)
|
||
- 导入流程与算法:[`importer/README.md`](importer/README.md)
|
||
- 数据实体关系模型:[`importer/docs/DATA-MODEL.md`](importer/docs/DATA-MODEL.md)
|
||
- ZPK 解密内容分析:[`importer/docs/zpk-decrypted-content-analysis.md`](importer/docs/zpk-decrypted-content-analysis.md)
|