Blog
Technical notes on web development, DevOps, and AI integration.
124 articles
- 16:38ai
One SSE Stream, Two AI Answers
A chatbot needs both a quick summary and a full explanation from one LLM generation. The answer: marker-based splitting in the SSE stream, with separate cache storage and mid-stream parsing.
#sse#ai#streaming - 15:06frontend
Chat History That Lives in Local Storage
The AI search box now remembers yesterday's questions. The trick: localStorage, a 30-turn cap, and a try/catch that silently surrenders when the browser says no
#react#frontend#nextjs - 14:57backend
Answers That Survive an LLM Outage
When the LLM router died, a meta fallback event arrived and the visitor still got an answer. Here's the three-part chain behind it.
#fastapi#redis#llm - 14:34backend
The AI Search Had to Learn Its Own Site
Typing hai used to kill the AI search with no_results. The culprit was MariaDB's fulltext word-length floor, not a broken prompt.
#fastapi#mariadb#llm - 13:16frontend
Chat Left, Results Right: Splitting One Overlay Into Two
The source list and the chat fought over one overlay. Two panels with different z-index plus render-time visibility ended the fight.
#react#css#tailwind - 12:55frontend
Search Dialog to AI Thread: One Array, Seven useState Gone
Follow-up questions wiped the previous answer. One ThreadEntry array with functional updates turned the single-slot dialog into a real thread.
#react#nextjs#sse - 12:28ai
Asking AI on My Blog: SSE Streaming Through Plain fetch
EventSource can't POST. The blog's Ask AI answers run through a plain fetch, a hand-rolled SSE parser, and one CRLF trap worth remembering.
#sse#fastapi#nextjs - 11:12backend
Blog Card TLDR Without N+1 Queries
One tiny field on the list page nearly cost a query per article. The fix is one batch IN query: two queries per page, not 1 + N.
#python#fastapi#mariadb - 10:54backend
SQLAlchemy Rejects a Parameter Your SQL Never Asked For
An optional locale filter froze live search on the default locale. The culprit: bindparams validation that fires at construction, not execution.
#python#fastapi#mariadb