Files

21 lines
888 B
Markdown
Raw Permalink 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.
# bpos-service-gateway
前端唯一入口:BFF 聚合、鉴权与到 task / data / agent 的路由(:8800,无自有库)。
## N0 已达能力
- **同构骨架**:与 task / data 仓同形的 Hono 应用与目录布局;`GET /health` 汇总 `nats` 依赖状态(无自有库,故无 db 探活)。
- **Keycloak 验签**:`requireAuth` / `requireRealmRole` / `requireService` 中间件,JWKS 远端验签。
- **协议册副本**:`src/contracts/envelope.ts`,真源在 BPOS-Document-Share。
- **NATS 连接助手**:`getNats` / `checkNats` / `closeNats`——网关只需连通性(订阅 touch / stream 用),无库故无 outbox、无 relay、无 consumer。
## 运行方式
```bash
pnpm i # 装依赖
pnpm dev # 本地起服务(:8800)
pnpm gates # typecheck + lint + test
```
本仓无自有库,故无 `db:migrate`。