phase-8g: add sqllite.

This commit is contained in:
Sai Kiran Vella
2026-06-05 23:34:25 -04:00
parent 447a86b46e
commit 83116baa3c
20 changed files with 2514 additions and 239 deletions
+6 -2
View File
@@ -8,11 +8,13 @@ import { AnalyzeController } from './controllers/analyze.controller';
import { ScreenerEngine } from './services/ScreenerEngine';
import { BenchmarkProvider } from './services/BenchmarkProvider';
import { PortfolioAdvisor } from './services/PortfolioAdvisor';
import { CalendarService } from './services/CalendarService';
import { LLMAnalyst } from './services/LLMAnalyst';
import { CatalystAnalyst } from './services/CatalystAnalyst';
import { YahooFinanceClient } from './clients/YahooFinanceClient';
import { MarketCallRepository } from './repositories/MarketCallRepository';
import { PortfolioRepository } from './repositories/PortfolioRepository';
import { createDb } from './db/index';
import { noopLogger } from './utils/logger';
interface BuildAppOptions {
@@ -52,16 +54,18 @@ export async function buildApp({ logger = true }: BuildAppOptions = {}) {
});
}
const db = createDb();
const yahoo = new YahooFinanceClient();
const benchmark = new BenchmarkProvider(yahoo, { logger: noopLogger });
const engine = new ScreenerEngine(yahoo, benchmark, { logger: noopLogger });
const advisor = new PortfolioAdvisor(yahoo);
const calSvc = new CalendarService(yahoo);
const llm = new LLMAnalyst({ logger: noopLogger });
const catalyst = new CatalystAnalyst({ logger: noopLogger });
new ScreenerController(engine).register(app);
new FinanceController(engine, new PortfolioRepository(), advisor).register(app);
new CallsController(new MarketCallRepository(), engine, yahoo).register(app);
new FinanceController(engine, new PortfolioRepository(db), advisor).register(app);
new CallsController(new MarketCallRepository(db), engine, calSvc).register(app);
new AnalyzeController(catalyst, llm).register(app);
app.get('/health', async () => ({ status: 'ok' }));