- Add @aws-sdk/client-s3 and @aws-sdk/s3-request-presigner dependencies
- Add storage config section to config/index.ts
- Fix users.controller.ts imports (db, AuthenticatedRequest, logger)
- Update education.types.ts with backward-compatible alias properties
- Add missing interfaces: LessonResource, QuizOption
- Change QuizQuestion.options from Record to QuizOption[]
- Fix education services to align with updated types
- Export ML service types properly in ml.module.ts
- Fix portfolio/snapshot.repository.ts type cast
- Fix trading/order.service.ts number type
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implement MVP video processing service for education module:
- Video transcoding to multiple resolutions (1080p, 720p, 480p)
- Thumbnail generation from video
- Metadata extraction (duration, codec, dimensions)
- Mock/placeholder implementation for MVP
- Extensive TODO comments for production FFmpeg/MediaConvert integration
Technical Details:
- Storage integration with S3/R2 via storage.service
- Returns mock metadata for MVP (can upgrade to real processing later)
- Supports queueing for background processing
- Clear upgrade path documented in code comments
Files:
- src/shared/services/video-processing.service.ts (NEW): Video processing service
- src/modules/education/services/video.service.ts (UPDATED): Import processing service
Status: BLOCKER-003 (ST4.3) - 67% complete
Task: #9 ST4.3.4 - Backend video processing service
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Added RiskQuestionnaireResponse interface for risk questionnaire responses
- Added WithdrawalDestinationDetails interface for withdrawal destinations
- Added SnapshotAllocationData interface for portfolio snapshot allocations
- Added TradingBotStrategyConfig interface for bot strategy configuration
All major JSONB fields now have proper TypeScript interfaces instead of
generic Record<string, unknown>. This improves type safety and code clarity.
Note: ML module already had proper JSONB typing (TrainingMetrics, etc.)
Note: Education module JSONB typing was completed in ST1.5
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Created apps/backend/src/modules/portfolio/types/portfolio.types.ts
- Consolidated all portfolio type definitions from DDL
- Updated repositories to import from centralized types
- Updated service to use centralized types (removed duplicates)
- Updated controller to import RiskProfile from types
- Removed 73 lines of duplicate type definitions
Fixes coherence gap E-COH-004 where portfolio types were absent in backend.
All types now align with DDL schema (portfolio.* enums and tables).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Import and initialize portfolioWebSocket in index.ts
- Add graceful shutdown for portfolioWebSocket
- Enable real-time portfolio updates via WebSocket
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add portfolio.websocket.ts for real-time portfolio updates
- Add snapshot.repository.ts for historical performance data
- Add getPortfolioPerformance and getPerformanceStats endpoints
- Update routes with /performance and /performance/stats
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Created portfolio.repository.ts with CRUD operations for portfolios and allocations
- Created goal.repository.ts with CRUD operations for portfolio goals
- Updated portfolio.service.ts to use repositories with in-memory fallback
- Migrated createPortfolio, getPortfolio, getUserPortfolios methods
- Migrated updateAllocations, executeRebalance methods
- Migrated createGoal, getUserGoals, updateGoalProgress, deleteGoal methods
- Added helper functions for mapping between repo and service types
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- withdrawal.repository.ts: CRUD for withdrawal_requests table
- distribution.repository.ts: CRUD for profit_distributions table
- product.repository.ts: CRUD for products table with DB/in-memory fallback
- transaction.service.ts: Migrated withdrawal and distribution to repositories
- product.service.ts: Added DB support with in-memory defaults fallback
All investment entities now persist to PostgreSQL instead of in-memory storage.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- account.service.ts: Now uses accountRepository instead of in-memory Map
- transaction.service.ts: Now uses transactionRepository for transactions
- Added account.repository.ts with full CRUD and balance operations
- Added transaction.repository.ts with query, create, and update operations
- Withdrawal and distribution entities still use in-memory storage
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Firebase client for FCM push notifications
- Update notification service with push token management
- Add push token registration/removal endpoints
- Update all queries to use auth schema
- Add comprehensive unit tests for notification.service
- Add unit tests for distribution.job
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
NestJS backend with:
- Authentication (JWT)
- WebSocket real-time support
- ML integration services
- Payments module
- User management
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>