## 架构概览 - 10个微服务: 7 NestJS + 3 Go/Gin - DDD + Clean Architecture (Domain/Application/Infrastructure/Interface 四层) - Kong API Gateway (8080) 统一入口 - PostgreSQL + Redis + Kafka(KRaft) + MinIO 基础设施 ## 微服务清单 | 服务 | 技术 | 端口 | 职责 | |------|------|------|------| | auth-service | NestJS | 3010 | JWT双Token认证(15min+7d)、注册/登录/刷新/登出 | | user-service | NestJS | 3001 | 用户Profile、KYC审核、钱包(充值/提现)、消息 | | issuer-service | NestJS | 3002 | 发行方入驻、券CRUD/搜索/购买、定价引擎、信用评分 | | trading-service | Go/Gin | 3003 | 撮合引擎(价格-时间优先)、订单簿、做市商API | | clearing-service | NestJS | 3004 | 交易结算、退款、Breakage、ASC 606会计分录 | | compliance-service | NestJS | 3005 | AML(5模式)、OFAC筛查、Travel Rule、SAR报告 | | ai-service | NestJS | 3006 | ACL反腐败层→外部AI Agent集群(含本地降级) | | translate-service | Go/Gin | 3007 | 区块链地址映射翻译 | | notification-service | NestJS | 3008 | 推送/短信/邮件/站内通知、事件消费 | | chain-indexer | Go/Gin | 3009 | 区块链索引器(Mock) | ## Admin API (18个管理模块) 覆盖admin-web全部18+页面: Dashboard、用户管理、系统管理、用户分析、发行方管理、券管理、 券分析、商户核销、交易监控、做市商管理、财务管理、报表中心、 风控中心、合规审计、争议处理、保险理赔、AI Agent面板、通知管理 ## 数据库 - 31个SQL迁移 (000-031) + 种子数据 - 乐观锁(@VersionColumn) + 悲观锁(SELECT FOR UPDATE) + Redis分布式锁 - Outbox Pattern保证消息可靠投递 + 24h幂等窗口 ## 共享包 - @genex/common: Guards/Decorators/DTOs/Outbox/Health/Locking/AI-Client - @genex/kafka-client: 生产者/消费者/Topic定义/KRaft集群支持 ## 部署与测试 - docker-compose.yml: 全栈一键启动 - Swagger文档: 7个NestJS服务 /docs 端点 - E2E测试脚本: scripts/run-e2e.sh (Auth→Profile→Wallet→Trading→Admin) - 迁移脚本: scripts/migrate.sh + scripts/test-setup.sh Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| backend | ||
| docs | ||
| frontend | ||
| .gitignore | ||
| README.md | ||
README.md
Global Coupon Exchange
Website: gogenex.com
Brand Naming Strategy
This project adopts a regional branding strategy, using different brand names for different markets while maintaining brand family consistency.
Brand Structure
| Market | Brand | Abbr | Description |
|---|---|---|---|
| Western (US/Europe) | Genex | GNX | Derived from Generation + Exchange, familiar Western naming style |
| Asian (including China) | Gensen / 券信 | GS | "Gensen" from Cantonese pronunciation of Chinese characters "券信" |
Unified Domain
- gogenex.com - Single global domain for all markets
- Subdomains or paths for regional content (e.g., gogenex.com/cn, gogenex.com/asia)
Naming Logic
Genex (Western Markets)
- Gen = Generation / Generic / Genesis
- ex = Exchange
- Natural pronunciation, similar to well-known Western brands like FedEx, Amex
- Professional, modern, and trustworthy fintech image
Gensen / 券信 (Asian Markets)
- 券 (Quan) = Coupon / Voucher
- 信 (Xin) = Trust / Credit
- Gensen = Romanization of Cantonese pronunciation "gyun seon"
- Use Chinese characters "券信" in Mainland China
- Use romanized "Gensen" in other Asian regions
- Two characters conveying core values: coupon trading + trust guarantee
Brand Consistency
Genex ←── "Gen-" prefix ──→ Gensen
↑ ↑
└─────── Same brand family ────┘
↓
券信 (Chinese localization)
- Genex and Gensen share the "Gen-" prefix, establishing brand family recognition
- Gensen directly transliterates to 券信, providing seamless connection
- Global users can recognize these as regional versions of the same platform
Usage Scenarios
| Scenario | Western Markets | Asian Markets (non-China) | China Market |
|---|---|---|---|
| Company Name | GoGenex Inc. | Gensen Asia Ltd. | 券信科技有限公司 |
| App Name | Genex | Gensen | 券信 |
| Domain | gogenex.com | gogenex.com/asia | gogenex.com/cn |
| Social Media | @gogenex | @gensen_official | @券信official |
Note on Company Structure:
- Inc. (Corporation) for Western markets: Better for VC funding, stock issuance, and potential IPO
- Ltd. (Limited) for Asian markets: Common structure in Asia-Pacific region
- Social media handles use variations to avoid conflicts with existing accounts
Legal & Operations
Due to varying financial regulations across countries, each regional brand will:
- Operate as an independent legal entity
- Comply with local regulatory requirements
- Share core technology platform and philosophy
- Establish brand association through parent company
Project Overview
Global Coupon Exchange (GCX) is a coupon asset trading platform designed to provide users with secure and convenient trading services for digital assets such as coupons, gift cards, and vouchers.
Core Features
- Coupon asset listing and trading
- Secure transaction matching mechanism
- Multi-currency settlement support
- User credit system
Tech Stack
TBD
Documentation
For detailed development documentation, please refer to the docs directory.
License
TBD