Days 2-4: The Monorepo Migration Sprint (111 Commits in 3 Days)
Three days. 111 commits. And I'm pretty sure half of them have commit messages that just say "fix css."
Day 2: CSS Restoration Hell -- 38 Commits
When I unified the Tailwind config into packages/config, every app that relied on custom tokens broke. Not in an obvious "red error screen" way. In a subtle "the background is slightly wrong and why is that button 2px smaller" way.
38 commits. Each one fixing some CSS gap I'd missed. But by the end I'd also extracted 4 new shared packages: PDF generation, chat history, shared chat UI, and common React hooks.
The package extraction was rewarding. Seeing duplicated code across 5 apps collapse into a single source of truth is deeply satisfying.
Day 3: App #6 and WeChat Detection -- 17 Commits
Added MBTI personality test as the sixth app. Easier to integrate because I built it knowing it would go into the monorepo.
The more interesting challenge was WeChat browser detection. A massive percentage of Chinese internet traffic goes through WeChat's built-in browser. I added detection logic that sniffs the user agent for MicroMessenger and adjusts the UI accordingly.
Day 4: The Big Day -- 56 Commits
The Unified API Package
The biggest win: packages/api, a unified API layer that standardizes how all apps talk to AI models.
- 52 API routes migrated into a consistent pattern
- SSE streaming standardization
- Rate limiting -- unified across all apps
- Error handling -- consistent responses
This was a Claude Code power move. I described the pattern, showed one example, and had it migrate all 52. An hour of wall-clock time vs. a full day manually.
GDPR, Legal, and Security
Also knocked out: GDPR compliance, terms of service, privacy policy (Chinese and English), and a DFA-based sensitive word filter for the China market.
The DFA filter was critical: metaphysics content naturally includes terms that trigger naive keyword filters. I needed an allowlist for legitimate domain terms while still catching genuinely problematic content.
The Moment
Around 11 PM I started all 6 apps locally, logged in with one account, and watched credits sync across tabs. One login. One credit balance. Six products. It actually worked.
Three days ago I had 5 separate apps. Now I had one platform.