Commit Graph

465 Commits

Author SHA1 Message Date
hailin 27bd9d9d0a docs: add planting architecture optimization documentation
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 02:36:51 -08:00
hailin 781721a659 feat(withdrawal): implement withdrawal order and fund allocation system
- Add SystemAccount domain in authorization-service for managing regional/company accounts
- Implement fund allocation service in planting-service with multi-tier distribution
- Add WithdrawalOrder aggregate in wallet-service with full lifecycle management
- Create internal wallet controller for cross-service fund allocation
- Add Kafka event publishing for withdrawal requests
- Implement unit-of-work pattern for transactional consistency
- Update Prisma schemas with withdrawal order and system account tables

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 02:35:27 -08:00
hailin 001b6501a0 feat(deposit): add deposit balance API and Kafka consumer for deposit events
Blockchain Service:
- Add /api/v1/deposit/balances endpoint to query on-chain USDT balances
- Add JWT authentication (passport, passport-jwt)
- Add JwtStrategy, JwtAuthGuard, Public decorator

Wallet Service:
- Add Kafka consumer for blockchain.deposits topic
- Add DepositConfirmedHandler to process deposit events and update wallet balance

Infrastructure:
- Add JWT_SECRET env var to blockchain-service in docker-compose.yml
- Add blockchain-service routes to Kong API Gateway

Frontend:
- Fix deposit_service.dart API path (remove duplicate /api prefix)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 02:29:31 -08:00
hailin 26ecb39476 fix(mobile-app): pass referral code to backend during account creation
- Add inviterReferralCode storage key for temporary referral code storage
- Save referral code in guide page before navigating to onboarding
- Read and pass referral code to createAccount API in onboarding page
- Clear temp storage after successful account creation
- Improve QR code extraction to prioritize query params (?ref=, ?code=)

This fixes a critical bug where referral relationships were never
being established because the frontend wasn't passing the referral
code to the backend.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 02:10:57 -08:00
hailin d0487c4a7e feat(profile): integrate referral and authorization APIs for profile page
- Add Kong routes for identity-service /me, referral-service, and authorization-service
- Create AuthorizationService in Flutter for fetching user authorizations
- Extend ReferralService with getMyReferralInfo() and getDirectReferrals() methods
- Update profile_page.dart to display real team stats from APIs
- Fix authorization-service JWT strategy to accept identity-service token format
- Add decimal.js dependency to authorization-service
- Add prisma migration file for authorization-service

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 01:57:39 -08:00
hailin 15f617c9a9 fix(mobile-app): resolve Kotlin build errors in build.gradle.kts
- Rename getAutoVersionCode() to calculateNextVersionCode() to avoid
  JVM signature clash with auto-generated property getter
- Remove unnecessary Elvis operator for non-nullable flutter.versionName
- Migrate deprecated kotlinOptions.jvmTarget to kotlin.jvmToolchain DSL

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 01:07:58 -08:00
hailin a86131471c feat(mobile-app): auto-increment version code on each build
- Add version.properties file to track build number locally
- Auto-increment versionCode on every debug/release build
- Version name format: major.minor.patch.buildNumber (e.g., 1.0.0.123)
- Add version.properties to .gitignore (each developer has own build number)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 00:59:20 -08:00
hailin 18ac1f5c43 feat(mobile-app): add gallery image selection for QR code scanning
- Add image_picker import for gallery access
- Implement _pickImageAndScan() method to select and analyze images
- Add "从相册选择" button in QR scanner UI with loading state
- Show SnackBar feedback when QR code not found in image

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 00:44:13 -08:00
hailin 681f77fbf7 fix(mobile-app): display actual values in profile referral info card
- Show referrer serial number, community names, and company info
- Add _buildInfoItem helper for consistent label+value layout

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 00:10:11 -08:00
hailin 20e0f6c953 fix(mobile-app): use SharePageParams instead of Map for share navigation
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 23:56:32 -08:00
hailin dbe0cc2870 feat(mobile-app): change profile share button to navigate to share page
- Replace copy link action with navigation to share page
- Pass referralCode to share page for QR code generation
- Rename button text from '复制分享链接' to '分享邀请'

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 23:50:22 -08:00
hailin cb9e520fb4 feat(mobile-app): change share QR code to APK download link with referral code
QR code now contains: https://s3.szaiai.com/rwadurian/app-release.apk?ref={referralCode}
- User scans QR to download APK directly
- Guide page 5 already supports parsing ref parameter from URL

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 23:38:32 -08:00
hailin 5a5e360e73 docs(identity): update KAVA address format comments to EVM 2025-12-08 23:05:47 -08:00
hailin b9f3482b17 fix(identity): update KAVA address validation to EVM format
KAVA now uses EVM-compatible 0x addresses instead of Cosmos bech32 format.
DST continues to use Cosmos bech32 format (dst1...).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 23:04:14 -08:00
hailin 116a304431 feat(mobile-app): add app version info section to profile page
Display detailed application and device information at the bottom
of the profile page, below the "绑定邮箱" (Bind Email) menu item.

