nomadro/README.md
eric 56b29205e7 Integrate four verticals into nomadro portal with shared packages and API gateway.
Mount /vip with nomadvip+payjsapi, add @nomadro/pay|pb|sdk, apps/api, /admin shell, and backup/rollback scripts under git.nomadro.cn workflow.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 20:16:44 -05:00

87 lines
2.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Nomadro
中文数字游民操作系统(主域 [nomadro.cn](https://nomadro.cn))。本仓把四个垂直产品统一进一个 Next 门户,再逐步统一 FastAPI / PocketBase / 支付 / 管理后台 / 小程序。
## 四个垂直 × 门户入口
| 产品 | 源码 | 门户路径 | 小程序 |
|------|------|----------|--------|
| 出海导航 | `apps/navmini` | `/nav` | weapp / tt / xhs |
| 数字游民小册 | `apps/ebook` | `/book` | wemini / dymini / redmini |
| 旅居社群 | `apps/nomadweb` | `/community` | wemini / dymini / redmini |
| 私域会员(异度星球) | `apps/nomadvip` | `/vip` | (后续 Taro) |
| 支付网关 | `apps/payjsapi` | FastAPI(`api.*`) | — |
同进程 App Router 挂载,**禁止 iframe / 反代嵌套**。详见 `apps/README.md`、`.cursor/rules/`。
## 默认技术栈
- **Web**:Next.js 16 + React 19(前端)· FastAPI(后端)· PocketBase(数据库)
- **支付**:海外 Creem / NOWPayments;国内 zpay(PC/H5)、xpay(微信内);VIP 现网经 `payjsapi`
- **体验**:深色科技风、日夜主题、emoji/SVG/动效、D3 / three.js / WebGL·PWA 等
- **i18n**:默认中/英,可扩展日/越/泰等
- **运维**:Caddy / Docker / Umami / Uptime-Kuma / ntfy / SeaweedFS / webhook
- **Git**:https://git.nomadro.cn (管理员 `hackrobot`)
## 本地开发(Windows)
```bash
pnpm install
pnpm dev
```
打开:
- http://localhost:3000
- http://localhost:3000/nav
- http://localhost:3000/book
- http://localhost:3000/community
- http://localhost:3000/vip
- http://localhost:3000/admin
支付 API(可选):
```bash
cd apps/payjsapi
python -m venv venv
# Windows: .\venv\Scripts\activate
pip install -r requirements.txt
python run.py
```
重新镜像垂直路由到门户(改过 apps 源码结构后):
```bash
node scripts/integrate-apps.mjs
```
## 开发流程(强制)
1. 本地改完并调试确认
2. 部署到腾讯云 `82.157.112.245`(`ubuntu`)并线上冒烟
3. 更新本 README / 相关文档
当前门户开发分支:`pre1`(远程 `nomadro/pre1`)。
## 域名
主域 `nomadro.cn`,二级 DNS 在 Cloudflare(`admin` `api` `vip` `pocketbase` `umami` `uptimekuma` `ntfy` `git` `nav` `ebook` …)。需要新子域时再加解析。
## 项目结构(简要)
```
app/ # 门户路由(/nav /book /community /vip /admin + VIP /api/*)
apps/ # 垂直业务(互不深耦)
packages/ # 共享模块 @nomadro/pay|pb|sdk
components/ lib/ # 门户壳与 i18n
deploy/ # 部署与可观测脚本
.cursor/rules/ # Agent 开发规范
scripts/integrate-apps.mjs
```
共享包说明见 [`packages/README.md`](./packages/README.md)。管理后台:[/admin](http://localhost:3000/admin)。
## 部署
生产机:`82.157.112.245`。细节见 [`deploy/README.md`](./deploy/README.md)。