Projects

Next.js · Gemini API · TypeScript · Vercel · 2026

This Site

A portfolio that doubles as a live AI playground.

Built by directing AI

Live
in-browser AI demos, not screenshots
Server-side
API key never reaches the browser

Most portfolios describe AI work. This one lets you use it. Alongside the project write-ups, the site runs two live LLM demos in the browser: a streaming chat and a structured-output text analyzer. Both run on serverless functions so the API key never reaches your browser, and both are rate-limited so a public demo cannot run up a bill.

Problem

“I build with AI” is easy to claim and hard to verify on a portfolio. I wanted visitors to try the work, not read a screenshot of it. The catch is that a public, in-browser AI demo creates two real risks: leaking the API key to anyone who opens dev tools, and letting strangers spend your quota. I treated those as the actual design problem.

What I built

A streaming Gemini chat that renders the response token by token, so the interface feels live instead of frozen while it waits.

A text analyzer that returns typed, structured JSON using structured-output mode, so the result is data the UI can render reliably rather than a string to guess at.

Serverless route handlers that keep the API key server-side, with rate limiting on both demos.

Key decisions & trade-offs

Server-side route handlers instead of calling the model from the browser. Calling from the browser is faster to build and a common shortcut. It also exposes the key and the quota to anyone. Routing through serverless functions cost a little more plumbing and bought the only acceptable security posture for a public demo.

Structured-output mode over free-text parsing. Asking for typed JSON constrains what the demo can show. It also means the UI never breaks on a malformed response, which is the difference between a demo that works in front of a stranger and one that does not.

Outcomes

  • Live, working AI demos visitors can run, not screenshots of them.
  • API key kept server-side and rate limiting on every demo, so a public endpoint is safe to leave open.
  • A strict, typed, accessible front end that doubles as a sample of how I build.

Built with Next.js · React 19 · TypeScript · Google Gemini · Vercel

Scope Design · Front-end engineering