Phase 6: Expand market rates and enhance AI investment recommendations
- Rate fetcher now scrapes CD, Money Market, and High Yield Savings rates from Bankrate.com with pauses between fetches to avoid rate limiting - Historical rate data is preserved (no longer deleted on each fetch) - Database migration adds rate_type column and tenant ai_recommendations table - Backend returns market rates grouped by type with latest-batch-only queries - AI prompt now includes all three rate types for comprehensive analysis - AI recommendations are saved per-tenant for retrieval on page load - Frontend: "Market CD Rates" replaced with "Today's Market Rates" tabbed view - Rates section is collapsible (expanded by default) to save screen space - Saved recommendations load automatically with "Last Updated" timestamp Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -17,11 +17,23 @@ export class InvestmentPlanningController {
|
||||
}
|
||||
|
||||
@Get('cd-rates')
|
||||
@ApiOperation({ summary: 'Get latest CD rates from market data' })
|
||||
@ApiOperation({ summary: 'Get latest CD rates from market data (backward compat)' })
|
||||
getCdRates() {
|
||||
return this.service.getCdRates();
|
||||
}
|
||||
|
||||
@Get('market-rates')
|
||||
@ApiOperation({ summary: 'Get all market rates grouped by type (CD, Money Market, High Yield Savings)' })
|
||||
getMarketRates() {
|
||||
return this.service.getMarketRates();
|
||||
}
|
||||
|
||||
@Get('saved-recommendation')
|
||||
@ApiOperation({ summary: 'Get the latest saved AI recommendation for this tenant' })
|
||||
getSavedRecommendation() {
|
||||
return this.service.getSavedRecommendation();
|
||||
}
|
||||
|
||||
@Post('recommendations')
|
||||
@ApiOperation({ summary: 'Get AI-powered investment recommendations' })
|
||||
getRecommendations(@Req() req: any) {
|
||||
|
||||
Reference in New Issue
Block a user