feat: P1 合盘/星座/问答与测测完整设计包及模拟器取证工具

落地 synastry/star/ask API 与 H5 页面,补齐 cece-frontend-re complete-design 证据文档,并加入 Android 模拟器截图抓取脚本。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-03 11:37:53 +08:00
co-authored by Cursor
parent 15a9db374a
commit bd22d9dddd
248 changed files with 26309 additions and 842 deletions
+7 -37
View File
@@ -12,14 +12,7 @@ import (
"github.com/yuxingu/digital-psychology/apps/api/internal/config"
"github.com/yuxingu/digital-psychology/apps/api/internal/db"
"github.com/yuxingu/digital-psychology/apps/api/internal/handler"
"github.com/yuxingu/digital-psychology/apps/api/internal/middleware"
"github.com/yuxingu/digital-psychology/apps/api/internal/repository"
"github.com/yuxingu/digital-psychology/apps/api/internal/service/profile"
"github.com/yuxingu/digital-psychology/apps/api/internal/service/relation"
"github.com/yuxingu/digital-psychology/apps/api/internal/service/report"
"github.com/yuxingu/digital-psychology/apps/api/internal/service/scale"
"github.com/yuxingu/digital-psychology/apps/api/pkg/response"
"github.com/yuxingu/digital-psychology/apps/api/internal/httpserver"
)
func main() {
@@ -48,35 +41,12 @@ func main() {
os.Exit(1)
}
profileRepo := &repository.ProfileRepo{Pool: pool}
reportRepo := &repository.ReportRepo{Pool: pool}
relationRepo := &repository.RelationRepo{Pool: pool}
profileSvc := &profile.Service{Repo: profileRepo}
reportSvc := &report.Service{Profiles: profileRepo, Reports: reportRepo}
relationSvc := &relation.Service{Profiles: profileRepo, Reports: reportRepo, Relations: relationRepo}
scaleSvc := &scale.Service{Repo: &repository.ScaleRepo{Pool: pool}, Profiles: profileRepo}
r := gin.New()
r.Use(gin.Recovery(), gin.Logger(), middleware.RequestID())
r.Use(func(c *gin.Context) {
c.Header("Access-Control-Expose-Headers", "X-Device-Key, X-Request-Id")
c.Next()
})
api := r.Group("/api/v1")
handler.NewHealthHandler().Register(api)
api.GET("/ping", func(c *gin.Context) {
response.OK(c, gin.H{"pong": true})
})
authed := api.Group("")
authed.Use(middleware.DeviceAuth(pool))
(&handler.ProfileHandler{Svc: profileSvc}).Register(authed)
(&handler.ReportHandler{Svc: reportSvc}).Register(authed)
(&handler.RelationHandler{Svc: relationSvc}).Register(authed)
(&handler.ScaleHandler{Svc: scaleSvc}).Register(authed)
r := httpserver.NewRouter(pool, cfg)
if cfg.DeepSeek.Enabled() {
log.Printf("ask: deepseek enabled model=%s", cfg.DeepSeek.Model)
} else {
log.Printf("ask: deepseek disabled (set deepseek.api_key in config.local.yaml) — using rule engine")
}
log.Printf("yuxingu api listening on %s env=%s", cfg.HTTPAddr, cfg.AppEnv)
if err := r.Run(cfg.HTTPAddr); err != nil {
log.Printf("server stopped: %v", err)