Skip to main content
System Design

How Scrollr Works

From source API to your desktop in milliseconds. A decoupled, CDC-driven pipeline built on Go, Rust, React, and Redis.

The Pipeline

Four stages from data source to your screen

INGEST

Data Sources

TwelveData WebSocket for market data, ESPN API for scores, RSS/Atom feeds for news, Yahoo Fantasy API for leagues.

TwelveData WS
ESPN HTTP
Yahoo API
RSS Feeds
PROCESS

Ingestion Services

Four independent Rust services collect, normalize, and write data to PostgreSQL. Each runs its own schedule and connection strategy.

Finance :3001
Sports :3002
RSS :3004
Kalshi :3005
DETECT

PostgreSQL + CDC

All data lands in PostgreSQL. Sequin monitors table changes via CDC (Change Data Capture) and fires webhooks to the core API.

trades
games
rss_items
yahoo_*
DELIVER

Real-time Delivery

Core API maps each CDC record to a topic in-process and publishes via Redis pub/sub. Every replica fans out to its own SSE clients.

Topic Routing
Redis Pub/Sub
SSE Stream
Per-user

CDC Record Flow

How a single data change reaches the right user

Rust Service

Writes to PostgreSQL

01

Sequin CDC

Detects row changes

02

Core API

POST /webhooks/sequin

03

Topic Router

record → cdc:{source}:{key}

04

Redis Pub/Sub

events:user:{sub}

05

SSE → Client

Desktop App

06

Design Principles

The rules that shape every architectural decision

Isolated Ingestion

Each data source has its own Rust ingestion service with an independent schedule, quota budget, and crash blast radius. Widget read APIs live inside the core gateway.

Zero-trust Gateway

Core API validates JWTs at the edge. The one proxied service (Fantasy) never sees tokens — it trusts identity headers injected by the gateway.

Self-registration

The Fantasy service registers in Redis on startup with a 30s TTL heartbeat and is discovered dynamically. First-party widget sources are served natively by core.

Convention-based UI

Desktop app discovers channel components at build time via import.meta.glob. Drop a file in the right folder and it appears.

Tech Stack

What powers each layer

Core API

Go 1.25

Fiber v2, pgx, Redis

SSE Hub

Per-user Redis Pub/Sub channels

Logto

Self-hosted OIDC, JWT validation

Ingestion

Rust

tokio async runtime

WebSocket

TwelveData persistent connection

HTTP Polling

ESPN 60s, RSS 5min, Yahoo 120s

Frontend

React 19

Vite 7, TanStack Router

Tailwind v4

daisyUI theme system

Motion

Production-grade animations

Desktop

Tauri v2

Cross-platform native shell

React 19

Multi-window UI

SSE + Polling

Real-time data delivery

Infrastructure

PostgreSQL

Shared DB, natural table isolation

Redis

Cache, Pub/Sub, registration

Sequin

CDC webhooks from PostgreSQL

Deployment

Kubernetes

DigitalOcean DOKS + DOCR

GitHub Actions

Build, deploy, smoke test

nginx + cert-manager

Ingress, TLS

Built and deployed on self-hosted infrastructure