Information displayed:
- App version (e.g., v1.0.0)
- Build number
- Package name
- Device model (brand + model for Android, model for iOS)
- OS version (Android version with SDK / iOS version)
- Platform (Android/iOS)
- Copyright notice

Uses package_info_plus and device_info_plus packages
which are already dependencies in the project.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 22:45:34 -08:00
hailin 5d671bf5ec feat(referral): integrate referral system with identity-service and mobile-app
## Backend Changes

### referral-service
- Add accountSequence field to ReferralRelationship aggregate for cross-service user identification
- Add findByAccountSequence() method to repository interface and implementation
- Update CreateReferralRelationshipCommand to accept accountSequence and inviterAccountSequence
- Modify ReferralService to support looking up inviter by accountSequence
- Update event handler to listen to identity.UserAccountAutoCreated and identity.UserAccountCreated topics
- Add initial database migration with all tables including accountSequence field
- Update DTO and controller to support new parameters

### identity-service
- Add inviterSequence field to MeResult interface
- Update getMe() method to return inviterSequence from user account
- Update MeResponseDto to include inviterSequence field

## Frontend Changes (mobile-app)

### API & Storage
- Add /me endpoint constant in api_endpoints.dart
- Add inviterSequence key in storage_keys.dart
- Add MeResponse and WalletAddressInfo classes in account_service.dart
- Add getMe() method to fetch complete user info including inviter
- Add getInviterSequence() method to retrieve from local storage

### Profile Page
- Update profile_page.dart to load referrer info from API
- Add _loadMeData() method to call getMe() API
- Display inviterSequence (referrer serial number) dynamically

## Flow Summary
1. User creates account with optional inviterReferralCode
2. identity-service validates and saves inviterSequence
3. identity-service publishes UserAccountAutoCreated/UserAccountCreated event
4. referral-service listens and creates referral relationship using inviterAccountSequence
5. Mobile app calls GET /me to display inviter info in profile page

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 22:37:06 -08:00
hailin cf7230457f feat(blockchain-service): KAVA EVM address derivation and system accounts support
## Address Derivation Changes
- Change KAVA from Cosmos bech32 (kava1...) to EVM format (0x...)
- KAVA now uses same EVM address as BSC for deposit monitoring
- Add KAVA to evmChains set for automatic monitoring registration

## Database Schema Updates (Migration: 20241208000000)
- MonitoredAddress: add address_type, account_sequence, system_account_type,
  system_account_id, region_code columns
- DepositTransaction: add address_type, account_sequence, system_account_type,
  system_account_id columns
- Make user_id nullable for system account support
- Create recovery_mnemonics table for account recovery
- Add indexes: idx_account_sequence, idx_type_active, idx_system_account_type,
  idx_deposit_account, and recovery_mnemonics indexes

## New Features
- Withdrawal request handler and Kafka consumer
- Test USDT deployment scripts for KAVA and BSC
- Smart contracts for TestUSDT token

