Show HN: An AI powered Welcome Note Generator in Go (Moderation and LLM and UI) (github.com)

🤖 AI Summary
A developer released a production-ready “Welcome Note Generator” built entirely in Go to demonstrate how to move from simple prompts to a full multi-stage LLM pipeline with moderation, NLU, observability and a zero-JavaScript reactive UI. The app implements five progressively sophisticated flows (simple string generation, structured inputs, typed JSON outputs, a moderation/sanitization pipeline, and an NLP interpretation flow that turns free-form descriptions into structured parameters). It’s deliberately Go-only—no React/Node/Python—and emphasizes type safety, streaming UX via Server-Sent Events + Datastar/Templ/HTMX, and out-of-the-box production hygiene (Docker, rate limiting, CSRF, structured logging). Technically, the stack combines Genkit for AI flow orchestration, Gin for HTTP/middleware, and Gemini 2.0 Flash (with Ollama support for local models). Genkit flows use typed Go generics (e.g., genkit.GenerateData[WelcomeOutput]) so LLM outputs are validated as structured JSON (note, metadata, sentiment/safety scores). The safety flow is two-stage—generate, then moderate/sanitize and optionally return both original and sanitized text—while the smart flow interprets free text into parameters before generation. Observability is built in (Genkit UI, tracing), and deployment is straightforward via Docker/Docker Compose or Cloud Run (requires GEMINI_API_KEY or Ollama). This repo is a practical reference for building strongly-typed, production-grade LLM apps in Go.
Loading comments...
loading comments...