fastapi
Technical notes on web development, DevOps, and AI integration.
18 articles
- 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 - 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 - 03:10backend
MariaDB Fulltext Search plus LLM Query Expansion
Replace LIKE with a MariaDB FULLTEXT index, then add LLM query expansion: two layers that keep working when the index or the LLM fails.
#mariadb#fastapi#python - 02:43backend
A Python Vector Store Without NumPy
The semantic related layer for 80 articles turned out to be a Python dict and a cosine loop, no numpy and no vector database.
#python#fastapi#embedding - 20:48devops
Env Vars Reach the Container, Connectivity Does Not Come Free
Wiring env vars in Compose is only half the job; the container still needs a deliberate network path before the LLM search feature can talk to its router.
#docker#devops#fastapi - 18:32backend
Site Head and Footer Snippets Without a Redeploy
Snippet changes used to mean an edit, a commit, and a deploy wait. A whitelisted settings endpoint turns that into one PUT request.
#nextjs#fastapi#seo - 04:46backend
Naive MariaDB DATETIME Made My API Times Wrong
Commit db470da adds _utc_aware at the repository so article timestamps from a naive MariaDB DATETIME are sent by Pydantic with a Z (UTC), not zoneless.
#mariadb#fastapi#python