Evolving Blog Search into a Site-Wide AI Assistant with Next.js & Google Gemini
How I turned a blog-only search bar into a site-wide ⌘K assistant—covering plain-English architecture, UX restraint, privacy-by-allowlist, free-tier runway math, and 5 real-world use cases beyond personal blogs.

In my previous post, I built a hybrid search bar for /blog that combined 0 ms instant client-side filtering with Google Gemini AI answers. It worked great—if you were already on the blog page.
Then I thought about how real visitors actually navigate a personal engineering site. A recruiter lands on / and wants to know if I have led cloud-native platforms in Sydney. A founder lands on /about and wonders what my core tech stack looks like. A reader clicks to /blog/page/2 and expects search to still be there. Asking all of them to click over to /blog first just to ask a question adds unnecessary friction.
So I evolved that blog search into a site-wide ⌘K AI assistant accessible from every page on reggiepangilinan.com—without turning static pages into slow server-rendered routes, without adding a database, and without blowing past Google Gemini's $0 free tier.
Even better: the architecture behind it is not specific to personal portfolios. The exact same zero-database pattern works for SaaS documentation, agency portfolios, local businesses, internal team wikis, and e-commerce buying guides. I will start with the plain-English concepts and work my way into the engineering, UX, cost math, and broader use cases.
💡 The Big Ideas (In Plain English First)
Before diving into Next.js routes and CSS Flexbox quirks, four simple ideas explain the entire design:
1. Lazy Loading (Don't Pack What You Might Not Open): Most visitors who open the home page never touch search. If I stuffed every blog post into the home page's HTML just in case someone searches, every visitor would pay a speed penalty. Instead, my home and about pages stay 100% static with 0 KB of search data. The search index is only fetched the _very first time_ someone clicks Ask AI or presses
⌘K.2. Two Binders on the AI's Desk (Dual-Grounding): Previously, I handed Gemini one binder: my published blog posts. Now I hand it —Binder A is the live Contentful blog catalog, and Binder B is a compact, hand-curated covering my 20 years of engineering experience across Makati, Singapore, and Sydney. Gemini reads both and answers strictly from what is inside them.
Related Posts
Adding AI-Powered Blog Search with Google Gemini in Next.js
How we added an intelligent, Gemini-powered search bar to a Next.js + Contentful blog—covering AI basics for non-specialists, why hybrid search beat Google Search Grounding and Vertex AI Search, real-world free-tier traffic estimates, and built-in cost guardrails.
Generative Engine Optimization (GEO) in Next.js 16: llms.txt, RSS, JSON-LD & Crawler Access
A plain-English primer on Generative Engine Optimization (GEO) plus six concrete Next.js 16 upgrades: dynamic /llms.txt, /rss.xml, Person & WebSite JSON-LD, explicit AI bot rules, and non-JS visibility.
Four Silent Sitemap & SEO Bugs I Found Auditing My Next.js 16 Blog
What sitemaps, robots.txt, and canonical URLs actually do for search indexing—plus four silent SEO bugs I found and fixed auditing my Next.js 16 + Contentful blog.

