All projects

Next.js · 2026

Portfolio AI Assistant

The site you are on, and the assistant in the corner that only answers from a knowledge base I wrote.

When
May 2026 to Jun 2026
My role
Solo build
Stack
Next.js · TypeScript · Tailwind · Claude API · Vercel
lines of TypeScript
~3k
per-IP rate limit
8/min
source of truth
1

Problem

Recruiters skim. I wanted them to be able to ask a direct question and get a direct answer, without the assistant ever inventing a date, a number or a claim about me.

Approach

Built from scratch in about 3,000 lines of TypeScript on Next.js. The assistant's only permitted source is one knowledge base file, and its instructions tell it to say it does not know rather than infer. Project facts are generated from the same data file that renders this page, so the site and the assistant cannot drift apart.

The browser never talks to the model provider. A server route calls the Claude API, parses the streamed server-sent events, and re-streams just the text to the client, so answers appear as they generate and the API key stays on the server.

The endpoint is hardened: a per-IP limit of 8 requests a minute, a 500-character input cap, a six-turn history window with malformed history dropped, and refusal of instructions that try to override the rules. The site itself sends a strict Content Security Policy, two-year HSTS with preload, and clickjacking protection.

Impact

A live, grounded assistant that answers recruiter questions in seconds and admits when it does not know, running on the same codebase as the portfolio it describes.

Ask about Agrim

AI assistant · grounded in his portfolio

Hi, I'm an AI assistant trained only on Agrim's portfolio content. Ask me anything about his projects, experience, or background, and I'll answer from what's actually here rather than guessing.