hailin
6b90d61199
chore: Add Next.js project config and app entry for admin-web
...
The previous deploy.sh commit included Dockerfile and docker-compose
but was missing the actual Next.js project files needed for `npm ci`
and `npm run build` to succeed. This adds the complete project skeleton.
## Project configuration files
### package.json
- Next.js 15.1.11, React 18, TypeScript 5.9
- Dependencies: @reduxjs/toolkit, @tanstack/react-query,
@tanstack/react-table, axios, recharts, zustand, dayjs, clsx
- Scripts: dev, build, start, lint, format, type-check
### next.config.ts
- output: 'standalone' — required for Docker multi-stage build
- / redirects to /dashboard
- Remote image patterns enabled
### tsconfig.json
- Strict mode, bundler module resolution
- Path alias: @/* → ./src/*
- Incremental compilation enabled
### .gitignore / .dockerignore
- Standard Next.js ignores (node_modules, .next, out, coverage)
- Docker build excludes dev files, docs, git, IDE configs
## App Router entry files
### src/app/layout.tsx — Root layout
- HTML lang="zh-CN", imports globals.css + design-tokens.css
- Wraps children with Providers (placeholder for Redux/RQ/Auth)
### src/app/providers.tsx — Client-side providers wrapper
- Placeholder for Redux Provider, React Query, Theme, Auth
### src/app/page.tsx — Root page
- Redirects to /dashboard via next.config.ts
### src/app/globals.css — Global styles
- Imports design-tokens.css, box-sizing reset
- Custom scrollbar styling with design tokens
- Selection color using primary-container
### src/app/api/health/route.ts — Health check endpoint
- GET /api/health returns { status, service, timestamp }
- Used by Docker healthcheck and load balancers
### public/favicon.ico — Placeholder favicon
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 01:35:19 -08:00
hailin
8042160f83
.
2026-02-11 09:30:54 +00:00
hailin
bae342f1bd
chore: Add Docker deployment config for admin-web
...
Add complete deployment toolchain for the Genex Admin Web (React + Next.js),
mirroring the proven deployment pattern from the rwadurian project.
## Files added
### deploy.sh — One-click deployment script
- Commands: build / start / stop / restart / logs / status / clean
- Auto-detects `docker compose` vs `docker-compose`
- Port conflict detection with auto-stop of old service
- Health check verification after startup
- Supports PORT env override (default: 3000)
### Dockerfile — Multi-stage production build
- Stage 1 (deps): node:20-alpine, npm ci for deterministic installs
- Stage 2 (builder): Next.js production build with telemetry disabled
- Stage 3 (runner): Minimal runtime with standalone output
- Non-root user (nextjs:nodejs) for security
- curl installed for container health checks
### docker-compose.yml — Container orchestration
- Service: genex-admin-web on genex-network bridge
- Health check: GET /api/health every 30s, 3 retries
- Auto-restart: unless-stopped policy
- Timezone: Asia/Shanghai
### .env.development — Local dev environment
- API: http://localhost:8080/api
### .env.production — Production environment
- API: https://api.gogenex.com/api
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 01:22:22 -08:00
hailin
e450bef7cd
feat: Complete all 4 frontend UI prototypes covering guides 00-04
...
Add 116 UI prototype files across 4 frontend applications, achieving
~95% coverage of all functional requirements from development guides.
## mobile/ (Flutter Consumer + Merchant App) — 48 files
- Auth: welcome, login, register, forgot-password
- Coupons: home, market, search, detail, my-coupons, my-coupon-detail,
order-confirm, payment, payment-success, redeem-qr
- Trading: trading, sell-order (AI pricing), transfer
- Wallet: wallet, deposit, withdraw, transaction-records
- Profile: profile, kyc (L0-L3), settings, payment-management, pro-mode
(WalletConnect, chain address, tx hash, track selection)
- AI Agent: agent-chat, ai-fab (floating button with unread count)
- Merchant: merchant-home (scanner, confirm, success, history, dashboard),
merchant-ai-assistant (redeem assist, traffic prediction, anomaly alerts)
- Message: message-list, message-detail
- Issuer: issuer-main-page
- Shared widgets: coupon-card, price-tag, credit-badge, kyc-badge,
status-tag, empty-state, skeleton-loader, confirm-sheet, genex-button,
ai-confirm-dialog (3-level risk confirmation)
- Theme: app-colors, app-typography, app-spacing, app-theme
- i18n: zh-CN, en-US, ja-JP
## admin-app/ (Flutter Issuer Console) — 27 files
- Auth: issuer-login
- Onboarding: 5-step enterprise onboarding with AI compliance check
- Dashboard: issuer-dashboard (stats, AI insight, credit/quota),
user-portrait (age/geo/preference/repurchase/AI insight)
- Coupon management: list, create (template-based, AI pricing),
detail (recall/delist), batch-operations (issue/recall/price-adjust)
- Redemption: scan-to-redeem with offline mode
- Finance: overview, reconciliation (auto-reconcile, export PDF/Excel),
financing-analysis (cost-benefit, liquidity, risk indicators, AI strategy)
- Credit: credit-scoring (4-factor, tier progress, AI suggestions),
quota-management (usage gauge, type breakdown, tier upgrade, increase requests)
- AI Agent: full conversation UI with quick actions
- Settings: account, notification, support, tier display
- Store management: hierarchy (HQ/regional/store), employee roles
- Shared: ai-suggestion-card
- Theme: app-colors, app-theme, app-typography, app-spacing
- i18n: zh-CN, en-US, ja-JP
## admin-web/ (React + Next.js Platform Admin) — 26 files
- Layout: AdminLayout with collapsible sidebar, 10 nav sections
- Dashboard: key metrics, transaction feed, system health
- Users: user management with KYC filtering, risk tags
- Issuers: issuer review with AI pre-screening, credit rating display
- Trading: real-time monitor, order book, abnormal detection
- Risk: risk dashboard, AI warnings, suspicious transactions, OFAC logs
- Compliance: SAR/CTR management, audit logs, AI report generation
- SEC Filing: S-1/10-K/10-Q/8-K tracker, filing timeline, auto-disclosure
- License management: FinCEN MSB, BitLicense, MTL (48 states), renewal alerts
- SOX compliance: ICFR/ITGC/access/change-mgmt controls, deficiency tracking
- Tax compliance: Federal + 4 states, 8 IRS forms, tax calendar
- IPO readiness: 28-item checklist (legal/financial/SOX/governance/insurance),
blocker tracking, milestone timeline, category progress, key contacts
- Finance: fee revenue, settlement queue, breakage tracking
- Disputes: case management with SLA countdown, chain evidence
- Analytics: user (DAU/MAU, cohort retention, geographic), coupon (category,
breakage, secondary market), market-maker (TVL, spread, health, risk alerts),
consumer-protection (complaints, CSAT, fund utilization, non-compliant issuers)
- Insurance: consumer protection fund, claims, IPO checklist overview
- Chain monitor: smart contract status, blockchain metrics
- Reports: platform-wide report center
- AI Agent panel: session stats, top questions, module accuracy
- Merchant redemption: stats, store ranking, real-time feed
- Design tokens: CSS custom properties (colors, typography, spacing, shadows)
- i18n: zh-CN, en-US, ja-JP
## miniapp/ (Taro Mini Program + H5) — 15 files
- Pages: home, detail, purchase, orders, my-coupons, login, redeem, profile
- H5 pages: h5-share, h5-activity (countdown, featured coupons),
h5-register (benefits, phone/SMS form, WeChat login)
- Components: coupon-card, ai-guide (recommendation bar + purchase bubble),
share-card (brand header, QR code, coupon info)
- i18n: zh-CN, en-US, ja-JP
## Design System
- Primary: #6C5CE7 (innovation purple), Material 3 style
- Consistent design tokens across all platforms
- Zero blockchain terminology — "我的券" not "NFT", "订单号" not "TX Hash"
- Utility Track MVP only; Securities Track reserved as "coming soon"
## Not included (by design)
- Data/Domain layers (API, state management, business logic) — UI prototypes only
- Securities Track full UI — MVP focuses on Utility Track
- P2 "求购" (want-to-buy) feature — marked as optional
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 01:16:44 -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
hailin
aa449d6bd3
Rewrite architecture and software dev docs based on SRS v4.1
...
Both documents completely rewritten to align with the v4.1 SRS:
- Architecture doc (v3.0): Genex Chain (Cosmos SDK + cosmos/evm),
7-contract system, UX translation layer, three-tier asset control,
GCFN global nodes, credit/pricing models, security IR, deployment
- Software dev doc (v2.0): Concise development requirements overview,
all modules aligned with SRS including coupon type firewall, OFAC,
Travel Rule, offline redemption, issuer configurable rules
Replaces deprecated Hyperledger Fabric / DPoA architecture with
Genex Chain / CometBFT throughout.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 22:31:55 -08:00
hailin
c822e4c14b
v4.1: Reverse-supplement from architecture/dev docs
...
Add credit scoring formula with weights (3.5.1), three-factor
pricing model + AI-assisted pricing engine (3.3.4), issuer tier
incentive system (3.9), AI/ML tech stack selection (4.2), SDK
support plan with rate limits (3.10.1), GCFN global clearing
node architecture (5.2), capacity planning and matching latency
metrics (8.4-8.5).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 22:23:42 -08:00
hailin
99e3c65382
Add comprehensive SRS evaluation report (v3.3→v4.0)
...
Full evaluation covering: completeness, compliance, convenience,
social contribution, security, and technical integrity across
8 iterations with 30+ issues tracked to resolution.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 21:57:57 -08:00
hailin
967d7d62c9
v4.0: Final 4 refinements for complete coverage
...
- Merchant POS integration: scan/input/online redemption, offline capability, multi-store management (3.10.4)
- Issuer-configurable rules: transferability, resale limits, audience targeting, per-person limits, store restrictions (3.1.3)
- On-chain refund logic: atomic reverse swap, refund windows, non-refundable states, abuse prevention (3.4.2)
- KPI system expanded to 4 categories / 25 metrics: business, UX, security/compliance, infrastructure (8.1-8.4)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 21:26:20 -08:00
hailin
7a247c3a62
v3.9: Complete 6 remaining gaps for near-perfect coverage
...
- GNX token securities analysis with Howey Test (1.7)
- Smart contract upgrade strategy: Transparent Proxy + multisig + timelock (4.3.6)
- Security incident response plan: P0-P3 grading, emergency freeze, bug bounty (4.4.2)
- Privacy deletion rights vs blockchain immutability resolution (3.7.3)
- Critical third-party dependencies with backup options (4.7)
- Issuer B-end Web2 UX: template-based coupon creation, no blockchain knowledge needed (3.10.3)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 21:14:33 -08:00
hailin
9d0b499494
v3.8: Asset withdrawal, mapping security, terminology cleanup
...
- Three-tier asset control model: Standard / Withdraw to external wallet / Pro (3.4.1)
- Users can withdraw coupons to any EVM wallet, platform becomes irrelevant
- MPC-signed phone→address mapping table with hash anchoring on-chain (4.6.2)
- CARD Act vs Utility Track validity conflict noted with resolution path (3.7.1)
- Fix legacy terminology: 方案A/B → 标准模式/Pro模式
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 21:03:39 -08:00
hailin
1ca83e1bb1
v3.7: Web2 UX + Web3 infrastructure redesign
...
- Platform custody as default (3.4.1): MPC wallet auto-created on registration
- Phone/email registration first (3.6): no wallet concepts for users
- UX architecture layer (4.6): User Layer → Translation Layer → Infrastructure Layer
- Terminology mapping (9.2): all blockchain terms translated to user-friendly language
- MVP updated: phone registration, UX translation layer, phone-based P2P transfer
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 20:46:43 -08:00
hailin
15519b1670
v3.6: Coupon type firewall, P2P compliance routing, MVP Utility Track only
...
- Add section 1.6: Coupon Type Firewall (Utility/Securities dual-track)
- Utility Track: resale price capped at face value (no profit = not security)
- Securities Track: full SEC compliance (Reg D/A+/CF, Broker-Dealer)
- Smart contract enforced: price cap, transfer count limit, type immutable
- Rewrite 4.3.4: P2P compliance routing architecture
- <$3,000: free transfer, chain-level monitoring with structuring detection
- >=$3,000: Compliance contract routing, Travel Rule enforced at validator level
- Identity hash on-chain, plaintext off-chain (privacy preserved)
- Redemption (consumption) not affected - platform still doesn't intervene
- Update MVP Phase 1: Utility Track only, avoid SEC securities compliance
- Update Phase 4: Securities Track after legal opinion + Broker-Dealer registration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 20:21:46 -08:00
hailin
abcf1d9ab3
v3.5: Genex Chain architecture - Cosmos SDK + cosmos/evm, ref Cronos/dYdX v4
...
- Replace Kava reference with Cronos (architecture) + dYdX v4 (trading)
- Replace deprecated Ethermint with official cosmos/evm (Apache 2.0, 2025.3)
- Block time target: <=1s (Cronos validated), Block-STM parallel execution
- Off-chain orderbook + on-chain settlement (dYdX v4 pattern)
- Add Compliance and Governance smart contracts
- Platform subsidizes all gas fees in early stage
- Chain-level compliance: OFAC filtering, Travel Rule, emergency freeze
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 20:06:57 -08:00
hailin
bbb52221bb
v3.4: Complete 9 missing areas from comprehensive review
...
- OFAC sanctions screening (SDN list, real-time transaction screening)
- FATF Travel Rule (P2P transfers ≥$3000 via platform contract routing)
- Consumer protection laws (FTC Act, Dodd-Frank UDAAP, CARD Act)
- Gas fee strategy (Paymaster/ERC-4337, platform subsidizes user gas)
- Wallet loss recovery (MPC wallet, social recovery, AA wallet/ERC-4337)
- Market maker incentive mechanism (Maker-Taker model, liquidity mining)
- Disaster recovery & business continuity (RPO<1min, RTO<15min, multi-region)
- Blockchain selection criteria (gas cost, speed, EVM, regulatory friendliness)
- Commercial insurance requirements (D&O, E&O, Cyber, Fidelity Bond)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 19:55:37 -08:00
hailin
10cc21fed7
v3.3: SEC securities analysis, US regulatory compliance, Nasdaq IPO preparation
...
- Add section 1.5: Howey Test securities risk analysis, SEC Project Crypto taxonomy
- Update section 3.7: FinCEN/BSA, SEC registration, GENIUS Act, state MTLs, tax/privacy compliance
- Add chapter 6: Nasdaq IPO preparation (SOX, FASB, listing standards, post-IPO compliance)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 19:05:44 -08:00
hailin
f22a5ffedf
v3.2: Add AML, KYC tiers, dispute handling, business model, open platform
...
- KYC now mandatory with 4 tiers (L0-L3), no trading without KYC
- AML anti-money laundering: 4 identified laundering paths with countermeasures
- P2P transfer monitoring, related-party detection, transaction graph analysis
- Dispute resolution module: trade disputes, issuer default, coupon recall
- Platform business model: 5 revenue streams
- Open platform: API/SDK, developer sandbox
- Internationalization: multi-language, multi-currency
- Issuer management console
- MVP Phase 1 now includes KYC and AML from day one
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 18:54:10 -08:00
hailin
39234c2d10
Replace deposit model with credit-growth zero-deposit mechanism
...
- Zero deposit to onboard, start with low issuance quota
- Credit rating drives quota dynamically
- Deposit and sales freeze become optional (voluntary, boosts credit)
- Violation triggers: downgrade, quota cut, suspension, freeze
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 18:46:04 -08:00
hailin
7874000eed
Add dual custody model: Plan B (default self-custody) + Plan A (managed)
...
- Default: users hold coupons in own wallet, platform only custodies fiat
- Plan A: enterprise signs service agreement for platform-managed custody
- Clear comparison table for both modes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 18:38:49 -08:00
hailin
bff939b343
Add 3-tier guarantee mechanism, clarify fund custody model
...
- Three parallel guarantee modes: deposit, sales freeze, credit transparency
- Platform only custodies fiat; coupons stay in user wallets
- Renumber 3.1 subsections
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 18:37:14 -08:00
hailin
d7699bae35
v3.1: Blockchain as infrastructure, not full decentralization
...
- Blockchain is infrastructure, platform provides centralized services on top
- Key innovation: smart contract settlement protects enterprise customer data
- Platform does NOT access consumer data during coupon redemption
- Clear separation: decentralized (issuance, P2P, settlement) vs centralized (review, rating, compliance)
- Fix secondary market: all holders can trade, not just consumers
- Fix KPI: instant on-chain confirmation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 18:58:40 -08:00
hailin
f59997b017
v3.0: Blockchain-native rewrite, remove all centralized concepts
...
- Replace Token with 数字券/链上资产
- Smart contract atomic swap for trading
- On-chain verification (no platform verification needed)
- Wallet-centric user system
- On-chain settlement (instant, no T+N)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 18:39:30 -08:00
hailin
187b090491
Fix consumer value proposition: instant payment like cash/credit card
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 18:33:02 -08:00
hailin
0075d86472
Emphasize trading as core platform function
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 18:26:32 -08:00
hailin
ce87f108e4
Replace '企业' with '发行方' throughout document
...
- 发行方 includes 企业、政府、机构
- Update all sections: 入驻、发行、数据分析、一级市场、清算、智能合约、MVP
- Version v2.2
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 18:22:23 -08:00
hailin
c2164d8b43
Add blockchain-native architecture as core technical advantage
...
- Add section 1.2: Core technical advantage with traditional vs Genex comparison
- Add first mover market positioning
- Add section 4.3: Blockchain core architecture (token standard, smart contracts, P2P)
- Move blockchain from future extension to core requirement
- Update version to v2.1
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 18:14:39 -08:00
hailin
19e007b443
Add project documentation
2026-01-28 17:44:13 -08:00
hailin
27f9f200b5
Update company names and structure (Inc. for West, Ltd. for Asia)
2026-01-28 00:15:01 -08:00
hailin
353de1dd49
Add gogenex.com domain, restore full branding details
2026-01-28 00:08:52 -08:00
hailin
6da299f8f0
Update branding with unified domain gogenex.com
2026-01-28 00:06:26 -08:00
hailin
d1894c2efb
Rewrite README in English
2026-01-27 23:38:25 -08:00
hailin
6aef73bcce
Update README with brand naming strategy (Genex/Gensen/券信)
2026-01-27 23:37:38 -08:00
hailin
46636e659f
Add .gitignore file
2026-01-27 23:11:34 -08:00
hailin
95eaf7c8ec
first commit
2026-01-27 23:09:43 -08:00