## Infrastructure Updates
- Update mappers for new schema fields
- Update application and infrastructure modules

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 21:45:34 -08:00
hailin 78304801f5 feat(identity): change username format to '榴莲女皇x号'
- Replace random username generation with fixed format
- Username now uses accountSequence: '榴莲女皇{序列号}号'
- Keep random durian-themed SVG avatar generation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 20:16:11 -08:00
hailin e8be584336 feat(mobile-app): add DST network support to deposit page
- Add DST to NetworkType enum
- Add dstAddress field to DepositAddressResponse
- Update deposit_service to fetch and cache DST address
- Add DST network button in deposit page UI

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 19:25:29 -08:00
hailin c6c4a75984 fix(mobile-app): remove cacheWidth/cacheHeight to fix avatar blur on high-DPI screens
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 19:11:00 -08:00
hailin 8eefd807c3 perf(mobile-app): optimize avatar loading with parallel fetch and file caching
- Use Future.wait for parallel data loading (faster initial load)
- Add file.existsSync() check before using Image.file
- Add cacheWidth/cacheHeight and gaplessPlayback for smoother display
- Add _checkLocalAvatarSync for early avatar path detection

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 19:04:13 -08:00
hailin 3e01f69044 fix(mobile-app): cache avatar locally instead of always loading from network
- Add local avatar caching in AccountService:
  - getLocalAvatarPath(): get cached avatar file path
  - _saveAvatarToLocal(): save avatar to local after upload
  - downloadAndCacheAvatar(): download and cache remote avatar
- Update profile_page and mining_page to use local avatar:
  - Priority: local file > network URL > SVG > default icon
  - Background download and cache if remote URL exists but no local cache
- Clean up local avatar file on logout

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 12:23:50 -08:00
hailin e8e0c6db86 fix(mobile-app): fix avatar and wallet address issues after mnemonic recovery
- Mining page: use accountService to load avatar (consistent with profile page)
- Account recovery: fetch and save wallet addresses after successful recovery
- Account recovery: set isWalletReady=true to skip backup mnemonic page
- Deposit service: read wallet addresses from local storage or fetch from /user/wallet API

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 12:13:39 -08:00
hailin 3c2144ad7c feat(deposit): add accountSequence correlation and testnet support
blockchain-service:
- Add accountSequence to monitored_addresses and deposit_transactions
- Support BSC/KAVA testnet via NETWORK_MODE environment variable
- Add chain config service with testnet RPC endpoints
- Update deposit detection with accountSequence propagation

wallet-service:
- Add accountSequence to wallet_accounts and ledger_entries
- Fix JWT strategy to match identity-service token format
- Update deposit handling with accountSequence correlation
- Add repository methods for accountSequence-based queries

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 10:26:01 -08:00
hailin 6b85401d5c fix(mnemonic): fix recovery-by-mnemonic using hash verification instead of address matching
## Problem
MPC wallet addresses have no cryptographic relationship with recovery mnemonics,
so address-based verification always failed for account recovery.

## Solution
Changed mnemonic verification from address matching to hash-based verification:
- Mnemonic acts as identity credential, verified by hash stored in blockchain-service
- Uses accountSequence to lookup stored mnemonic hash for verification

## Changes

### blockchain-service
- recovery-mnemonic.adapter.ts:
  - generateMnemonic() now async, uses bcrypt (rounds=12) for secure hashing
  - verifyMnemonic() now async, supports both bcrypt and legacy SHA256 hashes
  - Added backward compatibility for existing SHA256 hashed mnemonics
- mnemonic-verification.service.ts:
  - await verifyMnemonic() for async bcrypt comparison
- address-derivation.service.ts:
  - await generateMnemonic() for async bcrypt hashing
- package.json: added bcrypt dependency

### identity-service
- user-application.service.ts:
  - Changed recoverByMnemonic() to use verifyMnemonicByAccount (hash verification)
  - Added rate limiting: 5 failed attempts per hour per accountSequence
  - Uses Redis to track failed verification attempts
- redis.service.ts:
  - Added incr() and expire() methods for rate limiting
  - Added updateKeygenStatusAtomic() with Lua script for atomic state transitions
- mpc-keygen-completed.handler.ts:
  - Uses atomic Redis update to prevent race conditions
- blockchain-wallet.handler.ts:
  - Uses atomic Redis update for completed status

