How Alpstein works under the hood

Alpstein isn't just a dashboard—it's a distributed system built with microservices, real-time data pipelines, and AI analysis working in concert. Here's how information flows from news sources to actionable insights.

1. News Collection & Scraping

The journey starts with a NodeJS scraper running on a 2-minute cron cycle, monitoring crypto news sources around the clock. It pulls articles from four major publications:

  • Decrypt covers breaking crypto news and emerging trends
  • CoinTelegraph pulls in-depth analysis and market commentary
  • NewsBTC tracks price movements and trading narratives
  • CoinDesk provides institutional and regulatory coverage

These scrapers are coordinated by Prometheus and monitored with Grafana, OpenTelemetry, and Jaeger for performance tracking. Every scraped article gets timestamped, deduplicated, and pushed into a Redis queue for processing.

2. Article Processing Pipeline

Raw articles flow from the Redis queue into the Golang LLM Service, which orchestrates the entire analysis pipeline. The LLM is equipped with tool-calling capabilities, meaning it can autonomously decide when it needs more context:

  • Binance API Tool — the AI can pull live market data (prices, volume, order books) for any cryptocurrency mentioned in an article
  • Langchain + QdrantDB Tool — the AI can search through historically processed articles using semantic similarity, finding related past coverage even when different terminology is used

Articles are embedded using the all-mpnet-base-v2 model and stored in QdrantDB, building a growing semantic memory of the entire crypto news landscape.

3. AI Analysis & Opinion Generation

The processed articles, combined with live market data from Binance (prices, RSI, EMA, SMA, volume), flow into the OpenAI LLM service. This is where the magic happens.

The AI doesn't just summarize—it analyzes. It considers:

  • Sentiment from multiple news articles (are narratives aligned or conflicting?)
  • Technical indicators showing momentum, overbought/oversold conditions
  • Historical context from QdrantDB (has this pattern happened before?)
  • Current market structure (support/resistance levels, volume patterns)

The output is a structured opinion with transparent reasoning: position type (long/short/unclear), entry levels, take-profit zones, stop-loss points, and risk-reward ratios. Every recommendation explains why, not just what.

4. Data Storage & Persistence

Everything gets stored for later analysis and audit trails:

  • PostgreSQL holds the permanent record—articles, AI opinions, market snapshots, and metadata with timestamps
  • Redis plays a dual role: it acts as the message queue between the NodeJS scraper and the Golang backend, and serves as the fast cache layer for the HTTP server, storing recent data and ensuring responses stay lightning-fast
  • QdrantDB stores vector embeddings of every processed article, enabling semantic search across the entire news archive

5. Real-Time Signal Tracking

When the AI generates a trading signal—with entry price, take-profit, and stop-loss levels—a Golang WebSocket client picks it up and starts tracking it against a live Binance price stream. Here's what happens:

  • The WebSocket monitors the real-time price for that asset. Once the price hits the AI's suggested entry, the signal status flips to triggered
  • From that point, a live P&L is calculated continuously—showing what your profit or loss would be if you had taken the same trade the AI suggested
  • Both the NextJS web app and the Alpstein TUI connect to this WebSocket, so you see P&L updating in real time on your screen

Think of it as a paper-trading engine running on every AI signal. You can watch each recommendation play out live and judge the AI's accuracy before putting real money on the line.

6. Serving the Data

The Golang HTTP Server acts as the central API gateway, serving processed analyses and market data to two frontends:

  • NextJS Web App — a full-featured web dashboard for browsing AI-analyzed news, viewing market data, and exploring historical insights
  • Alpstein TUI — a terminal-based interface for power users who prefer a keyboard-driven, distraction-free experience

Both clients consume the same API and display the same data—pick whichever fits your workflow.

7. Monitoring & Observability

Running a distributed system means things can break in unexpected ways. Alpstein uses a full observability stack:

  • Prometheus collects metrics from every service (request rates, error rates, latencies, queue depth, cache hit ratios)
  • Grafana visualizes those metrics in real-time dashboards with alerting
  • OpenTelemetry & Jaeger provide distributed tracing, letting you follow a single article as it flows through scraper → queue → LLM → database → frontend

If something breaks, we see exactly where and why. If performance degrades, we know which service is the bottleneck.

Why this architecture?

Every piece serves a purpose. The polyglot design uses each language where it excels—NodeJS for async web scraping, Golang for high-concurrency backend orchestration, and Python-ecosystem tools (Langchain, Sentence Transformers) for ML and embeddings. Redis as a message queue decouples the scraper from the AI pipeline, so articles queue up naturally during traffic spikes instead of overwhelming the system.

The LLM tool-calling pattern means the AI decides when to fetch market data or search historical articles—no hard-coded heuristics, just an intelligent agent that pulls context when it needs it.

It's built to be reliable, observable, and fast—because in crypto markets, a few seconds can mean the difference between catching a move and missing it entirely.