docs: add AI Chat Agent documentation and update README
- doc/28-AI-CHAT-AGENT.md: comprehensive technical documentation covering architecture, agent design, query_cv tool, HTMX integration, graceful degradation, security, and example conversations - README.md: add AI Chat Agent section with examples, ADK Go badge, updated tech stack and documentation index - doc/00-GO-DOCUMENTATION-INDEX.md: add chat agent to doc index
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
# CV Site - Go + HTMX
|
||||
|
||||
[](https://go.dev/)
|
||||
[](https://htmx.org/)
|
||||
[](https://go.dev/)
|
||||
[](https://htmx.org/)
|
||||
[](https://github.com/google/adk-go)
|
||||
[](https://aistudio.google.com/)
|
||||
[](LICENSE)
|
||||
|
||||
**Modern, minimal curriculum vitae website** for Juan Andrés Moreno Rubio built with **Go** and **HTMX**.
|
||||
@@ -19,6 +21,7 @@ A professional, bilingual CV site with server-side PDF generation, HTMX interact
|
||||
## 📑 Table of Contents
|
||||
|
||||
- [Features](#-features)
|
||||
- [AI Chat Agent](#-ai-chat-agent)
|
||||
- [Demo](#-demo)
|
||||
- [Security](#-security)
|
||||
- [Quick Start](#-quick-start)
|
||||
@@ -43,6 +46,7 @@ A professional, bilingual CV site with server-side PDF generation, HTMX interact
|
||||
- ✅ **Zoom Control** - Adjustable zoom (25%-300%) with persistence across sessions
|
||||
- ✅ **Responsive** - Mobile, tablet, and desktop friendly
|
||||
- ✅ **JSON-Based Content** - Easy to update without touching code
|
||||
- ✅ **AI Chat Agent** - Ask questions about the CV in natural language (powered by ADK Go + Gemini)
|
||||
- ✅ **AI Development Section** - Showcases modern AI-assisted development skills
|
||||
- ✅ **Fast & Lightweight** - Go backend with chromedp for PDF generation
|
||||
- ✅ **Privacy-Friendly Analytics** - Self-hosted analytics (no third-party data sharing)
|
||||
@@ -50,6 +54,50 @@ A professional, bilingual CV site with server-side PDF generation, HTMX interact
|
||||
- ✅ **Production Ready** - Systemd service, CI/CD workflows, deployment guides
|
||||
- ✅ **Developer Friendly** - Hot reload, clear code structure, comprehensive Makefile
|
||||
|
||||
## 🤖 AI Chat Agent
|
||||
|
||||
Visitors can ask questions about the CV through a floating chat widget — powered by [Google ADK Go 1.0](https://github.com/google/adk-go) and Gemini 2.5 Flash.
|
||||
|
||||
### How It Works
|
||||
|
||||
```
|
||||
Visitor types question → HTMX POST /api/chat → ADK Agent runs query_cv tool
|
||||
→ Tool searches cached CV JSON data → Agent formulates answer → HTML response
|
||||
```
|
||||
|
||||
### Example Questions & Answers
|
||||
|
||||
| Question | Answer |
|
||||
|----------|--------|
|
||||
| *"How many Go projects has Juan built?"* | Lists 2 Go projects with descriptions |
|
||||
| *"What companies has he worked at?"* | Lists all 11 companies |
|
||||
| *"Does he have React experience?"* | Shows companies where React was used |
|
||||
| *"¿Qué certificaciones tiene?"* | Lists certifications — answers in Spanish automatically |
|
||||
|
||||
### Key Design Decisions
|
||||
|
||||
- **Single agent, single tool** — the CV data is bounded; multi-agent orchestration would be over-engineering
|
||||
- **Reads from the same data cache** the site uses — zero data duplication, always in sync
|
||||
- **Graceful degradation** — no API key? Chat icon simply doesn't appear. Zero impact on the site
|
||||
- **HTMX-native** — `hx-post` sends messages, responses are HTML fragments, no WebSocket needed
|
||||
- **Language-aware** — the agent responds in whatever language the visitor writes in
|
||||
|
||||
### Setup
|
||||
|
||||
```bash
|
||||
# Get a free API key from https://aistudio.google.com/apikey
|
||||
echo "GOOGLE_API_KEY=your-key" >> .env
|
||||
|
||||
# Chat icon appears automatically on next server start
|
||||
go run .
|
||||
```
|
||||
|
||||
**Free tier:** 15 requests/minute — more than enough for a personal CV site.
|
||||
|
||||
**Full technical documentation:** [doc/28-AI-CHAT-AGENT.md](doc/28-AI-CHAT-AGENT.md)
|
||||
|
||||
---
|
||||
|
||||
## 📸 Demo
|
||||
|
||||
🔗 **Live Demo:** [https://juan.andres.morenorub.io/](https://juan.andres.morenorub.io/)
|
||||
@@ -187,9 +235,10 @@ No code changes needed - just refresh browser!
|
||||
|
||||
## 🎯 Key Technologies
|
||||
|
||||
- **Backend:** Go 1.21+ (stdlib `net/http`, graceful shutdown)
|
||||
- **Backend:** Go 1.25+ (stdlib `net/http`, graceful shutdown)
|
||||
- **AI Agent:** Google ADK Go 1.0 + Gemini 2.5 Flash (conversational CV navigator)
|
||||
- **PDF Generation:** chromedp (headless Chrome automation)
|
||||
- **Frontend:** HTMX 1.9.10 (hypermedia-driven interactions)
|
||||
- **Frontend:** HTMX 2.0 + Hyperscript (hypermedia-driven interactions)
|
||||
- **Styling:** Custom CSS with Quicksand font from Google Fonts
|
||||
- **Data:** JSON files for easy content management
|
||||
- **Deployment:** Systemd service, manual binary, GitHub Actions CI/CD
|
||||
@@ -206,6 +255,7 @@ This project includes comprehensive documentation organized by purpose:
|
||||
### 🔧 Technical Reference
|
||||
- **[ARCHITECTURE.md](doc/ARCHITECTURE.md)** - System design, patterns, and technical decisions
|
||||
- **[API.md](doc/API.md)** - Complete HTTP API reference and HTMX integration
|
||||
- **[AI-CHAT-AGENT.md](doc/28-AI-CHAT-AGENT.md)** - ADK Go agent architecture, tool design, and integration details
|
||||
|
||||
### 📋 Policies & Standards
|
||||
- **[SECURITY.md](doc/9-SECURITY.md)** - Complete security architecture, implementation, and testing guide
|
||||
@@ -323,6 +373,7 @@ This project is licensed under the **MIT License** - see the [LICENSE](LICENSE)
|
||||
## 🙏 Acknowledgments
|
||||
|
||||
- **HTMX** - For making hypermedia-driven applications enjoyable
|
||||
- **Google ADK Go** - For the production-grade agent framework
|
||||
- **chromedp** - For reliable headless Chrome automation
|
||||
- **Go Community** - For excellent standard library and tooling
|
||||
- **AI Assistance** - For accelerating development and documentation
|
||||
|
||||
Reference in New Issue
Block a user