## Security Improvements
- bcrypt with 12 rounds for mnemonic hashing (anti-brute-force)
- Rate limiting prevents brute force attacks on mnemonic recovery
- Atomic Redis operations prevent race conditions in wallet creation flow

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 09:02:24 -08:00
hailin d983525aa5 fix(wallet): resolve account creation and wallet status query issues
This commit fixes three critical bugs that prevented the wallet creation
flow from completing successfully:

1. mpc-service: extraPayload not included in Kafka messages
   - KeygenCompletedEvent's extraPayload (containing userId, accountSequence,
     username, derivedAddresses) was being set dynamically but not serialized
   - identity-service received events without userId and skipped processing
   - Fix: Merge extraPayload into the published payload in event-publisher

2. mpc-service: KAFKA_BROKERS hostname mismatch
   - mpc-service used KAFKA_BROKERS=rwa-kafka:29092
   - Kafka advertises itself as kafka:29092 in cluster metadata
   - During consumer group rebalance, mpc-service couldn't connect to
     the coordinator address returned by Kafka
   - Fix: Use kafka:29092 to match Kafka's advertised listener

3. blockchain-service: recovery_mnemonics table missing
   - RecoveryMnemonic model exists in schema.prisma but not in migration
   - prisma migrate deploy found no pending migrations
   - Address derivation failed with "table does not exist" error
   - Fix: Use prisma db push instead of migrate deploy to sync schema

Tested: E2E flow now completes successfully
- POST /user/auto-create creates account
- MPC keygen completes and publishes event with extraPayload
- blockchain-service derives addresses and saves recovery mnemonic
- GET /user/wallet returns status=ready with 3 addresses and mnemonic

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 07:57:17 -08:00
hailin 43016e9ee8 fix(prisma): remove redundant migrations and duplicate indexes
- mpc-service: remove duplicate index idx_ms_username on mpc_shares.username
  (keep only unique index uq_ms_username since username is unique)
- identity-service: remove redundant migration 20241206000000_add_device_hardware_info
  (fields already exist in initial migration 20241204000000_init)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 07:08:24 -08:00
hailin 1bfbaa06f1 feat(mnemonic): propagate accountSequence through MPC keygen flow (DDD)
Changes across all three services to properly associate recovery mnemonics
with account sequence numbers instead of user IDs, following DDD principles:

identity-service:
- Add accountSequence to MpcKeygenRequestedEvent payload
- Pass accountSequence when publishing keygen request
- Remove direct access to recoveryMnemonic table (now in blockchain-service)
- Call blockchain-service for mnemonic backup marking
- BlockchainWalletHandler no longer saves mnemonic (stored in blockchain-service)

mpc-service:
- Add accountSequence to KeygenRequestedPayload interface
- Pass accountSequence through to blockchain-service when deriving addresses
- Include accountSequence in KeygenCompleted event extraPayload

blockchain-service:
- Add accountSequence to derive-address API and internal interfaces
- Add accountSequence to KeygenCompletedPayload extraPayload
- Add PUT /internal/mnemonic/backup API for marking mnemonic as backed up
- Store recovery mnemonic with accountSequence association

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 01:08:27 -08:00
hailin e95dc4ca57 refactor(mnemonic): move recovery_mnemonics to blockchain-service (DDD)
- Add RecoveryMnemonic model to blockchain-service with accountSequence
- Add MnemonicVerificationService for mnemonic verification logic
- Update verify-mnemonic-hash endpoint to accept accountSequence
- Remove PrismaService dependency from identity-service handler
- identity-service now calls blockchain-service for mnemonic verification

