UI enhancemnts

This commit is contained in:
saikiranvella
2026-06-09 19:34:31 -04:00
parent 5c8cd8935a
commit 662a717916
55 changed files with 6226 additions and 465 deletions
+7 -1
View File
@@ -10,6 +10,7 @@ import { PortfolioAdvisor } from './domains/portfolio';
import { CallsController, CalendarService } from './domains/calls';
import { AuthController, AuthService, UserStore, verifyJwt } from './domains/auth';
import type { TokenPayload } from './domains/auth';
import { WatchlistController, WatchlistRepository } from './domains/watchlist';
// Shared infrastructure
import {
@@ -19,6 +20,7 @@ import {
LLMAnalyst,
MarketCallRepository,
PortfolioRepository,
SignalSnapshotRepository,
createDb,
DatabaseConnection,
QueryAudit,
@@ -124,12 +126,14 @@ export async function buildApp({ logger = true, db: injectedDb }: BuildAppOption
const innerWidth = Math.max(line1.length, line2.length) + 2;
const hr = '─'.repeat(innerWidth);
const pad = (s: string) => `${s}${' '.repeat(innerWidth - 1 - s.length)}`;
/* eslint-disable no-console -- boot-time invite code must reach the operator's terminal */
console.log(`\n┌${hr}`);
console.log(pad(''));
console.log(pad(line1));
console.log(pad(line2));
console.log(pad(''));
console.log(`${hr}\n`);
/* eslint-enable no-console */
const userStore = new UserStore(db);
const authService = new AuthService(userStore, JWT_SECRET);
@@ -137,7 +141,7 @@ export async function buildApp({ logger = true, db: injectedDb }: BuildAppOption
// Register controllers
// Public routes (GET) remain open; write routes require JWT + trader role
new ScreenerController(engine, catalystCache).register(app);
new ScreenerController(engine, catalystCache, new SignalSnapshotRepository(db)).register(app);
new FinanceController(engine, new PortfolioRepository(db), advisor, {
authGuard,
traderGuard,
@@ -148,6 +152,8 @@ export async function buildApp({ logger = true, db: injectedDb }: BuildAppOption
}).register(app);
new AnalyzeController(catalystCache, llm).register(app);
new WatchlistController(new WatchlistRepository(db), { authGuard }).register(app);
app.get('/health', async () => ({ status: 'ok' }));
return app;