Files
digital-psychology/.ai/tech-stack.md
T
jackyu66gitandCursor 89756f65b4 feat(ECR-012–016): 合规、题库、时辰刷新、头像、MBTI OEJTS 与埋点
落地输入合规、探索题库、报告日/时辰刷新、账号头像、OEJTS 量表,并补齐 H5 埋点与 Admin 漏斗;同步 ESS 工件、切至自建 Git、清理 GitHub Actions。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-13 01:27:58 +08:00

1.3 KiB
Raw Blame History

Tech Stack — frozen unless ADR says otherwise

Backend

  • Language: Go 1.22+
  • HTTP: gin
  • DB: PostgreSQL
  • Migrations: goose (or golang-migrate) under apps/api/migrations/
  • Log: structured (zap or slog wrapper). No fmt.Println in business paths.
  • Module path: github.com/yuxingu/digital-psychology/apps/apiGo import 身份;表示托管在 GitHub
  • Git host: https://git.jackyu66.com/jack/digital-psychology.git(唯一远程 origin;无 GitHub Actions

User H5

  • Vue 3 + TypeScript (strict: true) + Vite
  • Router: vue-router
  • State: pinia
  • Package: @yuxingu/user-h5

Shared

  • npm workspaces at repo root
  • @yuxingu/sdk createClient({ baseURL, adapters })
  • TS camelCase in app; SDK converts to/from API snake_case

Mini program

  • Native WeChat mini-program structure
  • Same SDK via adapters (wx.request, storage)
  • No shared Vue SFC with H5

Deploy

  • Docker Compose for local Postgres: deploy/docker-compose.yml
  • API health: /api/v1/healthz (liveness). Add readiness when DB is wired.
  • Never deploy with image tag latest in prod.

Do not introduce without ADR

  • Another backend language
  • GraphQL / gRPC as primary public API (REST is primary)
  • ORM that hides SQL without team agreement
  • New state manager besides Pinia on H5