调整epanet工具目录结构;联通前端水质分析模块功能;新建 readme.md

This commit is contained in:
2026-01-30 15:24:56 +08:00
parent 9d7a9fb2fd
commit 9037bf317b
12 changed files with 128 additions and 69 deletions

41
readme.md Normal file
View File

@@ -0,0 +1,41 @@
# TJWater Server (FastAPI)
基于 FastAPI 的水务业务服务端提供模拟计算、SCADA 数据、网络元素、项目管理等接口。
## 目录结构
```
app/
main.py # FastAPI 入口lifespan、CORS、路由挂载
api/
v1/
router.py # API 路由汇总(/api/v1 前缀)
endpoints/ # 业务接口实现auth、simulation、scada 等)
endpoints/network/ # 管网要素与特性接口
endpoints/components/ # 组件/控制相关接口
services/ # 业务服务层simulation、tjnetwork 等)
infra/
db/ # 数据库访问层timescaledb / postgresql / influxdb
cache/ # 缓存与 Redis 客户端
algorithms/ # 算法与分析模块
core/ # 配置与安全相关
configs/
project_info.yml # 默认工程配置(启动时自动打开)
scripts/
run_server.py # Uvicorn 启动脚本
tests/ # 测试
```
## 启动方式
1. 安装依赖(示例):
```bash
pip install -r requirements.txt
```
2. 启动服务:
```bash
python scripts/run_server.py
```
默认监听:`http://0.0.0.0:8000`
API 前缀:`/api/v1`(见 `app/main.py` 与 `app/api/v1/router.py`