Files
gecko/srde/README.md
Daniel a94bd44c3a Initial commit
Made-with: Cursor
2026-02-28 18:43:09 +08:00

55 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# SRDE - Structured Risk Decision Engine
Deterministic 风控投资系统 Demo
## 项目结构
```
srde/
├── backend/ # FastAPI 后端Python
├── frontend/ # React Web 前端
├── miniprogram/ # 微信小程序前端
└── docker-compose.yml
```
## 快速启动
### 方式一Docker需 Docker Desktop
```bash
cd srde
docker compose up --build
```
- Web 前端: http://localhost
- API: http://localhost:8000
### 方式二:本地开发
**后端**
```bash
cd srde/backend
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
# 启动 PostgreSQL 后:
export DATABASE_URL=postgresql://user:pass@localhost:5432/srde
alembic upgrade head
uvicorn app.main:app --reload
```
**Web 前端**
```bash
cd srde/frontend && npm install && npm run dev
```
**微信小程序**
1. 用微信开发者工具打开 `srde/miniprogram`
2. 默认使用模拟数据,可离线浏览
3. 对接后端:修改 `miniprogram/services/api.ts``USE_MOCK=false``BASE_URL`
## Demo 说明
- **Web**:登录、账户、创建交易、交易列表、复盘
- **小程序**:风控首页、分步创建交易、交易详情、复盘、统计、个人中心
- **后端**JWT 认证、风控引擎、仓位计算、回撤/锁仓规则