nomadro/AGENTS.md
Eric abdcafb1eb Ship Work access gate, pads/boards upgrades, and locale hydration fix on .com.
Gate /social/work behind join/login/profile; harden Work UX and LanguageSwitcher SSR; deploy portal, admin, and work API.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-08 00:14:39 +08:00

2.9 KiB
Raw Permalink Blame History

Nomadro agent notes

Follow .cursor/rules/*.mdc。

发版核心:nomadro.com(美国机)。.com 分中文/国际受众;中文轨测稳后再独立同步 .cn(中国机)。未点名域名时默认部署 .com,见 com-first-deploy.mdc。链路:.com → .cn(Next) → Taro H5 → 微信/抖音/小红书(微信为中国核心)。

未经允许,不能上线前端(写死):见 .cursor/skills/no-frontend-deploy-without-ok + .cursor/rules/no-frontend-deploy-without-ok.mdc。无本轮明确许可勿上传 .next / admin dist / 小程序包。

本地前端直连线上后端(写死):pnpm dev 默认 WORK_API_URL/NOTIFY_API_URL/COFFEE_API_URL/API_URL → https://nomadro.com;禁止默认 127.0.0.1:802x。见 .cursor/skills/local-frontend-online-backend。

对外标准面:/api/public/v1 + @nomadro/sdk + @nomadro/mcp + .cursor/skills/nomadro-platform(工具 SoT packages/sdk/tools.json)。文档 docs/public-api.md。

Layer Path
Next portal(.com 主 / .cn 同步) src/app + src/modules
Remote work 读 Planka/Etherpad 域模型后自研:Next src/modules/work + FastAPI apps/api/services/work_svc(/api/work/v1,work_main.py :8021)。禁止 iframe/二级域
Notify 读 Novu 域模型后自研:Next src/modules/notify + FastAPI apps/api/services/notify_svc(/api/notify/v1,notify_main.py :8023)。禁止 iframe/二级域
Coffeechat booking 读 Cal.com 域模型后自研:Next src/modules/coffee + FastAPI coffee_svc(/api/coffee/v1,coffee_main.py :8024),挂 /social/coffeechat。禁止 iframe/二级域
Taro H5 SoT apps/miniprogram/h5(weapp 共用 ../h5/src)
Unified API apps/api
Admin SPA (.cn) apps/admin → admin.nomadro.cn(微信 / 抖音)
.com 隔离树 apps/com/*(美国 VPS · 无小程序);apps/com/admin → admin.nomadro.com
Shared packages/{pay,pb,sdk}

Dev

根目录:pnpm install → pnpm dev / dev:h5 / dev:admin / dev:admin-com / dev:api / typecheck / clean。

Remote config: POST /api/config/pull · WS /api/config/ws · offline defaults. Current WeChat audit branch/tag: test9 / 2026-11-02. Do not reintroduce deleted vertical trees (payjsapi / community-api / ebook / navmini / nomadweb / nomadvip / wemini).

全端小程序禁止 web-view(微信 / 抖音 / 小红书 / H5 SoT):业务内容必须原生页;见 .cursor/rules/no-webview-content.mdc。

受众模块:src/modules/audience/{cn,intl} — 支付/登录/关注/文案/VIP/埋点/社群全模块化;resolveAudienceBundle()。后台登录后选 /cn|/intl。见 audience-cn-intl.mdc。

H5 游戏(Nomad Day 3D)冷冻:勿改 apps/miniprogram/h5/src/modules/game / pages/game,除非用户明确要求。