Developer ships LLM chat widget with just 481 bytes of WordPress CMS code
A developer built a lightweight AI chat widget for a personal site by storing only a minimal endpoint loader in WordPress, keeping all logic and the ~19KB widget on a serverless platform. The design was driven by two constraints: no server to maintain and an API key that never touches the browser or CMS database. The project also surfaced four costly debugging lessons involving buffered server-sent events, base64 truncation that passed syntax checks, render-time CMS escaping, and a structurally broken but numerically balanced HTML tag tree. Rate limiting was implemented at both per-IP and global levels, with counters stored in SQLite to survive serverless cold starts. The developer concludes that each failure shared a common root cause: every passing check was validating something adjacent to the actual requirement rather than the requirement itself.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in