people-reading/README.md
2026-05-12 20:50:15 +08:00

53 lines
1.4 KiB
Markdown
Raw Permalink 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.

# 赛博先生 Web App
面向 Web 的 AI 命理娱乐应用,当前支持手相、面相、八字三类报告生成。产品定位为“娱乐占卜 + 自我反思”,不做确定性人生判断。
## 目录
- `backend/`: FastAPI API、数据库模型、OpenAI 分析服务、图片存储。
- `web/`: Next.js Web App 主产品入口。
## 本地运行后端
```bash
cd backend
python3 -m venv venv
venv/bin/pip install -r requirements.txt
cp .env.example .env
venv/bin/uvicorn app.main:app --reload
```
默认使用 SQLite 和匿名 Web 登录,便于本地开发。生产环境可配置 `DATABASE_URL` 为 Postgres并配置 OpenAI 和对象存储参数。
## 环境变量
`backend/.env.example`
## Web App
```bash
cd web
npm install
cp .env.example .env.local
npm run dev
```
默认连接 `http://127.0.0.1:8000/api/v1`。Web 使用匿名会话,浏览器会自动获取 token 并保存在 `localStorage`
## Docker Compose 一键部署
```bash
docker compose up --build
```
启动后访问:
- Web App: `http://127.0.0.1:3000`
- 后端 API: `http://127.0.0.1:8000`
Compose 默认读取 `backend/.env` 中的大模型配置,并使用 Docker volume 持久化 SQLite 数据、上传图片和生成文件。
## 免责声明
本项目报告定位为娱乐占卜与自我反思,不构成医学、心理、职业、财务、投资或任何人生决策建议。