$ show xiaolai/xiaolai.github.io
This repository is primarily a static personal website for author Li Xiaolai, hosting multiple original books and educational resources (e.g., 'Everyone Can Use English', Bitcoin whitepaper translation, TOEFL essay collection) as well as two interactive web applications: a Monte Carlo retirement projection tool and a historical ETF retirement strategy demo. The Monte Carlo tool is a well-crafted client-side financial simulator using Geometric Brownian Motion, Box-Muller transform, and Chart.js, complete with a standalone Node.js test suite. The site is built with docsify-style navigation and deployed via GitHub Actions to Alibaba Cloud OSS. While the content dominates the repository, the Monte Carlo application demonstrates solid engineering practices (modular JS, test coverage, performance-aware Float64Array usage) and is the most reusable software component. The repository is actively maintained (latest commit 2026-04-14, CI/CD active), but the surrounding static content has no build system or dependency management, and the Monte Carlo app relies on CDN-hosted Chart.js and a CORS proxy, posing medium technical drift risk.
The LLM identified 3 files worth highlighting for reuse:
Core Monte Carlo simulation engine: implements Geometric Brownian Motion with Box-Muller normal random number generation, symmetric return capping, percentile statistics, and multiple withdrawal strategies (percentage-of-portfolio, fixed-amount with inflation). Uses Float64Array for performance. Includes memoized currency formatting with abbreviations up to 1e21. Self-contained and could be extracted as a standalone library for any retirement or investment simulation web application.
Standalone Node.js test suite for the Monte Carlo simulation logic, covering Box-Muller distribution, GBM formula, withdrawal logic, inflation, percentiles, and symmetric capping. Uses plain console.assert with a custom test runner (runTests) and detailed pass/fail reporting. Demonstrates a lightweight, zero-dependency testing pattern that can be reused for any JavaScript financial model.
Complete docsify theme using CSS custom properties for colors, fonts, spacing, borders, shadows, and responsive breakpoints. Defines over 60 design tokens, enabling easy rebranding by overriding variables. Includes print styles and dark mode support. Could be extracted as a starter theme for any docsify-based documentation or personal site, or adapted for other static site generators that support CSS variables.