UI enhancemnts
This commit is contained in:
+7
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user