Building a personal site with a brain
Why my homepage has a chatbot, and the stack that keeps it fast and cheap.
Most personal sites are a wall of text you have to read top to bottom. I wanted mine to answer questions instead. So the homepage has a small chatbot that knows my background and nothing else.
The idea
A recruiter does not want to scroll. They want to ask "what did he do at BCG?" and get a straight answer. A chatbot grounded in a single profile does exactly that, and it doubles as a demo: the site itself is part of the portfolio.
The rule I set for it is simple.
Answer only from the profile. If it is not in there, say so and hand over a way to reach me.
No hallucinated job titles. No invented dates.
How the grounding works
There is no training and no vector database. The entire profile is a string that gets injected into the system prompt on every request. To update what the bot knows, I edit one file.
export const SYSTEM_PROMPT = `Answer using ONLY the profile below.
...
Profile:
${PROFILE}`;
This is called context injection. For a profile that fits comfortably in a prompt, it beats RAG on every axis that matters here: simpler, cheaper, and easier to reason about.
The stack
- Next.js on the App Router, TypeScript in strict mode.
- Cloudflare Workers AI for inference. The model id lives in one place so I can swap it without touching anything else.
- Cloudflare Workers for hosting, via the OpenNext adapter. Two accounts, one bill, fast everywhere.
The whole thing runs inside Cloudflare's free allowance. Past that, requests fail rather than charge me, which is the right failure mode for a personal site.
What is next
More write-ups of past work, and a projects section with real case studies. If you want to talk product, AI, or building, the chatbot knows how to reach me.