Investigations

AI Prompt Pad

TypeScript October 2025

A streaming AI chat interface with Server-Sent Events, stop-generation support, and comprehensive Playwright + BDD tests.

AI Prompt Pad is a streaming chat interface for AI conversations. The React frontend connects to a Go backend via Server-Sent Events (SSE) for real-time streaming responses. You can stop generation mid-stream, and the UI handles auto-scrolling with scroll-position awareness.

The testing is the real story — Playwright E2E tests cover 10+ scenarios including streaming behaviour, keyboard shortcuts, error handling, and auto-scroll. Cucumber BDD tests add Gherkin feature files for behaviour-driven coverage.

The backend currently uses mock AI responses, designed to be swapped for OpenAI, Claude, or Ollama. Docker Compose orchestrates everything with hot-reload (Vite for frontend, Air for Go backend).

The name "playwright-tests" undersells it — it's a complete full-stack streaming application, not just a test repo.

What this project demonstrates

Server-Sent Events for real-time AI response streaming
Stop-generation-mid-stream functionality
10+ Playwright E2E test scenarios
Cucumber BDD tests with Gherkin feature files
Docker Compose with hot-reload (Vite + Air)
Swappable AI backend: OpenAI, Claude, or Ollama

Technologies

ReactGoSSEStreamingPlaywrightBDD

© 2026 Jonathan Leahy · v1.0.9