This follows DDD principles: blockchain-service owns all mnemonic-related
data and operations, identity-service only handles account identity.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 00:54:25 -08:00
hailin 0311ecf498 fix(mnemonic): use hash verification instead of address derivation for account recovery
The mnemonic recovery now uses stored hash comparison via blockchain-service
instead of trying to derive addresses from mnemonic (which never matched
because MPC wallet addresses are not derived from mnemonics).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 00:44:47 -08:00
hailin 1a5bafec1a fix: add api/v1 prefix to BLOCKCHAIN_SERVICE_URL 2025-12-08 00:09:54 -08:00
hailin 3df55fcd6a fix: add BLOCKCHAIN_SERVICE_URL=http://blockchain-service:3012 for mnemonic verification 2025-12-08 00:04:39 -08:00
hailin 56de1bff83 revert: remove BLOCKCHAIN_SERVICE_URL override, use default port 3000 2025-12-07 23:57:59 -08:00
hailin a7a7b6b8f6 fix(services): add BLOCKCHAIN_SERVICE_URL to identity-service
Fix mnemonic verification by connecting to blockchain-service on port 3012

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 23:50:55 -08:00
hailin d391896c9d chore(mobile-app): update Container.svg asset
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 23:33:55 -08:00
hailin dd26b9f48f fix(mobile-app): refresh avatar on profile page after upload
Add _hasChanges flag to track changes and pass result when navigating back

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 23:32:42 -08:00
hailin 0622dd14d9 fix(mobile-app): fix avatar upload response parsing
Parse avatarUrl from nested data object in API response

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 23:28:04 -08:00
hailin 2613a601b4 chore: update MinIO credentials in .env.example files
Sync MINIO_SECRET_KEY default value with MinIO server config

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 23:22:45 -08:00
hailin e825d6938d fix(mobile-app): don't clear auth data on token refresh failure
Avoid clearing user's auth data when token refresh fails due to
network errors or other transient issues. Only clear on explicit
refresh token expiration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 22:49:19 -08:00
hailin c27f8e801e fix(mobile-app): accept 201 status code for token refresh
auto-login API returns 201 (Created) not 200, causing token refresh
to fail even though the response was successful

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 22:46:49 -08:00
hailin c771a81e05 fix(mobile-app): fix 401 token refresh not working
1. Add /user/auto-login to publicPaths so it doesn't inject old token
2. Skip 401 handling for auto-login itself to avoid recursion
3. Add debug logs for token refresh flow

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 22:43:30 -08:00
hailin 0cf9f023f9 fix(mobile-app): fix token refresh parsing from auto-login response
API returns { success, data: { accessToken, refreshToken } } but code
was reading accessToken directly from response.data instead of
response.data.data

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 22:34:24 -08:00
hailin b1e51bd73b fix: change MINIO_PUBLIC_URL from cdn to minio.szaiai.com
CDN domain has nginx host header issue, use minio.szaiai.com directly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 22:26:30 -08:00
hailin 91c8bba80d fix(identity-service): configure MinIO to connect to external server
- Update MINIO_ENDPOINT from localhost to 192.168.1.100 (Server A)
- Add MinIO environment variables to docker-compose.yml
- Set MINIO_PUBLIC_URL to https://cdn.szaiai.com for CDN access
- Add MinIO config section to backend/services/.env.example

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 22:22:55 -08:00
hailin 2256ff69bf fix(minio): use HTTP-only nginx config for initial install
Remove SSL configuration from nginx config file. SSL will be added
automatically by certbot when running ./install.sh --ssl

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 22:18:23 -08:00
hailin 39db791a30 feat(mobile-app): implement avatar upload with image picker
- Add image picker for camera and gallery selection
- Add uploadAvatar method in AccountService
- Support SVG and image URL display in ProfilePage and EditProfilePage
- Add avatarUrl storage key for uploaded avatars
- Show upload progress indicator during avatar upload

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 22:10:31 -08:00
hailin 97ef204f7c docs(minio): clarify nginx installation steps
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 22:02:15 -08:00
hailin 81cd90eae0 fix(identity): add StorageService to InfrastructureModule in app.module.ts
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 21:53:06 -08:00
hailin 0989d914de chore(identity): update package-lock.json for minio and multer
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 21:42:16 -08:00
hailin 550a3dba06 feat(identity): add avatar upload with MinIO storage
- Add StorageService for MinIO object storage operations
- Add upload-avatar API endpoint with file validation
- Support jpg, png, gif, webp formats (max 5MB)
- Auto-update user profile after avatar upload

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 21:38:35 -08:00