nomadro/apps/api
eric 9f8fec1723 Ship portal PC/H5 acceptance, VIP ScrollReader, admin analytics and ops anchors.
Adds /api/health, ntfy notify on config save, /admin/analytics charts, and deploy smoke for miniprogram config/API.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 23:52:00 -05:00
..
app Ship portal PC/H5 acceptance, VIP ScrollReader, admin analytics and ops anchors. 2026-09-28 23:52:00 -05:00
README.md Integrate four verticals into nomadro portal with shared packages and API gateway. 2026-09-28 20:16:44 -05:00
requirements.txt Integrate four verticals into nomadro portal with shared packages and API gateway. 2026-09-28 20:16:44 -05:00

Nomadro API Gateway

统一 FastAPI 出口(OpenAPI / SDK)。垂直后端仍在各 apps/*/backend 与 apps/payjsapi。

本地

cd apps/api
python -m venv .venv
# Windows: .\.venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000

环境变量

变量 默认 说明
PORT 8000 监听端口
PAYJSAPI_URL http://127.0.0.1:8007 支付网关
COMMUNITY_API_URL http://127.0.0.1:8055 社群 FastAPI
EBOOK_API_URL http://127.0.0.1:8010 电子书 FastAPI
POCKETBASE_URL http://127.0.0.1:8090 PocketBase
CORS_ORIGINS * 逗号分隔

门户 Next 默认 API_URL=http://127.0.0.1:8000,rewrite /api/v1/* → 本服务(或社群后端,见 next.config.ts)。