Commit Graph

11 Commits

Author SHA1 Message Date
Adrian Flores Cortes
190decd498 fix(frontend): correct WebSocket URLs and ports
- Backend WS: Changed from localhost:3000/ws/trading to localhost:3080/ws
- ML Engine WS: Changed from localhost:8001 to localhost:3083
- Portfolio WS: Changed from localhost:3000/ws/portfolio to localhost:3080/ws
- Backend uses single /ws path with message types for channel differentiation
- ML Engine has dedicated /ws/signals endpoint

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 05:50:35 -06:00
Adrian Flores Cortes
1d76747e9b fix: Centralize API clients and add global ErrorBoundary (Phase 3)
Migrate 6 services from duplicate Axios instances to centralized
apiClient (auto-refresh, multi-tab sync, proper 401 handling):
- trading.service.ts, notification.service.ts, payment.service.ts
- education.service.ts, chat.service.ts, investment.service.ts

Add global ErrorBoundary wrapping all App routes. Move assistant
module ErrorBoundary to shared components/ErrorBoundary.tsx.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 04:56:44 -06:00
Adrian Flores Cortes
ff404a84aa feat(education): Integrate real video upload API (ST4.3.5)
Replace simulated video upload with real multipart upload to backend.

New Files:
- src/services/video-upload.service.ts (NEW): Complete multipart upload service
  - Initialize upload with backend
  - Split file into 5MB parts
  - Upload parts to S3/R2 using presigned URLs
  - Upload max 3 parts in parallel
  - Complete upload and return video object
  - Full upload flow with progress callbacks

Updated Files:
- src/modules/education/components/VideoUploadForm.tsx (UPDATED):
  - Import videoUploadService
  - Replace simulated upload (lines 214-248) with real API calls
  - Use progress callbacks to update UI
  - Handle real video ID on completion
  - Maintain all existing UI/UX behavior

Upload Flow:
1. User selects video + fills metadata
2. Call videoUploadService.uploadVideo()
3. Backend initializes multipart upload
4. Split file into 5MB chunks
5. Upload chunks to S3/R2 (presigned URLs)
6. Backend completes upload
7. Video processing starts automatically
8. UI shows real-time progress

Technical Details:
- Part size: 5MB (optimal for network)
- Max concurrent uploads: 3 parts
- Uses fetch API for S3 direct upload
- ETags returned for multipart completion
- Full error handling and retry capability

Status: BLOCKER-003 (ST4.3) - 89% complete (5/6 tasks done)
Task: #10 ST4.3.5 - Frontend integrar VideoUploadForm con backend

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:41:18 -06:00
Adrian Flores Cortes
b6654f27ae feat(auth): Implement auto-refresh token interceptor (ST4.1)
BLOCKER-001: Auto-Refresh Tokens - Core functionality

Implemented:
- Centralized API client with auto-refresh interceptor
- Request queueing (prevents multiple simultaneous refreshes)
- Retry logic (max 1 retry per request)
- Token management (getAccessToken, getRefreshToken, setTokens, clearTokens)
- Auth service migrated to use apiClient

Files:
- src/lib/apiClient.ts (new, 237 lines)
- src/services/auth.service.ts (updated to use apiClient)

Part of ST4.1: Auto-Refresh Tokens.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 19:16:58 -06:00
Adrian Flores Cortes
49d6492c91 [OQI-003] feat: Add AlertsPanel component for price alerts management
- Create AlertsPanel component with full CRUD functionality
- Add alerts API functions to trading.service.ts
- Integrate AlertsPanel into Trading.tsx with toggle button
- Support for above/below/crosses conditions
- Push and email notification options
- Recurring alerts support
- Filter by active/inactive status

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 09:41:05 -06:00
Adrian Flores Cortes
e158d4228e [OQI-004] feat: Add AccountDetail page and investment service
- Create AccountDetail.tsx with tabs for overview, transactions, distributions, deposit, withdraw
- Create investment.service.ts with full API client for investment endpoints
- Add routes /investment/portfolio, /investment/products, /investment/accounts/:accountId
- Integrate DepositForm and WithdrawForm components
- Add canvas-based performance chart

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 09:16:24 -06:00
Adrian Flores Cortes
fd54724ede [OQI-008] feat: Add portfolio store with WebSocket real-time updates
- Create portfolioStore.ts with Zustand for state management
- Add portfolioWS instance for real-time portfolio updates
- Add usePortfolioUpdates hook for WebSocket subscriptions
- Refactor PortfolioDashboard to use store instead of local state
- Add WebSocket connection status indicator (Live/Offline)
- Add last update timestamp display

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 08:47:46 -06:00
Adrian Flores Cortes
c02625f37b [OQI-008] feat: Add portfolio Phase 3 - Performance chart and edit allocations
- Add PerformanceChart component with canvas-based line chart
- Add EditAllocations page for modifying target allocations
- Integrate PerformanceChart into PortfolioDashboard
- Add route for /portfolio/:portfolioId/edit
- Extend portfolio.service with performance API functions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 08:40:47 -06:00
Adrian Flores Cortes
b8a7cbe691 [OQI-008] feat: Add Portfolio Manager frontend module
- Created portfolio.service.ts with API client functions
- Created AllocationChart component (donut chart)
- Created AllocationTable component (detailed positions)
- Created RebalanceCard component (rebalancing recommendations)
- Created GoalCard component (financial goal progress)
- Created PortfolioDashboard page (main dashboard)
- Created CreatePortfolio page (new portfolio form)
- Created CreateGoal page (new goal form)
- Updated App.tsx with portfolio routes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 08:31:26 -06:00
Adrian Flores Cortes
b7de2a3d58 feat: Add NotificationCenter UI components
- Add notification service for API calls
- Add notification Zustand store with WebSocket integration
- Create NotificationBell component with badge
- Create NotificationDropdown with recent notifications
- Create NotificationItem with icons and actions
- Update MainLayout to use NotificationBell

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 03:57:45 -06:00
5b53c2539a feat: Initial commit - Trading Platform Frontend
React frontend with:
- Authentication UI
- Trading dashboard
- ML signals display
- Portfolio management

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 04:30:39 -06:00