# 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/api`(Go 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