Phase 5: alert subscriptions UI + multiple watchlists + queue fixes
CI / Test & Type-Check (push) Canceled after 0s
CI / Test & Type-Check (push) Canceled after 0s
UI: - /alerts page: event history with acknowledge, subscription create/manage with toggle - /admin/smtp: SMTP config form (host, port, auth, test) - Watchlist sidebar: dropdown selector for multiple watchlists, create/delete - Sidebar: alerts count badge, SMTP link under admin - Mobile tab nav: alerts tab added - Client trpc.ts: all new API methods + types Backend: - watchlists.listByWatchlist procedure + listSymbolsByWatchlist repo fn - yfinance min-interval 1500->2000ms to reduce Edge 429s - Fixed e.date.slice error in yfinance-adjustments with typeof guard - Removed defunct BITF from watchlist+queue - Cleared 83 failed + 12 backoff queue jobs Docs: - FUNCTIONAL_DESIGN.md: alerts + multiple watchlists + SMTP documented - TECH_DESIGN.md: new modules, tRPC procs, routes updated
This commit is contained in:
+11
-8
@@ -1,6 +1,6 @@
|
||||
# Investor Flow — Technical Design (as built)
|
||||
|
||||
**Audit date:** 2026-07-18
|
||||
**Audit date:** 2026-07-23
|
||||
**Companion:** [`FUNCTIONAL_DESIGN.md`](./FUNCTIONAL_DESIGN.md)
|
||||
**Canonical code roots:** `app/src` (Next frontend), `app/server/src` (Node backend)
|
||||
|
||||
@@ -83,7 +83,7 @@ app/server/src/
|
||||
trpc/router.ts ~2k LOC — all routers
|
||||
trpc/context.ts session, cookies, db, cache, queue injection
|
||||
db/schema.sql DDL (note: duplicate strategies blocks — debt)
|
||||
db/*Repository.ts watchlist, portfolio, emotion logs
|
||||
db/*Repository.ts watchlist, portfolio, emotion logs, alertSubscription
|
||||
cache/CacheRepository.ts content-addressed cache API
|
||||
queue/AdapterQueue.ts schedule, pause, retry, source cool-downs (ADR-0009)
|
||||
queue/sourceRatePolicy.ts 429 detect, cool-down ladders, min-intervals
|
||||
@@ -91,8 +91,10 @@ app/server/src/
|
||||
analysis/ indicators, rotation, seasonality, etfHoldingsFallback, tickerContext
|
||||
admin/ operator functions + CLI
|
||||
auth/ totp, oauth, backup codes
|
||||
alerts/AlertEngine.ts
|
||||
risk/RiskEngine.ts + haltCircuitBreaker.ts ← pure; NOT on tRPC
|
||||
alerts/AlertEngine.ts
|
||||
alerts/producers/ types.ts, index.ts (registry), insiderProducer.ts, new13daProducer.ts
|
||||
services/emailAlertService.ts nodemailer SMTP delivery + rate limit
|
||||
risk/RiskEngine.ts + haltCircuitBreaker.ts ← pure; NOT on tRPC
|
||||
sizing/SizingEngine.ts + convictionUnlock + twoAxisMatrix ← pure; NOT on tRPC
|
||||
strategy/BacktestEngine.ts
|
||||
screener/UniverseEvaluator.ts + SectorCrosslink.ts
|
||||
@@ -114,11 +116,11 @@ app/server/src/
|
||||
| `onboarding` | starter, complete |
|
||||
| `market` | snapshot, candles, indicators, truckSales, manufacturingPmi, rotation, rotationCheckForAlert, sectorHoldings |
|
||||
| `dashboard` | rollup |
|
||||
| `admin` | users, sessions, passwords, queue*, lint, data quality, X creds/accounts/prune, FRED key, pending/approve/reject, audit, serverRestart, gdprExport |
|
||||
| `alerts` | list, acknowledge, acknowledgeAll, unackedCount |
|
||||
| `admin` | users, sessions, passwords, queue*, lint, data quality, X creds/accounts/prune, FRED key, pending/approve/reject, audit, serverRestart, gdprExport, smtpConfig, smtpConfigUpdate, smtpConfigTest |
|
||||
| `alerts` | list, acknowledge, acknowledgeAll, unackedCount, createSubscription, listSubscriptions, updateSubscription, deleteSubscription |
|
||||
| `institutional` | flow, insiderStream, ownershipHistory, buyEvents |
|
||||
| `edgar` | filings_index, company_facts, filer_cik_meta, full_text_search, form13f_holdings, form4_tx |
|
||||
| `watchlists` | list, addSymbol, removeSymbol |
|
||||
| `watchlists` | list, listByWatchlist, listWatchlists, create, delete, rename, reorder, addSymbol, removeSymbol |
|
||||
| `portfolio` | holdings, addHolding, removeHolding |
|
||||
| `options` | chain, greeks |
|
||||
| `reports` | generate |
|
||||
@@ -168,9 +170,10 @@ app/src/
|
||||
| `/options-dd` | Options DD |
|
||||
| `/market-outlook` | Macro / rotation / notes |
|
||||
| `/trade-plan`, `/execution`, `/trade-closure`, `/daily-focus` | Process (local) |
|
||||
| `/alerts` | Alert events + subscriptions |
|
||||
| `/settings` | Auth + onboarding |
|
||||
| `/mobile` | Thin companion |
|
||||
| `/admin`, `/users`, `/queue`, `/audit-logs`, `/x-accounts` | Admin |
|
||||
| `/admin`, `/users`, `/queue`, `/audit-logs`, `/x-accounts`, `/smtp` | Admin |
|
||||
|
||||
### 5.2 Client coverage gap
|
||||
|
||||
|
||||
Reference in New Issue
Block a user