BTalkToBen AI
BTalkToBen AI

About me

Portrait of Benjamin

Ben

Senior Software Engineer

Columbus, Ohio

greggbj@gmail.combenjamin-greggbensbuilds(614) 804-9208
  • Ben (AI)·6:34 PM

Under the Hood

TalkToBen is a full-stack AI chat built with Next.js, TypeScript, and Go (with a FastAPI twin behind the same OpenAPI contract). It streams answers about Ben’s experience from a private curated knowledge store — not a live conversation with Ben himself.

The UI and API deploy independently on Amazon ECS Express Mode. The browser keeps the session transcript and posts each turn straight to the API; replies stream back over Server-Sent Events (SSE). Approved Markdown and profile JSON load from S3 into the system prompt at request time (prompt grounding, not RAG). A chat-only /embed route lets other sites (like whoisben.dev) host the same assistant in an iframe.

Architecture

Next.js + React

Full page · /embed · mobile About overlay

HTTPSSE↓ HTTP / SSE→

Go API

OpenAPI · orchestration · keys stay server-side

↓→

OpenAI

Response generation in streamed chunks

Private knowledge (S3)

Profile JSON + Markdown (+ optional audience overlays). Synced from a private repo; loaded by the API into the system prompt — not RAG.

Frontend
Next.js App Router and React 19. Server Components load the public profile; Client Components own chat, streaming, and the About Ben panel on small screens. /embed is the same chat without site chrome, locked down with frame-ancestors.
API
A Go service on ECS Express Mode exposes GET /api/profile and POST /api/chat from a shared OpenAPI spec (Python FastAPI twin for parity). Credentials never reach the browser.
Streaming
The browser talks to the API directly over SSE — no Next.js chat proxy. Visitors can cancel an in-flight request; TalkToBen does not persist full chat transcripts in its own database.
Knowledge
Private Markdown and profile JSON sync to S3 on merge. Optional ?for= audience overlays re-rank approved facts only. If a topic is not covered, the assistant says so instead of inventing details.