DevOS v1 + Phase 2: unified resource model, infra ops, website deployment, AI chat ops
- Monorepo: NestJS API (Fastify) + React web (antd/ProComponents) + shared packages - PostgreSQL/Prisma (unified resources, relations graph, audit, events, jobs) - Auth/RBAC/workspace isolation, credential vault (AES-256-GCM) - Servers/SSH, Docker discovery & lifecycle, Job Center - Websites & deployments (git provider credential clone, env, health verification) - Domains/DNS (Cloudflare adapter), certificates (TLS probe), monitoring - Automation (cron/event/webhook HMAC + notifications), AI Gateway, MCP (29 tools) - AI chat window (LLM function-calling + rules fallback, SSE streaming, approvals) - Notes: Vditor WYSIWYG markdown editor, non-blocking autosave - Tests: 35 unit/security tests; UI audit clean (desktop+mobile, deep links)
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
# 10 — API/UI Contract
|
||||
|
||||
## API
|
||||
统一 `/api/v1`。
|
||||
|
||||
所有 response/error 使用已有错误契约,不得出现模块私有错误格式。
|
||||
|
||||
Mutation API:
|
||||
- authorization
|
||||
- validation
|
||||
- audit
|
||||
- job if long-running
|
||||
|
||||
## Pagination
|
||||
列表统一 cursor 或 page/limit,避免每个模块自定义。
|
||||
|
||||
## Filtering
|
||||
Resource list 支持:
|
||||
- type
|
||||
- status
|
||||
- tag
|
||||
- project
|
||||
- search
|
||||
|
||||
## UI
|
||||
ProTable + ProForm + ProDescriptions 作为默认模式。
|
||||
|
||||
长任务统一 JobDrawer/JobDetail。
|
||||
|
||||
危险操作统一 Confirm + risk explanation。
|
||||
|
||||
## Loading/error/empty
|
||||
所有页面必须处理:
|
||||
- loading
|
||||
- empty
|
||||
- permission denied
|
||||
- network error
|
||||
- operation failure
|
||||
|
||||
## API client
|
||||
前端不得在页面中直接拼 fetch URL;统一 api client/service。
|
||||
Reference in New Issue
Block a user