AI · Portfolio · TanStack Start

How to build an AI chat portfolio site that answers as you

How I built mohitgoyal.in, a portfolio with an AI chat that answers as me: the stack, system prompt, streaming, guardrails and the SEO that keeps it indexable.

Mohit Goyal 5 min read
How to build an AI chat portfolio site that answers as you

To build an AI chat portfolio, start with a normal server-rendered site, keep your profile and projects in one data source, and add a chat that sends visitor questions to an AI model along with a system prompt built from that data on the server. Stream the replies, cap and rate-limit the endpoint, and give every project its own indexable page so search engines never depend on the chat. That is how mohitgoyal.in works.

I built it to replace a static brochure portfolio. A visitor can ask whether I have worked with their stack and get an answer in first person, instead of reading every section to find out. Here is how it is put together and what I would tell anyone building one.

Why build a portfolio with an AI chat?

Because a brochure makes the visitor do the work. They have to read every section to learn whether you fit, and the content goes stale the moment a project changes. A chat flips that: the visitor asks their question, and the answer comes from the same data as the rest of the site.

It also doubled as a testing ground. Techniques I use for clients, such as structured data, llms.txt and AI features, run here first.

38

Project pages, each indexable

13

Service pages with FAQs

2,000

Max characters per chat message

10

Free tool runs per visitor per day

What is the tech stack?

LayerChoiceWhy
FrameworkTanStack Start and React, in TypeScriptServer rendering with type-safe routing, so pages are indexable and data loading is explicit
StylingTailwind CSSOne set of tokens across pages, tools and chat replies
Content storeFirebase FirestoreProfile and projects edited from an admin, with no custom backend to host
Long-form contentMarkdown files in the repoCase studies and posts reviewed and versioned like code
AuthFirebase AuthProtects the admin dashboard
AIAnthropic Claude APIChat replies and the free tools
DeliveryCloudflare, plus an assets subdomain for imagesQuick first byte wherever the visitor is

How does one source of truth work?

Every surface reads from the same profile. When I edit a project in the admin, the change reaches the project page, its metadata, the sitemap, llms.txt and the chat's knowledge at once. Nothing has to be updated in three places.

Rendering diagram…

How is the chat built?

The browser posts the conversation to a server route. The route builds a system prompt from the server-side profile, sends it to Claude with the messages, and streams the reply back as Server-Sent Events, one text chunk at a time. Streaming matters: the visitor starts reading within a moment instead of waiting for the whole answer.

Replies are not plain text. The chat can answer with the site's own rich blocks: stat tiles, charts, step lists, timelines, FAQs, project cards and Mermaid diagrams. Asking "what have you built with WooCommerce?" can return project cards rather than a paragraph.

Three rules keep the answers honest:

  • The system prompt comes from my data only. It is a pure function of the profile document, never built from what the visitor types.
  • Real numbers are supplied. The prompt includes project counts by category and technology, labelled as the only project numbers the model may chart. It never has to estimate.
  • It stays on topic. Questions unrelated to my work, skills or experience are politely declined rather than answered with a guess.

How do you stop the chat being abused?

An open AI endpoint is a free proxy for anyone who finds it. The chat route has four guards:

  1. 1

    Origin and token check

    Only requests from the site's own pages, carrying the site's client token, are accepted. Everything else gets a 403.

  2. 2

    Rate limit per visitor

    Each IP address can send a limited number of messages in a ten-minute window, then gets a polite 429 with a retry time.

  3. 3

    Length caps

    Messages are capped at 2,000 characters, conversations at 16 messages and replies at a fixed output budget.

  4. 4

    Validated input

    The request body is checked against a schema, and the last message must come from the visitor.

The free tools follow the same pattern, with ten runs per tool per visitor per day.

How do you keep an AI portfolio indexable?

By treating the chat as an extra, not the site. Every project has a standalone page at /projects/<slug>, and case studies, posts and services have their own pages too, all server rendered. Each page carries its own JSON-LD, such as Person, CreativeWork, BreadcrumbList and ItemList. The site publishes a sitemap and an llms.txt file, and robots.txt allows the AI crawlers.

When I moved off my old WordPress portfolio, every legacy URL from Search Console got a 301 redirect, so old links and rankings landed on the right new page. For the AI search side of this, see how to get cited in AI Overviews.

What matters behind the scenes?

The editorial tooling, as much as the public pages. The admin has version history so I can roll back a bad edit, draft flags for projects, link health checks that flag dead client URLs, an SEO preview for each page and chat analytics that show what visitors actually ask. Those are what keep the content honest over time, and the analytics show which questions the pages themselves should answer better.

Should your site have an AI chat?

If visitors arrive with specific questions, such as "do you do X?", "have you worked with Y?" or "how much does Z involve?", a chat grounded in your own content answers them faster than navigation. If your site is a short brochure, a clear page will do more.

I build sites like this through my web and mobile apps and Next.js and React websites services. To see the framework decision behind it, read Next.js vs TanStack Start, or ask the chat on the home page how it works.

Frequently asked

What is an AI chat portfolio?+

A portfolio site where visitors can ask questions about your work in a chat and get answers in your voice, drawn from your own projects and experience, alongside the usual pages.

Which AI model does the chat use?+

The chat on mohitgoyal.in runs on Anthropic's Claude, using the Haiku model, which is fast and inexpensive for short conversational replies. The free tools on the site also run on Claude.

Will an AI chat hurt my portfolio's SEO?+

Not if the site underneath is server rendered. Search engines read the pages, not the chat. On this site every project, case study, service and post has its own indexable page with structured data.

How do you stop the chat making things up?+

Give it only your own data, tell it what it may not do, and supply real counts for anything numeric. The system prompt here includes the project counts and says they are the only project numbers it may chart.

Can you build one for my business?+

Yes. The same approach works for a business site: a chat that answers from your services, case studies and FAQs, on a site that still ranks on its own.

Mohit Goyal

Written by Mohit Goyal

Senior Web Developer in Gurugram, India. 100+ fast, SEO-friendly sites shipped in 4+ years with Next.js, React and WordPress, including the procol.ai rebuild. Send me your next project.

Keep reading

Let's build

Have a site that needs to be fast, rank and convert?

Open to Work. Usually replies within a day.