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:
+12
-4
@@ -11,10 +11,12 @@ Policy: [environment.md](environment.md) · [development.md](development.md)
|
||||
|
||||
1. Install host toolchains: Go 1.22+ · Node 20+ · Docker Desktop(仅依赖服务)
|
||||
2. `npm install`
|
||||
3. `npm run deps:up`(或 `docker compose -f docker-compose.dev.yml up -d`)
|
||||
4. Start API once so migrations apply: `cd apps/api && go run ./cmd/server`
|
||||
5. Verify: `curl -s http://127.0.0.1:8080/api/v1/healthz`
|
||||
6. Start H5: `npm run dev:h5` → http://127.0.0.1:5173
|
||||
3. `cp apps/api/config.example.yaml apps/api/config.local.yaml`(填 `database.*` 与 `deepseek.api_key`)
|
||||
4. `npm run deps:up`(或 `docker compose -f docker-compose.dev.yml up -d`)
|
||||
5. Start API once so migrations apply: `cd apps/api && go run ./cmd/server`
|
||||
6. Verify: `curl -s http://127.0.0.1:8080/api/v1/healthz`
|
||||
7. Start H5: `npm run dev:h5` → http://127.0.0.1:5173
|
||||
8. (可选)埋点:`cp apps/user-h5/.env.example apps/user-h5/.env.local`,填 `VITE_GA_MEASUREMENT_ID`;调试可设 `VITE_ANALYTICS_DEBUG=1`(见 `feature-spec/analytics.md`)
|
||||
|
||||
Optional CN Go proxy: `export GOPROXY=https://goproxy.cn,direct`
|
||||
Optional API hot reload: install `air`, then `cd apps/api && air`(见 `.air.toml`)
|
||||
@@ -46,10 +48,14 @@ Stop deps: `npm run deps:down`
|
||||
cd apps/api
|
||||
go mod tidy
|
||||
go test ./...
|
||||
# L2(需 deps:up):Portrait / Relation / Membership 三流
|
||||
go test ./internal/integration/ -count=1
|
||||
go build ./...
|
||||
go run ./cmd/server
|
||||
```
|
||||
|
||||
根目录快捷:`npm run test:api` · `npm run test:api:integration`(L2 需先 `deps:up`)
|
||||
|
||||
Env defaults / template: `deploy/.env.example`
|
||||
Migrate: applied on API startup (`apps/api/migrations/*.up.sql`)
|
||||
|
||||
@@ -67,6 +73,8 @@ curl -s http://127.0.0.1:8080/api/v1/ping
|
||||
```bash
|
||||
npm run dev:h5
|
||||
npm run build:h5
|
||||
npm run test:h5 # Vitest
|
||||
npm run test:e2e # Playwright(先 build:h5;用系统 Chrome)
|
||||
```
|
||||
|
||||
**Do not** dockerize Vite for everyday coding.
|
||||
|
||||
Reference in New Issue
Block a user