Skip to main content
Hero Background

LZStock Blog

A 100-day architectural journey to prove enterprise scalability.
Engineered for Series B/C growth stages.

Project Definition //LZStock is an enterprise-grade financial platform integrating real-time SEC data and stock ticks. Built from the ground up to prove scale-out architectures, avoid monoliths, and survive 5,000+ concurrent connections.

LZStock GitHub:

AI-Native Architecture

Why Separation of Concerns Matters Today

Traditional monoliths force AI coding agents to ingest massive, tangled context windows. This leads to hallucinations, unintended side effects, and wasted token costs.

By enforcing strict Domain-Driven Design (DDD) and Bounded Contexts, LZStock is inherently AI-friendly. Instead of feeding an LLM the entire codebase, I isolate concerns. This drastically reduces token usage, accelerates AI inference, and empowers agents to output highly accurate features within safe boundaries.

Monolith Codebase
High Token Cost
Bounded Contexts
AI-Optimized Context
"Smaller context windows =
Faster AI inference + Less hallucinations."

What You Will Find Here

Performance Tuning & High Concurrency

I don’t just design systems; I break them intentionally to find their limits. Through rigorous load testing (5k+ CCU, 14k ops/sec), I use pprof and custom Grafana metrics to hunt down Mutex contentions and optimize P99 latency down to ~450ms.

Defensive Programming & Zero-Leak Reliability

AI can write code, but it doesn’t take 3:00 AM pager calls. I focus on production safety: fixing TCP drop silent failures, preventing Goroutine and Redis Pub/Sub leaks, and gracefully managing WebSocket lifecycles under extreme connection churn.

Macro-Architecture & Cloud-Native Infra

Code snippets don’t scale teams; clear boundaries do. I enforce Strategic DDD using gRPC and NATS JetStream, backed by 100% IaC (Terraform, GKE). My current focus is evolving this foundation toward event-driven autoscaling to handle unpredictable market volatility.

Full-Stack Depth & Technical Communication

From analyzing PostgreSQL composite indexes with EXPLAIN ANALYZE to defining Clean Architecture in Go. I document these deep-dives like Architecture Decision Records (ADRs) to turn complex system choices into clear guides for the team.

The Architectural Proving Ground

Great architecture doesn't happen in a vacuum; it requires a demanding domain. To stress-test these enterprise patterns, I deliberately engineered LZStock around a high-stakes FinTech scenario: integrating messy SEC financial filings, sub-second market ticks, and dynamic portfolio tracking.

I chose this specific domain because it forces us to confront four brutal technical realities...

Technical Challenges

Data Heterogeneity

Navigating the intricate structures of SEC financial filings, unifying disparate document types and complex identifier systems into a highly structured, queryable data model.

Real-Time Streaming

Delivering sub-5-second market ticks and sustaining high-frequency WebSocket streams, ensuring zero data loss under massive concurrent user connections.

Complex Domain Logic

Managing the intricate state, distributed transactions, and mathematical calculations required for dynamic, real-time portfolio tracking and valuation.

Elastic Scalability

Architecting a stateless, containerized microservices foundation specifically designed to horizontally scale against unpredictable market volatility and traffic spikes.

Core Product Capabilities

A full-stack implementation validating enterprise-grade backend patterns.

High-Frequency Market Streaming preview
WebSocket & Concurrency

High-Frequency Market Streaming

Seamless WebSocket integration establishes robust monitoring sessions. It pushes sub-second stock price updates (e.g., TSLA, MSFT) with automated connection teardown to strictly prevent memory leaks under massive concurrency.

High-Speed Ticker Discovery preview
Algorithm & Data Structure

High-Speed Ticker Discovery

A custom-built company search engine powered by an internal Ternary Search Tree (TST) algorithm. It delivers lightning-fast industry classification and exchange details the moment a user types.

Dynamic Portfolio Management preview
Domain-Driven Design

Dynamic Portfolio Management

A centralized dashboard architecture allowing users to construct multiple tracking templates, create customized watchlists, and dynamically mutate targeted global companies in real-time.

System Architecture OverviewSystem Architecture Overview
Project BlueprintProject Blueprint
Complete DeploymentComplete Deployment
GolangKubernetesEvent-Driven Architecture

Architecture

By leveraging Domain-Driven Design (DDD), the system is partitioned into distinct Bounded Contexts. It utilizes a Golang-based microservices architecture and is deployed on Kubernetes to ensure future scalability.

Tech Stack Overview

Client-SideInvestor DashboardReact + TypeScript + Jotai + TanStack Router + Tailwind CSS + Webpack
BC1Indicator InsightsPostgreSQL + Watchlist Domain Logic
BC3Company SelectorPostgreSQL + TST Algorithm
BC10Data SyncGolang + Redis + NATS Event Publisher
BC11Market MonitorRedis + gRPC Streaming
BC13InvestorPostgreSQL + Investor Domain Identity
BC15API GatewayHTTP/WebSocket → gRPC Conversion
Grafana load test preview
Featured Blog / Case Study

Proving the Architecture: 5,000 Concurrent WebSockets

Architecture is only theoretical until it survives contact with production traffic. Read the engineering blog on how I simulated massive traffic spikes to validate our Dual-Level RWMutex strategy, proving zero goroutine leaks and absolute memory safety using k6 and Grafana.

Read the Load Testing Blog

Top Engineering Deep Dives

⚡ Go Concurrency

High-Concurrency Price Streaming Engine

Engineered a leak-proof WebSocket streaming backend using a Dual-Level RWMutex strategy, achieving O(1) fan-out routing and strict backend debouncing.

🏗️ System Architecture

Strategic DDD & Context Mapping

Decomposed the enterprise trading platform into 6 strictly isolated Bounded Contexts, preventing the "Distributed Monolith" anti-pattern.

🛡️ Fault Tolerance

Event-Driven Resilience via NATS JetStream

Eradicated queue blockages and ensured at-least-once message delivery by decoupling microservices with strict Poison Pill defenses and explicit acknowledgments.

💾 Database Mastery

Database Profiling & ORM Optimization

Eradicated systemic ORM N+1 bottlenecks and optimized PostgreSQL queries using EXPLAIN ANALYZE, proving strict O(1) pagination performance under load.

Next...

Let's Check what I built:

Daniel Lin

The Story Behind LZStock

Hi, I'm Daniel Lin. I love diving into ambiguous, messy problems and won't stop until I break them down into simple and replicable patterns.

My engineering journey is non-traditional. After earning a Master’s in Science in 2016, I pivoted to software. I spent five years shipping products across the stack—from front-end to full-stack. But as the systems I worked on grew, I realized that shipping fast wasn't enough; I wanted to build systems that don't break. I hit a ceiling where advanced architectural problems demanded deeper foundational roots.

So, I made a hard pivot. In 2023, I moved to Canada to rigorously study computer science fundamentals—focusing intensely on system design, database architecture, problem decomposition, and algorithms.

I didn't just want theoretical knowledge. In 2025, I spent 100 days synthesizing everything I learned to architect LZStock: an enterprise-grade, highly scalable distributed system. It combined everything I have learned in my career and my study in computer science. The idea of arch and execution were inspired by my last job at a Series B startup and reference from the online system design resources. These kind of architecture and execution design was battle tested and can be applied to any company or startup after Series B.

Now, I'm looking to bring this architectural rigor to Series B and C startups, helping them scale past the monolith and build resilient backends for their next phase of hyper-growth.

To check my resume

Visit Daniel Lin's Profile

or

To discuss new and challenging opportunities with me: