ProTerminal.io — Institutional-Grade Market Terminal
7/11/2026

The admin screenshots below are from the live product with customer PII (names, emails, phone numbers, payment details) intentionally blurred. Business metrics are shown as-is.
Overview
ProTerminal.io is an institutional-grade stock-market terminal delivered as a SaaS — the kind of data depth normally reserved for Bloomberg-class tooling, built for individual investors and traders. It pairs a real-time, multi-panel terminal with professional TradingView charting, a unique dilution-risk engine covering 4,300+ US companies, a full suite of screeners and calendars, congressional & insider-trading trackers, an AI-hosted financial-TV livestream, and a deep operator admin console — all fed by a high-throughput background data platform that makes 50,000–80,000 market-data API calls a day.
It is a genuinely large system: a four-part architecture (web client, API server, background job server, and livestream engine) over MongoDB + Redis, deployed across two 32-core servers.

Architecture
┌──────────────────────────────────────────┐
Browser ──HTTPS──▶ │ API SERVER (Express, 16-instance PM2) │
(React 19 SPA) │ REST 50+ route groups · JWT + API-key │
▲ ▲ │ WebSocket: /ws/scanner · /ws/fmp/quote │
│ │ └───────────┬─────────────────┬────────────┘
WebSocket ticks │ read │ read/cache
│ ▼ ▼
│ ┌────────────┐ ┌────────────┐
│ │ MongoDB │ │ Redis │
│ │ Atlas M30 │ │ cache+queue│
│ │ 50+ colls │ └─────▲──────┘
│ └─────▲──────┘ │ BullMQ
│ │ write │
│ ┌──────────────────┴───────────────────────────────┐
│ │ BACKGROUND JOB SERVER (BullMQ · node-cron) │
│ │ 4 queues · 100+ jobs · Bottleneck rate budgets │
│ │ providers: FMP · Polygon · SEC EDGAR · Gemini │
│ └───────────────────────────────────────────────────┘
│
┌────┴─────────────────────────────────────────────┐
│ AI LIVESTREAM ENGINE (LLM brain + TTS + OBS) │
│ Playwright drives the real terminal on-screen │
└───────────────────────────────────────────────────┘
- Client (
client/): React 19 + Vite, TanStack Query for server-state, TradingView Charting Library, Tailwind, Google OAuth + reCAPTCHA, and a set of WebSocket services (movers, quotes, futures, forex, indices). A command palette (⌘K), resizable panels, and a Bloomberg-style data-dense UI. - Server (
server/): Express + MongoDB (Mongoose) + Redis, run as a 16-instance PM2 cluster. 50+ REST route groups, JWT + API-key auth, a WebSocket market scanner and an FMP-compatible quote stream, Stripe/Authorize.net billing, Resend email, ExcelJS/PDFKit exports. - Background (
background/): the data engine (below) — and the paper-trading matching engine that fills simulated orders against the live Polygon tick stream. - Livestream (
livestream/): the AI financial-TV engine (below).
The Terminal & Charting
The terminal is a resizable, multi-panel workspace: a discovery sidebar (watchlists, screener results, sectors, themes), a central TradingView chart with pre/post-market sessions and multiple timeframes, and a context panel (overview, earnings, news, press releases, financials). Quotes stream live over WebSockets; the scanner pushes gainers/losers/most-active snapshots every couple of seconds during market hours.



Paper Trading
A risk-free trading simulator built directly on the platform's live market data. Every user gets a $100,000 virtual account and trades the full US universe with realistic fills — market, limit, stop and stop-limit orders, long or short, day or GTC — then tracks performance and climbs an opt-in leaderboard. It behaves like a real brokerage: an order ticket, positions and open-orders blotters, trade history, a Reg-T margin engine with buying power and margin calls, and your resting orders and open positions drawn as lines straight onto the TradingView chart.

