Initial commit: 健康管家 AI 健康陪伴助手
- Backend: .NET 10 Minimal API + EF Core + PostgreSQL - Frontend: Flutter + Riverpod + GoRouter + Dio - AI: DeepSeek LLM + Qwen VLM (OpenAI-compatible) - Auth: SMS + JWT (access/refresh tokens) - Features: AI chat, health tracking, medication management, diet analysis, exercise plans, doctor consultations, report analysis
This commit is contained in:
36
start-dev.ps1
Normal file
36
start-dev.ps1
Normal file
@@ -0,0 +1,36 @@
|
||||
# 健康管家 - 一键启动
|
||||
Write-Host "========================================" -ForegroundColor Cyan
|
||||
Write-Host " 健康管家开发环境启动" -ForegroundColor Cyan
|
||||
Write-Host "========================================" -ForegroundColor Cyan
|
||||
|
||||
# 1. PostgreSQL
|
||||
Write-Host "`n[1/3] 启动 PostgreSQL..." -ForegroundColor Yellow
|
||||
$pgBin = "D:\PostgreSQL\18\pgsql\bin"
|
||||
$pgData = "D:\PostgreSQL\18\pgsql\data"
|
||||
try {
|
||||
& "$pgBin\pg_ctl.exe" -D $pgData start 2>$null
|
||||
Write-Host " PostgreSQL OK" -ForegroundColor Green
|
||||
} catch {
|
||||
Write-Host " PostgreSQL 已在运行或启动失败" -ForegroundColor Gray
|
||||
}
|
||||
|
||||
# 2. Backend
|
||||
Write-Host "`n[2/3] 启动后端..." -ForegroundColor Yellow
|
||||
$backendDir = "D:\健康管家\backend\src\Health.WebApi"
|
||||
Start-Process cmd -ArgumentList "/k cd /d `"$backendDir`" && dotnet run --urls http://localhost:5000"
|
||||
Write-Host " 后端窗口已打开,等待就绪..." -ForegroundColor Green
|
||||
|
||||
# 3. Frontend
|
||||
Write-Host "`n[3/3] 等待 15 秒后启动前端..." -ForegroundColor Yellow
|
||||
Start-Sleep 15
|
||||
$frontendDir = "D:\健康管家\health_app"
|
||||
$flutter = "C:\Users\明年\flutter\bin\flutter.bat"
|
||||
Start-Process cmd -ArgumentList "/k cd /d `"$frontendDir`" && `"$flutter`" run -d edge"
|
||||
Write-Host " 前端窗口已打开" -ForegroundColor Green
|
||||
|
||||
Write-Host "`n========================================" -ForegroundColor Cyan
|
||||
Write-Host " 后端: http://localhost:5000" -ForegroundColor Green
|
||||
Write-Host " 前端: 等待浏览器自动打开" -ForegroundColor Green
|
||||
Write-Host "========================================" -ForegroundColor Cyan
|
||||
Write-Host "`n窗口可以关闭,不会影响运行中的服务"
|
||||
Read-Host "按 Enter 退出"
|
||||
Reference in New Issue
Block a user