feat: P1 profile/portrait API and freeze local-dev environment
Add host-first environment contracts (Local vs CI vs Prod), deps-only compose, and the Profile → Portrait → deep-access mock payment slice with device identity and auto-migrate on API startup. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,48 +1,50 @@
|
||||
# 愈心谷(YuXinGu)
|
||||
|
||||
数字性格 × 中医体质。Monorepo:Go API + Vue3 H5,预留小程序。
|
||||
个人成长平台 · Monorepo:Go API + Vue3 H5(预留小程序)。
|
||||
|
||||
## AI Engineering System(规范真相源)
|
||||
## AI Engineering System
|
||||
|
||||
本仓库是 **AI-first**:不用长篇《开发手册》当主约束,而用可执行的 **`.ai/`**:
|
||||
规范真源在 [`.ai/`](.ai/)。入口:[AGENTS.md](AGENTS.md)。
|
||||
|
||||
```
|
||||
.ai/
|
||||
ai-contract.md · constitution · architecture · domain
|
||||
file-map · workflow · forbidden · commands
|
||||
coding / api / database / ui / deployment / testing / security
|
||||
review · definition-of-done
|
||||
adr/ patterns/ examples/ playbooks/ checklists/
|
||||
prompts/ # 辅助,非核心
|
||||
```
|
||||
**环境分流(重要):**
|
||||
|
||||
优先级:constitution → architecture → domain → patterns/examples/playbooks → review/DoD → prompts。
|
||||
Cursor 运行时:[.cursor/](.cursor/)(软链到 `.ai/`,不复制内容)。
|
||||
演进节奏:[.ai/ROADMAP.md](.ai/ROADMAP.md)(二/三阶段:anti-patterns、metrics、graph、mcp、skills…按需再加)。
|
||||
入口:[AGENTS.md](AGENTS.md) · [CLAUDE.md](CLAUDE.md) · [.ai/README.md](.ai/README.md)
|
||||
| 文档 | 用途 |
|
||||
|---|---|
|
||||
| [.ai/environment.md](.ai/environment.md) | Local / CI / Prod 总原则 |
|
||||
| [.ai/development.md](.ai/development.md) | 本地:本机 Go + Vite |
|
||||
| [.ai/docker.md](.ai/docker.md) | Docker:依赖服务 + 部署,非日常写代码 |
|
||||
| [.ai/deployment.md](.ai/deployment.md) | 生产:不可变镜像 |
|
||||
|
||||
产品文档(给人看):[prd-mvp](apps/docs/prd-mvp.md) · [business-model](apps/docs/business-model.md)
|
||||
本地追求**分钟级反馈**;生产追求**环境一致**。二者禁止混用。
|
||||
|
||||
## 快速开始
|
||||
## 快速开始(Local)
|
||||
|
||||
```bash
|
||||
export GOPROXY=https://goproxy.cn,direct # 若需要
|
||||
# 依赖(仅 Postgres)
|
||||
docker compose -f docker-compose.dev.yml up -d
|
||||
|
||||
docker compose -f deploy/docker-compose.yml up -d # 可选
|
||||
cd apps/api && go mod tidy && go run ./cmd/server
|
||||
# API — 本机
|
||||
export GOPROXY=https://goproxy.cn,direct # 如需要
|
||||
cd apps/api && go run ./cmd/server
|
||||
# → http://127.0.0.1:8080/api/v1/healthz
|
||||
|
||||
# H5 — 本机(另开终端)
|
||||
npm install && npm run dev:h5
|
||||
# → http://127.0.0.1:5173
|
||||
```
|
||||
|
||||
不要用 `docker build` 跑日常 Go/Vue 开发。命令详表:[.ai/commands.md](.ai/commands.md)。
|
||||
|
||||
## 目录
|
||||
|
||||
| 路径 | 说明 |
|
||||
|---|---|
|
||||
| `.ai/` | AI 工程系统(必须遵守) |
|
||||
| `.ai/` | AI 工程系统 |
|
||||
| `apps/api` | Go 后端 |
|
||||
| `apps/user-h5` | 用户 H5 |
|
||||
| `apps/mini-program` | 小程序脚手架 |
|
||||
| `packages/*` | sdk / types / utils / ui |
|
||||
| 根目录 HTML / `server.py` | Legacy,见 [LEGACY.md](LEGACY.md) |
|
||||
| `docker-compose.dev.yml` | 本地依赖服务 |
|
||||
| `deploy/` | 部署与 env 模板 |
|
||||
| 根目录 Legacy HTML | 见 [LEGACY.md](LEGACY.md) |
|
||||
|
||||
产品文档:[apps/docs](apps/docs/) · 语言契约:[.ai/product/lexicon.md](.ai/product/lexicon.md)
|
||||
|
||||
Reference in New Issue
Block a user