Commit Graph

4 Commits

Author SHA1 Message Date
hailin 0c70a030ea docs: 06-区块链开发指南 v3.0 量产版 — 去除全部MVP/阶段性限制
变更明细:
- 链设计参数:共识机制从"初期平台运营"改为"平台+合格机构验证节点"
- 节点运营:去掉"未来开放",直接定义多机构验证节点架构
- CouponFactory:移除Utility-only硬编码限制,开放Utility+Securities双轨制
  - Securities Track增加合格投资者验证+Broker-Dealer合规检查
- 新增第11节"多机构验证节点架构":
  - 4类节点(创世验证/机构验证/监管观察/全节点)准入条件
  - 生产验证节点CometBFT共识配置(出块≤1s)
  - 部署拓扑(Genex x3 + 机构 x4+ + 监管 x3)
- GNX代币:去掉"待法律意见书后开放"措辞,改为"需合规审批"
  - 代币分配去掉"预留设计"标签
- CBS资产证券化:从Phase 4接口预留升级为完整合约实现
  - createPool(券收益流打包)
  - purchaseShares(合格投资者份额认购)
  - setCreditRating(链下评级机构写入)
  - distributeYield(到期收益按份额分配)
- Gas策略保持不变(前期补贴+未来可通过Governance调整)
- 章节重新编号(11→21共21节)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 18:47:55 -08:00
hailin 0bf1df0f7a feat: 补全遥测/版本管理完整功能 + 清除全部开发指南中的MVP字样
## 功能补全 (12个新文件 + 6个修改)

DTO验证类 (6):
- batch-events.dto.ts — 批量事件上报验证(ArrayMaxSize 500, ValidateNested)
- heartbeat.dto.ts — 心跳上报验证(installId, appVersion)
- query-dau.dto.ts — DAU查询+事件查询验证(IsDateString, 分页)
- check-update.dto.ts — 检查更新验证(platform IsIn, version_code IsInt)
- create-version.dto.ts — 创建/更新版本验证(CreateVersionDto + UpdateVersionDto)
- upload-version.dto.ts — 上传版本验证(multipart/form-data字段)

基础设施 (3):
- package-parser.service.ts — APK解析(adbkit-apkreader) + IPA解析(unzipper+bplist-parser)
- telemetry-producer.service.ts — Kafka事件发布(telemetry.session.started + telemetry.heartbeat)
- telemetry-metrics.service.ts — Prometheus 5指标(online_users/dau/heartbeat_total/events_total/batch_duration)

控制器 (1):
- metrics.controller.ts — GET /metrics 端点(Prometheus格式)

功能增强:
- admin-version.controller.ts — 新增POST /parse解析预览端点 + upload自动解析填充元数据
- app-version.controller.ts — 新增GET /download/:id下载端点(302重定向MinIO)
- telemetry.service.ts — 集成Prometheus计数器+直方图 + Kafka事件发布
- telemetry-scheduler.service.ts — 快照/DAU时更新Prometheus指标
- user.module.ts — 注册MetricsController + TelemetryMetricsService + TelemetryProducerService + PackageParserService
- package.json — 新增prom-client依赖

## 开发指南MVP清除 (4个文件)

- 00-UI设计需求.md — "MVP阶段" → "当前阶段"
- 05-后端开发指南.md — "Phase 1 (MVP)" → "Phase 1 (基础平台)"
- 06-区块链开发指南.md — 清除所有MVP引用(合约注释/代币用途/Gas模型/预留接口)
- 07-遥测与版本管理开发指南.md — 清除MVP理由, 删除"可选"标记

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 18:09:10 -08:00
hailin 03e5f5b3e3 v2.0: Supplement all guides to achieve 100% SRS coverage
Comprehensive additions across all 7 guide files (+2,439 lines):

- 05-Backend: fee calculation (Maker-Taker), Breakage processing,
  refund mechanism, market maker system, three-factor pricing engine,
  AI/ML models (LightGBM/LSTM/IsolationForest), AML detection rules,
  OFAC sync service, Travel Rule (TRISA), tax compliance (1099/FATCA),
  CCPA/GDPR data deletion, security incident response (P0-P3),
  disaster recovery (RPO/RTO), mapping table security (MPC+audit+anchor),
  multi-currency, fiat hot-standby, chain reconciliation, capacity
  planning, SDK development plan, dispute handling, customer service

- 06-Blockchain: GNX token economics, non-transferable coupon revert,
  differentiated KYC checks, validator-level OFAC/structuring/TravelRule
  interception, batch transfer, Treasury guarantee fund locking,
  contract upgrade rollback, multi-stablecoin (USDC+USDT), Oracle
  integration, asset securitization contract reserve

- 01-Flutter Mobile: Pro mode (seed phrase, social recovery, AA wallet),
  MetaMask integration, external wallet extraction, transfer history,
  balance/deposit/withdraw, order history, phone number change,
  offline redemption limits/conflicts, dispute/complaint, notifications

- 02-Flutter Admin: guarantee fund/frozen sales, reconciliation reports,
  secondary market analysis, financing effect analysis, refund window
  config, batch operations, coupon recall, multi-store hierarchy,
  dedicated customer service channel

- 03-Web Admin: user behavior analytics, coupon category analysis,
  1099 tax reports, FATCA, false advertising monitoring, SOX audit
  module, fee/revenue dashboard, settlement management, dispute
  arbitration, web merchant redemption console, market maker monitoring

- 00-UI Design: Utility/Securities Track UI isolation design

- 04-Mini Program: multi-language i18n (zh-CN/en-US/ja-JP),
  multi-currency display

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 17:39:05 -08:00
hailin a0d2271cd5 Add comprehensive development guides for all platform components
- 00-UI设计需求 v1.1: AI Agent deep integration specs
- 01-Flutter移动端: Consumer + Merchant App (Riverpod + Clean Architecture)
- 02-Flutter管理后台: Issuer Console App (credit scoring, template-based issuance)
- 03-Web管理前端: Admin Dashboard (React + Next.js + Zustand + RTK)
- 04-小程序H5: Mini-program + H5 (Taro 3.x cross-platform)
- 05-后端: Backend services (NestJS + Go + DDD + Kong + PostgreSQL)
- 06-区块链: Genex Chain + 7-contract system (Cosmos SDK + cosmos/evm + Solidity)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 23:23:26 -08:00