Under the hood it is a genuine exchange-style matching engine, not a shares-times-price mock.
Polygon WS ──▶ "massive:trades" (shared tick fan-out over Redis pub/sub)
│
▼
┌───────────────────────────────────────────────┐
│ MATCHING ENGINE (background service) │
│ in-memory Map<symbol, Map<orderId, order>> │
│ kept fresh 3 ways: │
│ • paper:orders:changed pub/sub │
│ • 60s full Mongo reconcile (self-heal) │
│ • 10s broker heartbeat │
│ each tick → evaluateTrigger(order, price) │
│ market · limit · stop · stop-limit │
│ serialized through a single promise chain │
└───────────────────┬───────────────────────────┘
│ fill
▼
┌────────────────────────────────────────────────────┐
│ FILL EXECUTOR — 4 layers of concurrency safety │
│ 1. Redis per-account lock (Lua CAS + TTL watchdog)│
│ 2. MongoDB multi-doc txn (w:majority) │
│ 3. order-status compare-and-swap │
│ 4. unique idempotency index on the trade ledger │
└───────────────────────┬────────────────────────────┘
│
┌──────────────┴───────────────┐
▼ ▼
PaperPosition PaperTrade (immutable ledger)
signed qty · avgPrice fill · dividend · split_adjust
A real matching engine. The engine registers as a pseudo-consumer of the platform's existing
Polygon tick fan-out (massive:trades) and keeps an in-memory index of every working order. On
each incoming print it evaluates the trigger for market, limit, stop and stop-limit orders and
fills at the trade price. That index is kept honest three ways — a paper:orders:changed pub/sub
channel, a 60-second full reconcile against MongoDB that heals any missed message, and a broker
heartbeat — and a 30-second sweep job catches fills on sparse-printing symbols the live stream
might miss. Stale-print and odd-lot "fat print" guards stop a single bad tick from filling an order
at a fantasy price.
Concurrency done right. Placing an order runs a read-compute-write buying-power check, and 16
API workers plus the engine can all touch the same account at once — a classic write-skew hazard
that database transactions alone don't close, because concurrent placements each touch a
different order document. The answer is a four-layer model: a Redis per-account distributed
lock (taken with SET … NX PX, released with a Lua compare-and-delete, and extended by a
watchdog so a slow commit can't outlive it) wrapped around a MongoDB multi-document transaction
at w:majority, with an order-status compare-and-swap so exactly one process can transition an
order, all backed by a unique idempotency index on the trade ledger as a structural
double-fill backstop. When intermittent 503 LOCK_UNAVAILABLE errors appeared under load, the root
cause was an ioredis client silently dropping its idle socket between orders; the hardening —
offline-queue buffering, jittered retries, and collapsing the market-order path to a single lock
acquisition — is the kind of production polish that separates a demo from a product.
Reg-T margin, modeled honestly. A pure, unit-tested margin module computes equity, initial and
maintenance requirements and buying power (2 × (equity − initialReq − committedMargin)), enforces
margin calls, and only lets risk-reducing or reduceOnly orders through when an account is
impaired. Positions live in their own collection with signed quantities; every fill writes an
immutable ledger entry (fill, dividend, split_adjust) and a daily equity snapshot feeds the
performance analytics and equity curve.
Markets & Research
A research suite ranks and surfaces opportunities across factors: a proprietary Smart Score (profitability, valuation, growth, momentum, dividend, short interest, insider buying, analyst sentiment), top analyst stocks, most-active insiders, short-squeeze candidates, largest companies, AI/tech baskets, and an AI-assisted Fortune 500 valuation with DCF/comps fair-value ranges.

Screeners
Four screeners — stocks, ETFs, penny stocks, and technicals — run server-side over the full universe with 50+ fundamental and technical filters, quick presets (value, growth, aristocrats, cap tiers), live KPI tiles, and CSV export.
Dilution Center (flagship)
The Dilution Center is ProTerminal's signature feature: continuous dilution-risk tracking for 4,300+ small- and micro-cap companies. The engine ingests SEC EDGAR filings and XBRL company facts, parses 10-Q buyback/share data, monitors shelf registrations (S-1/S-3) and their effectiveness, extracts warrant series and offering terms from filings with Google Gemini, and rolls everything into per-symbol risk scores and timelines — surfaced as latest risk analysis, new filings, completed offerings, pending S-1s, reverse splits, and high-risk lists.
Calendars & Tools
A deep bench of market tools and calendars: earnings, dividends, IPOs, economic releases, FDA catalysts, stock splits, buybacks, market holidays — plus options (Black-Scholes Greeks), dividend calculators, securities class-action tracking, and stock comparison.
Politician & Insider Trading
STOCK-Act congressional disclosures and Form 4 insider transactions are ingested, normalized, and analyzed (1/3/6/9/12-month performance), with per-politician profiles and per-company history.
Dividends, News & Intelligence
A dividend center (best payers, aristocrats, high-yield, comparison, calculators), a press-release scanner, an AI-written news/blog hub, original Pro Terminal Intelligence research, and an education library round out the platform.

Background Data Engine
The background service is where the platform's depth comes from. A market-hours-aware node-cron scheduler enqueues work onto four BullMQ queues; workers execute 100+ distinct job types and write to 50+ MongoDB collections. A global Bottleneck rate-limiter enforces a per-minute API budget split across priorities so real-time work never starves and historical backfills never blow the limit.
Queues (Redis-backed):
updates (concurrency 16) realtime quotes/movers, news, ratings, calendars
backfill (concurrency 8) history, dilution, SEC filings, politician trades
aggregation (concurrency 8) derived/computed company fields (every 5 min)
notifications (concurrency 3) user alerts, subscription reminders
Rate budget (FMP ~2000 req/min):
realtime 25% · frequent 20% · daily 20% · historical 30% · reserve 5%
Providers: Financial Modeling Prep · Polygon.io · SEC EDGAR (XBRL) ·
Google Gemini (filings/warrants/articles) · OpenAI (livestream)
Throughput: ~50,000–80,000 API calls/day (≈2–3% of upstream limits)
Representative jobs: all-US snapshot quotes (Polygon, 1 call/min), market movers, news, analyst ratings, sector performance, insider trades, earnings/IPO/dividend/economic/FDA calendars, financial ratios & key metrics, technical indicators (RSI/SMA/EMA/MACD/ADX), historical backfills (financials, quotes, dividends, price targets), dilution tracking (shares outstanding, XBRL facts, 10-Q parsing, warrants, S-1 effectiveness), SEC offering/general filings, Senate/House trades, and AI content generation from filings and news.
AI Livestream
One of ProTerminal's most ambitious features is a continuous, self-running AI financial-TV channel — an hours-long show that opens within seconds, narrates the market live, drives the real terminal on-screen, and can run unattended from the opening bell through the after-hours close. A human "producer" can also step in at any moment and direct it like a live broadcast. It's engineered OBS-first: the browser and graphics are captured by OBS and pushed out to Vimeo/YouTube.

A single "Brain" runs the show. One LLM orchestrator plans the entire programme. It opens in
5–10 seconds, then continuously cycles programme blocks until the operator stops it. The content is
deliberately split into two layers: a stable backbone (62% of airtime) of chart-first live
trading reads — ticker deep-dives, candle-chart analysis, mega-cap and small-cap watches — and a
set of catalyst-gated modules (38%) — earnings, macro prints, IPOs, crypto, commodities, M&A,
analyst calls — that swell or recede with the day's news. A phase-aware scheduler picks each next
segment by weight (phase × catalyst × daily-plan emphasis × recency decay), and any module whose
real-world trigger is absent is weighted to zero — the show never fabricates a story. Left
alone, a broadcast calendar signs the channel on and off on an Eastern-time clock and even fires
produced-TV "clock ceremonies" around the opening and closing bells.

No dead air. A live show can't stutter while it waits for the next line to be generated, so three overlapping prefetch mechanisms keep the audio seamless: while the current chunk is spoken, the next chunk's speech is synthesized and cached; during the last chunk of a segment, the following segment is already planned and its first line warmed; and operator commands or breaking movers are prepared off the main loop and swapped in at the next clean boundary. Only the very first chunk of the entire show ever waits on synthesis — everything after it is gapless.
Three on-air desks, three voices. Rather than one flat narrator, the AI performs as distinct desks — a fast, chart-obsessed Markets Desk, a wry big-picture Macro Desk, and a story-driven Company Desk, plus an Announcer — each with its own text-to-speech voice and on-air handoffs ("thanks, macro desk — picking it up here"). The producer can reassign any segment type to any voice live.

It drives the real product on-screen. A persistent headful Chromium, automated with Playwright, navigates the actual ProTerminal site as the AI talks — opening market movers, loading a ticker's chart, setting the timeframe, highlighting rows — so the visuals always match the narration. Actions come from a strict allowlist, and a "supersede" queue cancels stale navigations so the screen always reflects what's being said now. For segments with nothing to chart, the server renders its own no-auth broadcast pages — a live newsroom and a macro "market desk" — loaded directly as OBS browser sources.

Broadcast plumbing, hand-built. The engine talks to OBS through a from-scratch obs-websocket v5 client (SHA-256 challenge/response, no library) to fire scene transitions and poll stream health, and serves an always-on overlay frame — ticker tape, ET clock, LIVE bug, desk lower-third and an AI-disclosure. Text-to-speech is loudness-normalized in pure JavaScript so all three desk voices sit at a matched level, and every script-producing prompt carries a hard compliance layer: educational only, never buy/sell/hold advice, no price predictions, sub-dime stocks flagged for delisting risk.

A producer's control room. The React control room turns the autonomous show into a directable broadcast. Transport includes a one-click CUT that dumps the current line instantly and moves on; style dials nudge energy, pace and trader-lingo live; an operator directive takes a free-form instruction and a duration ("research NVDA vs INTC and cover it for 20 minutes") and the Brain runs a focused block, then returns to normal; a research paste box turns pasted notes into a segment that challenges weak assumptions rather than parroting them; an editable rundown reorders what's coming up; focus weights bias the mix per segment type from 0× to 3×; and a catalysts field lets the producer tell the show what today is about. Everything degrades gracefully — no OpenAI key falls back to deterministic scripts, Playwright off logs actions instead of running them — so the pipeline always runs end-to-end.

Admin Console
The admin app (React 19 + Vite + Tailwind + Recharts) is a complete operations cockpit — ~30 pages spanning users, billing, content, trading signals, background-job control, and data quality.

Users & billing. Full user management with per-user detail (account, acquisition, subscription history, notifications), plus a subscriptions workspace with revenue analytics and a transactions ledger.

Content & signals. Rich editors for blog, intelligence and education content; a press-release manager; daily picks and Pro-Ticker watchlist signals; valuation queue; and a notification-campaign composer with audience targeting and delivery analytics.
Operations & data quality. This is where the background platform is driven: a job scheduler (edit cron, enable/disable, manual trigger), live active-queue monitoring, execution logs with force-cancel, real-time WebSocket connection stats, and a dilution data-quality flag queue (user reports + auto-detected invariants).
Infrastructure & Scale
- Two-server VPS topology (each 32 cores / 128 GB): Server 1 runs Redis (32 GB) + the background engine; Server 2 runs nginx + the 16-instance PM2 API cluster + the static client.
- MongoDB Atlas M30 (3-node replica set) holds 50+ collections of market, filing, and user data.
- Redis backs both the BullMQ queues and the read-cache; the WebSocket layer fans quote/scanner updates to clients.
- nginx reverse proxy with Let's Encrypt TLS across
proterminal.io,admin.proterminal.io, andapi.proterminal.io; UFW firewall, SSH-key-only access, security headers.
Integrations
- Market data: Financial Modeling Prep, Polygon.io, SEC EDGAR (filings + XBRL)
- AI: Google Gemini (filing summarization, warrant/offering extraction, article generation), OpenAI (AI livestream host — LLM planning + TTS voices)
- Billing: Stripe and Authorize.net (subscriptions, webhooks)
- Auth: JWT + refresh, API keys (FMP-compatible proxy + mobile), Google OAuth, reCAPTCHA
- Email: Resend with React Email templates
- An FMP-compatible proxy (18 endpoints + a quote WebSocket) lets mobile/3rd-party clients use ProTerminal as a cached data layer.
What made it work
- A clean split between synchronous UX (terminal, research, admin) and a high-throughput asynchronous data engine — 100+ jobs behind budgeted rate-limits keep 4,300+ companies current without ever exceeding upstream API limits.
- A genuinely differentiated flagship — institutional-grade dilution intelligence — built from primary SEC sources and AI extraction rather than re-packaged vendor data.
- Real-time everywhere: WebSocket scanners and quote streams, TradingView charts, and live admin monitoring of the very queues that feed them.
- An operator-grade admin that doesn't just manage content but controls the data platform — scheduling jobs, watching queues, and triaging data-quality flags in production.
Deliverables
- Real-time terminal (TradingView charts, WebSocket scanner & quote streams)
- Paper-trading simulator — exchange-style matching engine on live ticks, Reg-T margin & leaderboard
- Dilution-risk engine for 4,300+ companies (SEC EDGAR, warrants, ATM, shelf tracking)
- Background data platform — 4 BullMQ queues, 100+ scheduled jobs, budgeted rate-limiting
- 50+ screeners, calendars & research tools (earnings, dividends, IPO, FDA, economic)
- Politician & insider trading, analyst ratings, smart-score rankings
- Autonomous AI financial-TV livestream — self-running show engine, multi-desk AI hosts, Playwright + OBS automation & a producer control room
- Deep admin console (users, subscriptions, content, job monitoring, data-quality flags)
- Subscription billing (Stripe / Authorize.net), Google OAuth, transactional email