$ show mxstbr/mxstbr.com
This repository is the full-stack personal website of Max Stoiber (mxstbr.com), built with Next.js 16, TailwindCSS, and TypeScript. It serves a dual role: a public-facing blog and digital garden, and a private family productivity suite called 'MaxOS' that simulates a Windows 98 desktop environment. The public side includes MDX blog posts, Hashnode-synced notes, an RSS feed, and an investing page. The private side is a full-featured operating system shell with iframe-based apps: a calendar (with events stored in Redis), a finance portfolio tracker (pulling from Tiingo), a reminder system, a todo list, and a sophisticated chore management system (Chores2) for tracking kids' chores, rewards, and completions. The Chores2 subsystem is the most architecturally rich part of the codebase. It uses a layered domain-driven design with types, domain logic, commands, a service layer, a repository (with both in-memory and Redis implementations using compare-and-set transactions), MCP tool definitions for AI integration, and a notification outbox pattern for reliable Telegram delivery. The system supports time-window-based chore scheduling, period bonuses, approval workflows, and undo. It was recently rebuilt from a legacy version, with all features documented and verified in design docs. The codebase also integrates AI heavily: a Clippy chat assistant (powered by OpenAI) accessible via web and Telegram, and an MCP server that exposes tools for calendar, chores, and finance, enabling ChatGPT and other AI agents to read and mutate family data. The architecture is modern, with server actions, streaming, and Redis-backed state. However, the repo shows signs of being a single-developer project with some duplication (two active chore board UIs) and hardcoded secrets (parental PIN).
The LLM identified 4 files worth highlighting for reuse:
Core domain logic for the chore system, encapsulating all business rules for submitting, reviewing, undoing, and redeeming chores, plus bonus reconciliation and period-based eligibility. It is self-contained with no framework imports, relying only on types from a sibling file. This module could be extracted into a library for any chore-tracking application with similar time-window rules.
Implements a repository pattern for chore state persistence with two implementations: an in-memory version for testing and a Redis version using Lua-based compare-and-set (CAS) transactions for safe concurrent writes. This pattern is reusable in any system requiring atomic state updates against a key-value store, and the CAS logic is non-trivial and well-isolated.
Handles notification delivery via Telegram using an outbox pattern: notifications are first persisted to Redis (as a set of outbox items) and then drained via a background process with retry logic. This decouples notification sending from the main request path and ensures reliability. The pattern is applicable to any application needing asynchronous, reliable notifications.
Computes time-weighted portfolio returns and benchmark comparisons efficiently by batching historical price fetches and performing calculations in a single function. It handles edge cases like missing data and multiple currencies, and could be extracted as a utility for any personal finance dashboard.