Ligang Yan
Full-stack software engineer in Halifax, Canada. Twelve years across Android, React and Node.js, from a 1M-DAU e-commerce app to small tools I ship on my own. This site holds my writing, the things I'm building, and experiments that don't have a home yet.
颜力刚 · ligangyan.com
Recent writing
All →- Rebuilding my personal site on Astro and Cloudflare WorkersThe first post on the new site, on why I picked this stack and how the site is meant to grow.
- Three things every AI agent engineer should know: agent architecture, prompt engineering, and MCPA platform-agnostic guide: the agentic loop and multi-agent orchestration, context passing and error propagation, few-shot and structured output, controlling false positives, and the structure, message format and a minimal server implementation of the Model Context Protocol.
- Real-time updates from NestJS to Next.js with Server-Sent EventsA step-by-step tutorial: expose an SSE endpoint from NestJS with an RxJS Subject, consume it in Next.js with a small useSse hook, and push events from any service in your backend. Simpler than WebSockets when the data only flows one way.
- How to Design a PDF Text-to-Speech Service Like SpeechifyText-to-speech (TTS) services have become a popular tool for making content more accessible, providing convenience for users who prefer listening to their text rather than reading it. One of the most well-known TTS platforms is Speechify, which converts digital text, including PDFs, into high-quality audio. When I embarked on building a PDF text-to-speech service similar to Speechify, I faced several challenges and opportunities. In this article, I’ll take you through the steps of how I system-designed this service, from understanding user needs to choosing the right technology stack and scaling the solution.
- How I Passed AWS Certified Developer Associate ExamI recently passed the AWS Certified Developer Associate exam. Here are some tips and resources that helped me prepare for the exam.
- What story does Black Myth: Wukong tell?Black Myth: Wukong is a video game developed by Chinese indie developer Game Science. The game is based on the classic Chinese novel Journey to the West and tells the story of Sun Wukong, the Monkey King. In this article, we will explore the story of Black Myth: Wukong and how it relates to the original novel.
Projects & tools
All →SweetValueLab
Equity research your Claude can use. Connect it as an MCP server, then research stocks, paper-trade and review your portfolio in one conversation. Free tools include a portfolio backtester and a FIRE calculator.
US Equity Research
My own equity research, one interactive page per company: sum-of-the-parts valuations, earnings breakdowns, what you have to believe, and the risks. Starts with SpaceX.
The Debate Arena
Critical-thinking practice for kids aged 5 to 12. 25 questions with no right answer, an AI opponent that argues back, and an audience of 20 that only moves for good reasons.
Mahjong AI, from zero to playing
A learning project with a 16-chapter tutorial: write a Mahjong engine, a rule-based bot, train a network to imitate it by supervised learning, then beat it with PPO. Includes a full Riichi Mahjong engine.
System Design Notes
My system design interview notes: eight classic problems (Ticketmaster, Uber, Web Crawler, TinyURL and more) written as the questions an interviewer asks and the answers I'd give.
IELTS Notes
IELTS study notes in Chinese: speaking topics with model answers and General Training writing samples for every letter type and common Task 2 theme.