52 lines
1.7 KiB
Markdown
52 lines
1.7 KiB
Markdown
# 那拉提文旅智能问答:前后端基础壳子
|
||
|
||
基础工程骨架:Vue 3 + TypeScript + Vite 前端;FastAPI + Pydantic + SQLAlchemy 后端;PostgreSQL + pgvector 数据库配置。
|
||
|
||
## 启动数据库
|
||
需要 Docker Desktop,在项目根目录运行:
|
||
```bash
|
||
docker compose up -d db
|
||
```
|
||
开发数据库默认仅绑定 127.0.0.1:5432。请在正式使用前修改默认密码。
|
||
|
||
## 启动后端(Windows PowerShell)
|
||
```powershell
|
||
cd backend
|
||
py -3.11 -m venv .venv
|
||
.\.venv\Scripts\Activate.ps1
|
||
pip install -r requirements.txt
|
||
Copy-Item .env.example .env
|
||
uvicorn app.main:app --reload
|
||
```
|
||
API 文档:http://127.0.0.1:8000/docs
|
||
|
||
## 启动前端(另开终端)
|
||
```powershell
|
||
cd frontend
|
||
npm install
|
||
npm run dev
|
||
```
|
||
Vite 通常使用 http://localhost:5173。
|
||
|
||
## 已有接口
|
||
- GET `/api/health`
|
||
- POST `/api/chat`:占位接口,尚未接入检索和 LLM
|
||
- GET `/api/knowledge`
|
||
- POST `/api/knowledge`
|
||
|
||
前端包括问答、知识库管理、来源与更新、实验评估四个页面。实验评估页面没有虚构数据;所有页面明确标记当前功能状态。
|
||
|
||
注意:当前没有实现 Embedding、RAG、网络搜索、后台更新任务、用户认证或生产级数据库迁移。下一步建议先验证前后端联通,再按模块实现。`.env` 不要提交到 Git。
|
||
|
||
## 团队协作文档
|
||
|
||
- [项目章程](docs/PROJECT_CHARTER.md)
|
||
- [开发计划](docs/DEVELOPMENT_PLAN.md)
|
||
- [共同开发规范](docs/CONTRIBUTING.md)
|
||
- [系统架构](docs/ARCHITECTURE.md)
|
||
- [任务分工](docs/TASKS.md)
|
||
- [三人团队工作计划](docs/TEAM_WORKPLAN.md)
|
||
- [技术决策](docs/DECISIONS.md)
|
||
|
||
目标 Gitea 仓库:`https://gitea.kronecker.cc/saint/border-red-post-nalati`。
|