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:
@@ -316,6 +316,17 @@ export class TenantSchemaService {
|
||||
updated_at TIMESTAMPTZ DEFAULT NOW()
|
||||
)`,
|
||||
|
||||
// AI Investment Recommendations (saved per tenant)
|
||||
`CREATE TABLE "${s}".ai_recommendations (
|
||||
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
recommendations_json JSONB NOT NULL,
|
||||
overall_assessment TEXT,
|
||||
risk_notes JSONB,
|
||||
requested_by UUID,
|
||||
response_time_ms INTEGER,
|
||||
created_at TIMESTAMPTZ DEFAULT NOW()
|
||||
)`,
|
||||
|
||||
// Attachments (file storage for receipts/invoices)
|
||||
`CREATE TABLE "${s}".attachments (
|
||||
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
|
||||
Reference in New Issue
Block a user