refactor: rewrite backend in Go, replacing Python FastAPI

Port the FastAPI backend to Go 1.26, preserving all API functionality:
- auth (register/login/guest/logout/profile/history) with JWT + bcrypt
- scripts (list/detail) backed by embedded sample_data.json
- games (create/join/start/chat/phase/clue/vote/state/replay) + WebSocket
- rule-based NPC agent plus DeepSeek/Ollama AI backends
- SQLite persistence via modernc.org/sqlite (pure Go, no cgo)

Frontend and documents are unchanged.
This commit is contained in:
gmh01
2026-08-03 11:39:53 +08:00
parent c176c04aab
commit 7614e79d12
43 changed files with 2498 additions and 1462 deletions
+4 -4
View File
@@ -1,8 +1,8 @@
@echo off
chcp 65001 >nul
title AI 剧本杀 - 仅启动后端
title AI 剧本杀 - 仅启动后端 (Go)
echo [AI 剧本杀] 启动后端服务 (端口 8000)...
echo [AI 剧本杀] 启动后端服务 (Go, 端口 8000)...
cd /d "%~dp0backend"
uvicorn app.main:app --reload --port 8000
pause
go run .
pause