chore: seal Design Vision v1 and monorepo scaffold
Archive the differentiated YuXinGu product docs, AI engineering system, design contract, and Go/Vue scaffold. Next execution prioritizes Cece-parity over early innovation (see .ai/product/STRATEGY.md). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
# Platform Contract — Flutter / Native App
|
||||
|
||||
Future client. Not in MVP scope unless task explicitly opens it.
|
||||
Design language: [../design-system.md](../design-system.md) · Catalog names stay the same.
|
||||
|
||||
---
|
||||
|
||||
## Priority
|
||||
|
||||
**Performance > Native experience > Visual decoration**
|
||||
|
||||
---
|
||||
|
||||
## MUST
|
||||
|
||||
- Map tokens to `ThemeData` / design token classes — same hex and spacing scale.
|
||||
- Native navigation patterns (Material/Cupertino as decided by ADR).
|
||||
- Platform permissions (camera, photos, notifications) only with clear UX rationale.
|
||||
- 60fps interactions; avoid heavy blur/shadow on low-end devices.
|
||||
- Reuse catalog component names (`Button`, `ChatBubble`, `SubscriptionCard`…).
|
||||
- Same compliance and domain copy rules.
|
||||
|
||||
---
|
||||
|
||||
## MUST NOT
|
||||
|
||||
- Invent a dark-neon “AI app” skin.
|
||||
- Bypass API unlock/membership rules with local flags.
|
||||
- Port Web DOM assumptions.
|
||||
|
||||
---
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] Token theme 1:1 with `packages/ui`
|
||||
- [ ] Catalog parity for screens in scope
|
||||
- [ ] Permission + performance considered
|
||||
- [ ] ADR if introducing Flutter stack officially
|
||||
@@ -0,0 +1,47 @@
|
||||
# Platform Contract — H5 (Mobile Web)
|
||||
|
||||
Primary shipping client: `apps/user-h5` (Vue 3 + Vite).
|
||||
Design language: [../design-system.md](../design-system.md) · Components: [../component-catalog.md](../component-catalog.md)
|
||||
|
||||
---
|
||||
|
||||
## MUST
|
||||
|
||||
- Mobile-first; content column `max-width: var(--layout-max-user)` (430px), centered on large screens.
|
||||
- Touch targets ≥ 44×44px.
|
||||
- Prefer bottom actions (TabBar, AskInputBar, sticky CTA).
|
||||
- Safe area: `env(safe-area-inset-bottom)` on TabBar / fixed footers.
|
||||
- `user-scalable` / viewport per existing app shell; no desktop-only hover for essentials.
|
||||
- Import tokens from `@yuxingu/ui` / `packages/ui` — no page-local brand hex.
|
||||
- Data via `src/api` → `@yuxingu/sdk` only (no raw `fetch` in pages).
|
||||
- Structure: `pages/` · `components/` · `layouts/` · `stores/` · `router/`.
|
||||
- Loading / empty / error on every network view.
|
||||
- Report / Decode / Ask: compliance disclaimer.
|
||||
|
||||
---
|
||||
|
||||
## MUST NOT
|
||||
|
||||
- Rely on hover tooltips for critical info.
|
||||
- Use `window` APIs that break iOS WeChat/browser without fallback.
|
||||
- Invent a second tab IA; tabs = Home / Explore / Ask / Companion / Mine.
|
||||
- Grow Legacy root HTML (`yuxingu.html`, `pages/`) for new UI.
|
||||
|
||||
---
|
||||
|
||||
## Layout notes
|
||||
|
||||
- HomeWash: peach gradient body + Decode form + white ContentSheet.
|
||||
- Secondary: TopBar + padded content.
|
||||
- Keyboard: inputs must not hide primary CTA (scroll / visualViewport aware when needed).
|
||||
|
||||
---
|
||||
|
||||
## Checklist before Done
|
||||
|
||||
- [ ] Tokens only
|
||||
- [ ] Catalog component reused or catalog updated
|
||||
- [ ] 44px touch
|
||||
- [ ] Safe area
|
||||
- [ ] States + compliance if needed
|
||||
- [ ] `npm run build:h5`
|
||||
@@ -0,0 +1,47 @@
|
||||
# Platform Contract — WeChat Mini Program
|
||||
|
||||
Client: `apps/mini-program`.
|
||||
Design language shared with H5; **implementation is native mini-program**, not Vue SFC reuse.
|
||||
|
||||
Tokens: map `packages/ui` values into `app.wxss` / CSS variables supported by the base library — do not fork a second palette.
|
||||
|
||||
---
|
||||
|
||||
## MUST
|
||||
|
||||
- Use Mini Program lifecycle (`onLoad` / `onShow` / …) and `wx` APIs.
|
||||
- Native navigation (`wx.navigateTo`, tabBar in `app.json`).
|
||||
- Components under `components/`; pages call `services/*` only (same idea as H5 sdk).
|
||||
- Support: share (`onShareAppMessage`), user authorization, payment flow when enabled.
|
||||
- Touch ≥ 44px; rpx spacing aligned to 4/8/12/16… scale.
|
||||
- Same IA tabs and domain copy rules as H5.
|
||||
- Paywall / Membership decisions still from API — never local unlock only.
|
||||
|
||||
---
|
||||
|
||||
## MUST NOT
|
||||
|
||||
- `window` / `document` / DOM browser APIs.
|
||||
- Import Vue SFCs from `user-h5` as runtime.
|
||||
- Duplicate brand colors with new hex values.
|
||||
- Build UGC广场 or Consult marketplace in MVP.
|
||||
|
||||
---
|
||||
|
||||
## Mapping
|
||||
|
||||
| H5 | Mini Program |
|
||||
|---|---|
|
||||
| Vue page | `pages/*` |
|
||||
| Pinia | global / store pattern approved in playbook |
|
||||
| `@yuxingu/sdk` | same package or thin `services` wrapper |
|
||||
| CSS modules | `wxss` + shared token sheet |
|
||||
|
||||
---
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] No browser-only APIs
|
||||
- [ ] Tokens mapped 1:1
|
||||
- [ ] Share / auth / pay paths considered
|
||||
- [ ] Catalog names reused
|
||||
@@ -0,0 +1,44 @@
|
||||
# Platform Contract — Website (Desktop / Marketing Web)
|
||||
|
||||
Future or secondary surfaces (landing, SEO pages, admin beyond mobile shell).
|
||||
Brand tokens identical to [../design-system.md](../design-system.md).
|
||||
|
||||
---
|
||||
|
||||
## MUST
|
||||
|
||||
- SEO basics: title / description / semantic headings on marketing pages.
|
||||
- Keyboard navigation and visible focus for interactive controls.
|
||||
- Hover states allowed as **enhancement**; core actions still work without hover.
|
||||
- Large screens: may use sidebar, table, multi-column — do not ship desktop-only flows that leave mobile broken if the same app is responsive.
|
||||
- Accessibility: contrast, labels, skip/focus order.
|
||||
- Admin (`apps/admin-h5`): denser List/Table OK; still use tokens (primary coral, not random admin blue).
|
||||
|
||||
---
|
||||
|
||||
## MUST NOT
|
||||
|
||||
- Purple SaaS gradient landing that ignores 愈心谷 peach/coral brand.
|
||||
- Heavy dashboard chrome on consumer marketing hero (see design-system home budget).
|
||||
- Medical / 吉凶 claims in SEO copy.
|
||||
|
||||
---
|
||||
|
||||
## Breakpoints
|
||||
|
||||
| Name | Guide |
|
||||
|---|---|
|
||||
| Mobile | < 768px — follow H5 patterns |
|
||||
| Tablet | 768–1024px — adapt columns, keep touch sizes |
|
||||
| Desktop | > 1024px — sidebar / multi-column allowed |
|
||||
|
||||
Do not merely scale desktop UI down to mobile.
|
||||
|
||||
---
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] Tokens + brand voice
|
||||
- [ ] Keyboard / focus
|
||||
- [ ] Responsive behavior explicit
|
||||
- [ ] SEO for public pages
|
||||
Reference in New Issue
Block a user