Back to Projects

TraderLaunchpad

Sole Developer & Architect

FintechTradingReal-time
Visit Project

Professional trading platform with per-tick market data ingestion, ClickHouse time-series storage, TradingView-powered charting, and AI-assisted trading strategies. Multi-tenant architecture with per-user broker connections, platform-wide price sources, and a hybrid data model where ClickHouse stores finalized M1 candles and Convex handles live in-progress candle state for low-latency UI updates.

1-minute
Candle Resolution

M1 canonical bars stored in ClickHouse, aggregated for higher timeframes

4s intervals
Data Polling

Client-side polling with planned WebSocket upgrade

8+
Convex Components

tdrlp-core, pricedata, broker-ledger, widgets, AI, tenant, notifications

TradeLocker
Broker Integrations

Platform + per-user connection model with encrypted tokens

The Problem

Retail traders lack access to the sophisticated tools that institutional traders use. Real-time data, professional charts, and portfolio analytics typically require expensive subscriptions or desktop software. And the data engineering challenge is significant: ingesting per-tick broker data, storing time-series at scale, and serving it to charts in real time.

The Solution

Built a browser-based trading platform with a hybrid data architecture: ClickHouse on a private droplet for historical OHLCV candle storage (MergeTree engine, partitioned by month), and Convex for operational state and live candle updates. TradeLocker broker integration provides market data. TradingView lightweight-charts render the frontend. Multi-tenant isolation via org-scoped broker connections with encrypted credentials.

System Architecture

TraderLaunchpad system architecture diagram

Technical Decisions

Key architecture decisions and their outcomes

ClickHouse over TimescaleDB for time-series

Context

Needed a columnar store for OHLCV candle queries across thousands of instruments with fast aggregation.

Decision

Chose ClickHouse with MergeTree engine, partitioned by month, ordered by (sourceKey, tradableInstrumentId, ts).

Outcome

Sub-second aggregation queries. SSH-tunneled migrations keep the DB private with zero public exposure.

Hybrid Convex + ClickHouse data model

Context

ClickHouse is great for historical reads but can't provide reactive UI updates for in-progress candles.

Decision

Built a priceLiveCandles table in Convex for the current in-progress candle, with finalized candles committed to ClickHouse.

Outcome

Low-latency chart updates via Convex reactivity, with ClickHouse handling the heavy historical queries.

Convex components for domain isolation

Context

Pricedata, broker connections, ledger, AI, and widgets all have distinct schemas and access patterns.

Decision

Used Convex components (mounted in convex.config.ts) so each domain owns its schema, queries, and mutations independently.

Outcome

Clean domain boundaries. Teams can reason about pricedata without touching broker-ledger code.

Engineering Details

  • ClickHouse candles_1m table with MergeTree engine, partitioned by toYYYYMM(ts), ordered by (sourceKey, tradableInstrumentId, ts)
  • Hybrid live candle model: Convex priceLiveCandles for in-progress bars, ClickHouse for finalized history
  • HTTP-based ClickHouse queries from Convex actions (actions required for external HTTP + timer patterns)
  • Broker sync via scheduled polling with lease/metadata tracking (lastSyncAt, syncLeaseUntil, listConnectionsDueForPoll)
  • Platform AI settings: daily reports, news alerts, EMA signal/filter roles, strategy AI suggestions
  • Multi-tenant: Clerk auth + org-scoped broker connections with encrypted token storage
  • TradingView datafeed adapter with custom subscribeBars polling and resolution mapping

Key Highlights

  • Real-time TradingView charts with 4-second polling (WebSocket stream planned)
  • ClickHouse time-series DB for M1 OHLCV candles on private infrastructure
  • Multi-broker integration starting with TradeLocker REST API
  • Multi-tenant with per-user and platform-wide broker connections
  • AI-assisted trading strategies with OpenAI + custom signal/filter roles
  • Convex components for modular domain isolation (pricedata, broker-ledger, widgets)
  • Encrypted broker credentials with org-scoped data isolation
  • SSH-tunneled ClickHouse migrations for zero-exposure database admin

Tech Stack

Next.jsConvexClickHouseTradingView ChartsTradeLocker APIThree.js / R3FOpenAI / AI SDKTypeScript

Skills & Technologies

Related Articles

Related Projects